led driver

This commit is contained in:
2024-08-06 23:47:47 -05:00
parent aede43f0b5
commit c7af67df36
4 changed files with 36 additions and 13 deletions
+21 -1
View File
@@ -11,7 +11,27 @@
extern led_strip_handle_t leds;
typedef enum {
shape1 = 0,
shape2 = 1,
shape3 = 2,
shape4 = 3,
module_sseg = 4,
game_sseg = 5,
tft = 6,
mic = 7,
ir_led = 8,
speaker = 9,
rfid = 10,
keypad = 11,
char_lcd = 12,
s4 = 13,
s3 = 14,
s2 = 15,
s1 = 16,
b1 = 17,
b2 = 18,
b3 = 19,
b4 = 20,
} Led;
void init_leds(void);
+1
View File
@@ -70,6 +70,7 @@ bool get_button_released(void) {
}
void strike(char* reason) {
ESP_LOGW("strike!", "%s", reason);
uint8_t reg = 6;
ESP_ERROR_CHECK_WITHOUT_ABORT(i2c_master_write_to_device(WIRES_I2C_NUM, WIRES_I2C_ADDR, &reg, 1, (100 / portTICK_PERIOD_MS)));
}