doc: reference: Add the LED and LED Strip APIs
Add the LED (regular and strip) APIs to the doc. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
46f108519d
commit
22854d39c0
4 changed files with 61 additions and 5 deletions
|
@ -20,6 +20,7 @@ Peripherals
|
|||
i2s.rst
|
||||
ipm.rst
|
||||
kscan.rst
|
||||
led.rst
|
||||
pinmux.rst
|
||||
pwm.rst
|
||||
ps2.rst
|
||||
|
|
33
doc/reference/peripherals/led.rst
Normal file
33
doc/reference/peripherals/led.rst
Normal file
|
@ -0,0 +1,33 @@
|
|||
.. _led_api:
|
||||
|
||||
LED
|
||||
###
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The LED API provides access to Light Emitting Diodes, both in individual and
|
||||
stip form.
|
||||
|
||||
Configuration Options
|
||||
*********************
|
||||
|
||||
Related configuration options:
|
||||
|
||||
* :option:`CONFIG_LED`
|
||||
* :option:`CONFIG_LED_STRIP`
|
||||
|
||||
API Reference
|
||||
*************
|
||||
|
||||
LED
|
||||
===
|
||||
|
||||
.. doxygengroup:: led_interface
|
||||
:project: Zephyr
|
||||
|
||||
LED Strip
|
||||
=========
|
||||
|
||||
.. doxygengroup:: led_strip_interface
|
||||
:project: Zephyr
|
|
@ -4,12 +4,19 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Public LED driver APIs
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_LED_H_
|
||||
#define ZEPHYR_INCLUDE_DRIVERS_LED_H_
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Public LED driver APIs
|
||||
* @brief LED Interface
|
||||
* @defgroup led_interface LED Interface
|
||||
* @ingroup io_interfaces
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <zephyr/types.h>
|
||||
|
@ -144,6 +151,10 @@ static inline int z_impl_led_off(struct device *dev, u32_t led)
|
|||
return api->off(dev, led);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <syscalls/led.h>
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_LED_H_ */
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_LED_STRIP_H_
|
||||
#define ZEPHYR_INCLUDE_DRIVERS_LED_STRIP_H_
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Public API for controlling linear strips of LEDs.
|
||||
|
@ -15,6 +12,16 @@
|
|||
* addressable strips of LEDs.
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_LED_STRIP_H_
|
||||
#define ZEPHYR_INCLUDE_DRIVERS_LED_STRIP_H_
|
||||
|
||||
/**
|
||||
* @brief LED Strip Interface
|
||||
* @defgroup led_strip_interface LED Strip Interface
|
||||
* @ingroup io_interfaces
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <device.h>
|
||||
|
||||
|
@ -126,4 +133,8 @@ static inline int led_strip_update_channels(struct device *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_LED_STRIP_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue