Add init callback function to softpwm_led
This commit is contained in:
parent
fbbcf3ce0c
commit
f179c9a04a
@ -91,18 +91,18 @@ void keyboard_init(void)
|
||||
ledmap_init();
|
||||
#endif
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_init();
|
||||
#endif
|
||||
|
||||
#ifdef SOFTPWM_LED_ENABLE
|
||||
softpwm_led_init();
|
||||
softpwm_init();
|
||||
#endif
|
||||
|
||||
#ifdef BREATHING_LED_ENABLE
|
||||
breathing_led_init();
|
||||
#endif
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_init();
|
||||
#endif
|
||||
|
||||
#ifdef KEYMAP_IN_EEPROM_ENABLE
|
||||
keymap_in_eeprom_init();
|
||||
#endif
|
||||
|
@ -83,6 +83,10 @@ void layer_state_change(uint32_t state)
|
||||
#endif
|
||||
|
||||
#ifdef SOFTPWM_LED_ENABLE
|
||||
void softpwm_led_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void softpwm_led_on(uint8_t index)
|
||||
{
|
||||
if (backlight_binding & LED_BIT(index)) {
|
||||
|
@ -11,7 +11,7 @@ static uint8_t softpwm_led_state = 0;
|
||||
static uint8_t softpwm_led_ocr[LED_COUNT] = {0};
|
||||
static uint8_t softpwm_led_ocr_buff[LED_COUNT] = {0};
|
||||
|
||||
void softpwm_led_init(void)
|
||||
void softpwm_init(void)
|
||||
{
|
||||
#ifdef SOFTPWM_LED_TIMER3
|
||||
/* Timer3 setup */
|
||||
@ -38,6 +38,7 @@ void softpwm_led_init(void)
|
||||
OCR1AL = SOFTPWM_LED_TIMER_TOP & 0xff;
|
||||
SREG = sreg;
|
||||
#endif
|
||||
softpwm_led_init();
|
||||
}
|
||||
|
||||
void softpwm_led_enable(void)
|
||||
|
@ -8,6 +8,7 @@ typedef led_pack_t led_state_t;
|
||||
|
||||
#ifdef SOFTPWM_LED_ENABLE
|
||||
|
||||
void softpwm_init(void);
|
||||
void softpwm_led_init(void);
|
||||
void softpwm_led_enable(void);
|
||||
void softpwm_led_disable(void);
|
||||
@ -43,6 +44,7 @@ void breathing_led_set_duration_all(uint8_t dur);
|
||||
|
||||
#else
|
||||
|
||||
#define softpwm_init()
|
||||
#define softpwm_led_init()
|
||||
#define softpwm_led_enable()
|
||||
#define softpwm_led_disable()
|
||||
|
Reference in New Issue
Block a user