SNAKE_STM32F3
Loading...
Searching...
No Matches
ws2812b_matrix.c File Reference

Implementation of ws2812b diode matrix handling module. More...

#include "ws2812b.h"
#include "ws2812b_matrix.h"
Include dependency graph for ws2812b_matrix.c:

Functions

void ws2812b_matrix_set_coord (uint8_t x, uint8_t y, uint8_t R, uint8_t G, uint8_t B)
 Sets diode of chosen coordinates to specified RGB color.
void ws2812b_matrix_fill (uint8_t R, uint8_t G, uint8_t B, uint8_t delay, bool update)
 Fills diode matrix with one chosen color.

Detailed Description

Implementation of ws2812b diode matrix handling module.

Author
bslrd
Date
2026

SPDX-License-Identifier: MIT

Function Documentation

◆ ws2812b_matrix_fill()

void ws2812b_matrix_fill ( uint8_t R,
uint8_t G,
uint8_t B,
uint8_t delay,
bool update )

Fills diode matrix with one chosen color.

Parameters
RR value of color (0 to 255)
GG value of color (0 to 255)
BB value of color (0 to 255)
delayvalue of delay in ms between each diode state change (use only with update = true)
updatespecifies if this function should update physical diode state.
Note
Stores RGB value in internal buffer (ws2812b_color); does not update physical LEDs unless update = true.
Here is the call graph for this function:

◆ ws2812b_matrix_set_coord()

void ws2812b_matrix_set_coord ( uint8_t x,
uint8_t y,
uint8_t R,
uint8_t G,
uint8_t B )

Sets diode of chosen coordinates to specified RGB color.

Parameters
xhorizontal coordinate of chosen diode (0 to MATRIX_DIM -1)
yvertical coordinate of chosen diode (0 to MATRIX_DIM -1)
RR value of color (0-255)
GG value of color (0-255)
BB value of color (0-255)
Note
Stores RGB value in internal buffer (ws2812b_color); does not update physical LEDs.
Coordinate mapping depends on physical wiring (zigzag layout assumed).
Here is the call graph for this function: