diff options
Diffstat (limited to 'board/grunt/board.c')
-rw-r--r-- | board/grunt/board.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index f60e3be18a..13e062589a 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -124,12 +124,14 @@ void board_update_sensor_config_from_sku(void) gpio_enable_interrupt(GPIO_6AXIS_INT_L); } -void board_overcurrent_event(int port) +void board_overcurrent_event(int port, int is_overcurrented) { enum gpio_signal signal = (port == 0) ? GPIO_USB_C0_OC_L : GPIO_USB_C1_OC_L; + /* Note that the levels are inverted because the pin is active low. */ + int lvl = is_overcurrented ? 0 : 1; - gpio_set_level(signal, 0); + gpio_set_level(signal, lvl); CPRINTS("p%d: overcurrent!", port); } |