@@ -92,49 +92,45 @@ __subsystem struct led_strip_driver_api {
92
92
};
93
93
94
94
/**
95
- * @brief Update an LED strip made of RGB pixels
95
+ * @brief Mandatory function to update an LED strip with the given RGB array.
96
96
*
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.
99
100
*
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 .
102
103
*
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.
108
105
*/
109
106
static inline int led_strip_update_rgb (const struct device * dev ,
110
107
struct led_rgb * pixels ,
111
- size_t num_pixels ) {
108
+ size_t num_pixels )
109
+ {
112
110
const struct led_strip_driver_api * api =
113
111
(const struct led_strip_driver_api * )dev -> api ;
114
112
115
113
return api -> update_rgb (dev , pixels , num_pixels );
116
114
}
117
115
118
116
/**
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.
120
120
*
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.
123
124
*
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.
128
127
*
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.
134
129
*/
135
130
static inline int led_strip_update_channels (const struct device * dev ,
136
131
uint8_t * channels ,
137
- size_t num_channels ) {
132
+ size_t num_channels )
133
+ {
138
134
const struct led_strip_driver_api * api =
139
135
(const struct led_strip_driver_api * )dev -> api ;
140
136
0 commit comments