Skip to content

Commit 245163c

Browse files
thedjnKhenrikbrixandersen
authored andcommitted
drivers: led_strip: Update format
Updates the include file to fix some formatting issues Signed-off-by: Jamie McCrae <spam@helper3000.net>
1 parent 4bea96b commit 245163c

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

include/zephyr/drivers/led_strip.h

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,49 +92,45 @@ __subsystem struct led_strip_driver_api {
9292
};
9393

9494
/**
95-
* @brief Update an LED strip made of RGB pixels
95+
* @brief Mandatory function to update an LED strip with the given RGB array.
9696
*
97-
* Important:
98-
* This routine may overwrite @a pixels.
97+
* @param dev LED strip device.
98+
* @param pixels Array of pixel data.
99+
* @param num_pixels Length of pixels array.
99100
*
100-
* This routine immediately updates the strip display according to the
101-
* given pixels array.
101+
* @retval 0 on success.
102+
* @retval -errno negative errno code on failure.
102103
*
103-
* @param dev LED strip device
104-
* @param pixels Array of pixel data
105-
* @param num_pixels Length of pixels array
106-
* @return 0 on success, negative on error
107-
* @warning May overwrite @a pixels
104+
* @warning This routine may overwrite @a pixels.
108105
*/
109106
static inline int led_strip_update_rgb(const struct device *dev,
110107
struct led_rgb *pixels,
111-
size_t num_pixels) {
108+
size_t num_pixels)
109+
{
112110
const struct led_strip_driver_api *api =
113111
(const struct led_strip_driver_api *)dev->api;
114112

115113
return api->update_rgb(dev, pixels, num_pixels);
116114
}
117115

118116
/**
119-
* @brief Update an LED strip on a per-channel basis.
117+
* @brief Function to update an LED strip with the given channel array
118+
* (each channel byte corresponding to an individually addressable color
119+
* channel or LED. Channels are updated linearly in strip order.
120120
*
121-
* Important:
122-
* This routine may overwrite @a channels.
121+
* @param dev LED strip device.
122+
* @param channels Array of per-channel data.
123+
* @param num_channels Length of channels array.
123124
*
124-
* This routine immediately updates the strip display according to the
125-
* given channels array. Each channel byte corresponds to an
126-
* individually addressable color channel or LED. Channels
127-
* are updated linearly in strip order.
125+
* @retval 0 on success.
126+
* @retval -errno negative errno code on failure.
128127
*
129-
* @param dev LED strip device
130-
* @param channels Array of per-channel data
131-
* @param num_channels Length of channels array
132-
* @return 0 on success, negative on error
133-
* @warning May overwrite @a channels
128+
* @warning This routine may overwrite @a channels.
134129
*/
135130
static inline int led_strip_update_channels(const struct device *dev,
136131
uint8_t *channels,
137-
size_t num_channels) {
132+
size_t num_channels)
133+
{
138134
const struct led_strip_driver_api *api =
139135
(const struct led_strip_driver_api *)dev->api;
140136

0 commit comments

Comments
 (0)