Skip to content

Commit

Permalink
drivers: led_strip: Update format
Browse files Browse the repository at this point in the history
Updates the include file to fix some formatting issues

Signed-off-by: Jamie McCrae <spam@helper3000.net>
  • Loading branch information
thedjnK authored and henrikbrixandersen committed May 14, 2024
1 parent 4bea96b commit 245163c
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions include/zephyr/drivers/led_strip.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,49 +92,45 @@ __subsystem struct led_strip_driver_api {
};

/**
* @brief Update an LED strip made of RGB pixels
* @brief Mandatory function to update an LED strip with the given RGB array.
*
* Important:
* This routine may overwrite @a pixels.
* @param dev LED strip device.
* @param pixels Array of pixel data.
* @param num_pixels Length of pixels array.
*
* This routine immediately updates the strip display according to the
* given pixels array.
* @retval 0 on success.
* @retval -errno negative errno code on failure.
*
* @param dev LED strip device
* @param pixels Array of pixel data
* @param num_pixels Length of pixels array
* @return 0 on success, negative on error
* @warning May overwrite @a pixels
* @warning This routine may overwrite @a pixels.
*/
static inline int led_strip_update_rgb(const struct device *dev,
struct led_rgb *pixels,
size_t num_pixels) {
size_t num_pixels)
{
const struct led_strip_driver_api *api =
(const struct led_strip_driver_api *)dev->api;

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

/**
* @brief Update an LED strip on a per-channel basis.
* @brief Function to update an LED strip with the given channel array
* (each channel byte corresponding to an individually addressable color
* channel or LED. Channels are updated linearly in strip order.
*
* Important:
* This routine may overwrite @a channels.
* @param dev LED strip device.
* @param channels Array of per-channel data.
* @param num_channels Length of channels array.
*
* This routine immediately updates the strip display according to the
* given channels array. Each channel byte corresponds to an
* individually addressable color channel or LED. Channels
* are updated linearly in strip order.
* @retval 0 on success.
* @retval -errno negative errno code on failure.
*
* @param dev LED strip device
* @param channels Array of per-channel data
* @param num_channels Length of channels array
* @return 0 on success, negative on error
* @warning May overwrite @a channels
* @warning This routine may overwrite @a channels.
*/
static inline int led_strip_update_channels(const struct device *dev,
uint8_t *channels,
size_t num_channels) {
size_t num_channels)
{
const struct led_strip_driver_api *api =
(const struct led_strip_driver_api *)dev->api;

Expand Down

0 comments on commit 245163c

Please sign in to comment.