From 23a0a42df275612fcc2080cec061d2f14f694a46 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Thu, 19 Oct 2023 09:10:44 -0400 Subject: [PATCH] work arounds --- defines.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/defines.h b/defines.h index 15cff86..4cf1efc 100644 --- a/defines.h +++ b/defines.h @@ -159,7 +159,19 @@ // #ifndef I2C_USE_WIRE // #define I2C_USE_WIRE // #endif - + #define SDA I2C_SDA + #define SCL I2C_SCL + #include + extern const uint16_t PROGMEM port_to_mode_PGM[]; + extern const uint16_t PROGMEM port_to_input_PGM[]; + extern const uint16_t PROGMEM port_to_output_PGM[]; + extern const uint8_t PROGMEM digital_pin_to_port_PGM[]; + // extern const uint8_t PROGMEM digital_pin_to_bit_PGM[]; + extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[]; + extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; + #define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) ) + #define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) ) + #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) ) /* TODO when ready #elif defined(ARDUINO_ARCH_RP2040) #define ARDUINO_TYPE "RP2040"