|
Example Application 1.0.0
A Zephyr-based example application
|
Public API provided by the blink driver class. More...
Functions | |
| int | blink_set_period_ms (const struct device *dev, unsigned int period_ms) |
| Configure the LED blink period. | |
| static int | blink_off (const struct device *dev) |
| Turn LED blinking off. | |
Public API provided by the blink driver class.
The public API is the interface that is used by applications to interact with devices that implement the blink driver class. If support for system calls is needed, functions accessing device fields need to be tagged with __syscall and provide an implementation that follows the z_impl_${function_name} naming scheme.
|
inlinestatic |
Turn LED blinking off.
This is a convenience function to turn off the LED blinking. It also shows how to create convenience functions that re-use other driver functions, or driver operations, to provide a higher-level API.
| dev | Blink device instance. |
| int blink_set_period_ms | ( | const struct device * | dev, |
| unsigned int | period_ms ) |
Configure the LED blink period.
| dev | Blink device instance. |
| period_ms | Period of the LED blink in milliseconds. |
| 0 | if successful. |
| -EINVAL | if period_ms can not be set. |
| -errno | Other negative errno code on failure. |