feat: LED-Treiber, Licht-Task und UART-Testkonsole
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include "drivers/nl_led.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
static const nl_board_t *s_board;
|
||||
|
||||
void nl_led_init(const nl_board_t *board)
|
||||
{
|
||||
s_board = board;
|
||||
if (board->driver == NL_DRV_PWM)
|
||||
nl_pwm_leds_init(board);
|
||||
else
|
||||
nl_sm2135eh_init(board);
|
||||
}
|
||||
|
||||
void nl_led_set(const uint8_t ch[NL_CH_COUNT])
|
||||
{
|
||||
if (s_board == NULL)
|
||||
return;
|
||||
if (s_board->driver == NL_DRV_PWM)
|
||||
nl_pwm_leds_set(ch);
|
||||
else
|
||||
nl_sm2135eh_set(ch);
|
||||
}
|
||||
Reference in New Issue
Block a user