|
SNAKE_STM32F3
|
Implementation of ws2812b diodes handling module (STM32 HAL). More...
#include "ws2812b.h"
Data Structures | |
| struct | ws2812b_color |
Macros | |
| #define | BRIGHTNESS_MODE 2 |
| #define | BRIGHTNESS 0.5 |
| #define | zero 0b1100000 |
| #define | one 0b11111000 |
Functions | |
| void | ws2812b_init (SPI_HandleTypeDef *spi_handler) |
| Initializes ws2812b handling module by passing given SPI handler. | |
| void | ws2812b_set_rgb (uint16_t diode_id, uint8_t R, uint8_t G, uint8_t B) |
| Sets chosen diode to specified RGB color. | |
| void | ws2812b_update (void) |
| Transfers diode color values specified with ws2812b_set_rgb to physical display. | |
Implementation of ws2812b diodes handling module (STM32 HAL).
SPDX-License-Identifier: MIT
| #define BRIGHTNESS 0.5 |
| #define BRIGHTNESS_MODE 2 |
| #define one 0b11111000 |
| #define zero 0b1100000 |
| void ws2812b_init | ( | SPI_HandleTypeDef * | spi_handler | ) |
Initializes ws2812b handling module by passing given SPI handler.
| spi_handler | pointer to spi handler of choice. |
| void ws2812b_set_rgb | ( | uint16_t | diode_id, |
| uint8_t | R, | ||
| uint8_t | G, | ||
| uint8_t | B ) |
Sets chosen diode to specified RGB color.
| diode_id | Index of LED (0 to LED_NUMBER-1). |
| R | R value of color (0 to 255) |
| G | G value of color (0 to 255) |
| B | B value of color (0 to 255) |
| void ws2812b_update | ( | void | ) |
Transfers diode color values specified with ws2812b_set_rgb to physical display.