|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Fake LED controller driver. More...
Files | |
| file | led_fake.h |
| Fake LED controller driver API functions. | |
Functions | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_on, const struct device *, uint32_t) | |
| @fake_of{led_driver_api::on} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_off, const struct device *, uint32_t) | |
| @fake_of{led_driver_api::off} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_set_brightness, const struct device *, uint32_t, uint8_t) | |
| @fake_of{led_driver_api::set_brightness} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_blink, const struct device *, uint32_t, uint32_t, uint32_t) | |
| @fake_of{led_driver_api::blink} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_get_info, const struct device *, uint32_t, const struct led_info **) | |
| @fake_of{led_driver_api::get_info} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_set_color, const struct device *, uint32_t, uint8_t, const uint8_t *) | |
| @fake_of{led_driver_api::set_color} | |
| DECLARE_FAKE_VALUE_FUNC (int, fake_led_write_channels, const struct device *, uint32_t, uint32_t, const uint8_t *) | |
| @fake_of{led_driver_api::write_channels} | |
Fake LED controller driver.
@driver_fake{led_interface,CONFIG_LED_FAKE,zephyr\,fake-leds}
fake_led_get_info() and fake_led_set_color() are given a default custom_fake resolving the LED index and colour count against the devicetree node, re-installed on every reset. Install your own custom_fake in the test case to change what they report.
| DECLARE_FAKE_VALUE_FUNC | ( | int | , |
| fake_led_blink | , | ||
| const struct device * | , | ||
| uint32_t | , | ||
| uint32_t | , | ||
| uint32_t | ) |
#include <led_fake.h>
@fake_of{led_driver_api::blink}
| DECLARE_FAKE_VALUE_FUNC | ( | int | , |
| fake_led_get_info | , | ||
| const struct device * | , | ||
| uint32_t | , | ||
| const struct led_info ** | ) |
#include <led_fake.h>
@fake_of{led_driver_api::get_info}
#include <led_fake.h>
@fake_of{led_driver_api::off}
#include <led_fake.h>
@fake_of{led_driver_api::on}
| DECLARE_FAKE_VALUE_FUNC | ( | int | , |
| fake_led_set_brightness | , | ||
| const struct device * | , | ||
| uint32_t | , | ||
| uint8_t | ) |
#include <led_fake.h>
@fake_of{led_driver_api::set_brightness}
| DECLARE_FAKE_VALUE_FUNC | ( | int | , |
| fake_led_set_color | , | ||
| const struct device * | , | ||
| uint32_t | , | ||
| uint8_t | , | ||
| const uint8_t * | ) |
#include <led_fake.h>
@fake_of{led_driver_api::set_color}
| DECLARE_FAKE_VALUE_FUNC | ( | int | , |
| fake_led_write_channels | , | ||
| const struct device * | , | ||
| uint32_t | , | ||
| uint32_t | , | ||
| const uint8_t * | ) |
#include <led_fake.h>
@fake_of{led_driver_api::write_channels}