Rgbled#

group drv_rgbled

Control the rgbled driver (through SPI)

Author

Said Alvarado-Marin said-alexander.alvarado-marin@inria.fr

Copyright

Inria, 2022

Functions

void db_rgbled_init(void)#

Configures the SPIM peripheral to work with the onboard DotBot RGB LED driver.

The DotBot uses a TLC5973D 1-wire RGB LED driver. the SPIM peripheral is used to generate an arbitrary serial sequence that the Driver will recognize.

void db_rgbled_set(uint8_t red, uint8_t green, uint8_t blue)#

Set the color to display in the RGB LED.

Assembles the 1-wire encoded command to change the color of the RGB led. Afterward, an SPI transfer is necessary to actually update the LED color.

Parameters:
  • red[in] red value of the led color [0 - 255]

  • green[in] green value of the led color [0 - 255]

  • blue[in] blue value of the led color [0 - 255]