1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 16:46:13 +01:00

commit current work

This commit is contained in:
travis-farmer 2023-10-19 10:39:25 -04:00
parent 23a0a42df2
commit c8e46fed76

View File

@ -161,17 +161,14 @@
// #endif // #endif
#define SDA I2C_SDA #define SDA I2C_SDA
#define SCL I2C_SCL #define SCL I2C_SCL
#include <api\deprecated-avr-comp\avr\pgmspace.h>
extern const uint16_t PROGMEM port_to_mode_PGM[]; //#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )
extern const uint16_t PROGMEM port_to_input_PGM[]; //#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )
extern const uint16_t PROGMEM port_to_output_PGM[]; //#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
extern const uint8_t PROGMEM digital_pin_to_port_PGM[]; #define portOutputRegister(port) ( &(port->OUT.reg) )
// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[]; #define portInputRegister(port) ( &(port->IN.reg) )
extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[]; #define portModeRegister(port) ( &(port->DIR.reg) )
extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; char16_t digitalPinToBitMask(char16_t P) { return digitalPinToPinName(P);}
#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 /* TODO when ready
#elif defined(ARDUINO_ARCH_RP2040) #elif defined(ARDUINO_ARCH_RP2040)
#define ARDUINO_TYPE "RP2040" #define ARDUINO_TYPE "RP2040"