diff options
Diffstat (limited to 'board/grunt/board.c')
-rw-r--r-- | board/grunt/board.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index deac1ead57..7a5005df34 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -406,7 +406,15 @@ struct keyboard_scan_config keyscan_config = { /* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_KBLIGHT] = { 5, 0, 100 }, + [PWM_CH_KBLIGHT] = { 5, 0, 100 }, + [PWM_CH_LED1_ORANGE] = { + 0, PWM_CONFIG_OPEN_DRAIN | PWM_CONFIG_ACTIVE_LOW | + PWM_CONFIG_DSLEEP, 100 + }, + [PWM_CH_LED2_BLUE] = { + 2, PWM_CONFIG_OPEN_DRAIN | PWM_CONFIG_ACTIVE_LOW | + PWM_CONFIG_DSLEEP, 100 + }, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); @@ -601,6 +609,15 @@ struct motion_sensor_t motion_sensors[] = { const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); +static void board_init_leds_off(void) +{ + /* Initialize the LEDs off. */ + /* TODO(sjg): Eventually do something with these LEDs. */ + pwm_set_duty(PWM_CH_LED1_ORANGE, 0); + pwm_set_duty(PWM_CH_LED2_BLUE, 0); +} +DECLARE_HOOK(HOOK_INIT, board_init_leds_off, HOOK_PRIO_INIT_PWM + 1); + #ifndef TEST_BUILD void lid_angle_peripheral_enable(int enable) { |