diff --git a/factory_test/components/i2c-pca9555 b/factory_test/components/i2c-pca9555 index 0350a5b..10e413e 160000 --- a/factory_test/components/i2c-pca9555 +++ b/factory_test/components/i2c-pca9555 @@ -1 +1 @@ -Subproject commit 0350a5bd92d7848e6f3db2e80992677c98934f58 +Subproject commit 10e413edd7d1b086c647b84f7dadf7bd1047789d diff --git a/factory_test/main/hardware.c b/factory_test/main/hardware.c index fea0edc..4a2c340 100644 --- a/factory_test/main/hardware.c +++ b/factory_test/main/hardware.c @@ -98,6 +98,8 @@ esp_err_t hardware_init() { pca9555_set_gpio_polarity(&pca9555, PCA9555_PIN_BTN_BACK, true); pca9555_set_gpio_polarity(&pca9555, PCA9555_PIN_BTN_ACCEPT, true); + pca9555.pin_state = 0; // Reset all pin states so that the interrupt function doesn't trigger all the handlers because we inverted the polarity :D + pca9555_set_interrupt_handler(&pca9555, PCA9555_PIN_BTN_START, button_handler); pca9555_set_interrupt_handler(&pca9555, PCA9555_PIN_BTN_SELECT, button_handler); pca9555_set_interrupt_handler(&pca9555, PCA9555_PIN_BTN_MENU, button_handler);