B001-V3 works with it now

This commit is contained in:
Thaddeus Hughes
2025-12-16 12:10:10 -06:00
parent ac030005c3
commit 062221dfd3
70 changed files with 3872 additions and 3786 deletions

View File

@@ -24,7 +24,7 @@
#define TCA_REG_CONFIG1 0x07
// Debounce & Repeat Settings
#define DEBOUNCE_MS 50
#define DEBOUNCE_MS 50
#define REPEAT_MS 200
#define REPEAT_START_MS 700
@@ -45,7 +45,7 @@ static esp_err_t tca_read_word(uint8_t reg, uint16_t *value) {
return ret;
}
esp_err_t i2cdev_init(void) {
esp_err_t i2c_init(void) {
if (i2c_initted) return ESP_OK;
i2c_config_t conf = {
@@ -75,6 +75,13 @@ esp_err_t i2c_set_led1(uint8_t state) {
return tca_write_word_8(TCA_REG_OUTPUT0, state<<5);
}
esp_err_t i2c_stop() {
if (!i2c_initted) return ESP_OK;
i2c_set_relays(0);
i2c_set_led1(0);
return ESP_OK;
}
#define N_BTNS 2
static bool debounced_state[N_BTNS] = {false};
static bool last_known_state[N_BTNS] = {false};