basic expander work

This commit is contained in:
2026-04-01 12:49:59 -05:00
parent 8c0b6823fd
commit 837c3eacda
2 changed files with 110 additions and 50 deletions
+4 -8
View File
@@ -7,7 +7,8 @@
#define EXPANDER_I2C_ADDR (0x7E)
#define EXPANDER_I2C_SPEED (400000)
#define EXPANDER_TIMEOUT_MS (10)
// the actual transaction takes ~0.3ms, but for some reason a timout of ~10 or lower causes issues.
#define EXPANDER_TIMEOUT_MS (100)
#define EXPANDER_WHOAMI_VALUE (0x85)
@@ -209,13 +210,8 @@ class ExpanderPeripheral {
QueueHandle_t touch_events;
QueueHandle_t keypad_press_events;
QueueHandle_t keypad_release_events;
// button_press_events: Channel<CriticalSectionRawMutex, Button, EXPANDER_EVENT_QUEUE_SIZE>,
// button_release_events: Channel<CriticalSectionRawMutex, Button, EXPANDER_EVENT_QUEUE_SIZE>,
// switch_flip_events: Channel<CriticalSectionRawMutex, SwitchFlip, EXPANDER_EVENT_QUEUE_SIZE>,
// switch_touch_events: Channel<CriticalSectionRawMutex, SwitchTouch, EXPANDER_EVENT_QUEUE_SIZE>,
// touch_events: Channel<CriticalSectionRawMutex, TouchRelease, EXPANDER_EVENT_QUEUE_SIZE>,
// keypad_press_events: Channel<CriticalSectionRawMutex, KeypadKey, EXPANDER_KEYPAD_QUEUE_SIZE>,
// keypad_release_events: Channel<CriticalSectionRawMutex, KeypadKey, EXPANDER_KEYPAD_QUEUE_SIZE>,
};
#endif // EXPANDER_H