thinknode_m5: add pca9557 expander

This commit is contained in:
Florent 2025-11-27 22:55:21 +01:00
parent d0f6def4f9
commit 24edd3cf20
5 changed files with 17 additions and 8 deletions

View file

@ -15,6 +15,7 @@ WRAPPER_CLASS radio_driver(radio, board);
ESP32RTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);
SensorManager sensors;
PCA9557 expander (0x18, &Wire1);
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
@ -26,6 +27,11 @@ bool radio_init() {
rtc_clock.begin(Wire);
// pinMode(21, INPUT);
// pinMode(48, OUTPUT);
Wire1.begin(48, 47);
expander.pinMode(4, OUTPUT); // eink
expander.pinMode(5, OUTPUT); // peripherals
expander.digitalWrite(4, HIGH);
expander.digitalWrite(5, HIGH);
#if defined(P_LORA_SCLK)
spi.begin(P_LORA_SCLK, P_LORA_MISO, P_LORA_MOSI);
return radio.std_init(&spi);