File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,13 @@ bool isDoubleBondedActive(uint8_t pin);
125125#define analogPinToBitMask (pin ) ( (pin < NUM_ANALOG_INPUTS) ? (1 << analogPinToBitPosition(pin)) : NOT_A_PIN )
126126#define digitalPinToTimer (pin ) ( (pin < NUM_TOTAL_PINS) ? pgm_read_byte(digital_pin_to_timer + pin) : NOT_ON_TIMER )
127127
128- #define portInputRegister (port ) ( &(((PORT_t*)(&PORTA + port))->IN) )
129-
130128#define portToPortStruct (port ) ( (port < NUM_TOTAL_PORTS) ? ((PORT_t *)&PORTA + port) : NULL)
131129#define digitalPinToPortStruct (pin ) ( (pin < NUM_TOTAL_PINS) ? ((PORT_t *)&PORTA + digitalPinToPort(pin)) : NULL)
132- #define getPINnCTRLregister (port , bit_pos ) ( ((port != NULL) && (bit_pos < NOT_A_PIN)) ? ((uint8_t *)&(port->PIN0CTRL) + bit_pos) : NULL )
130+ #define getPINnCTRLregister (port , bit_pos ) ( ((port != NULL) && (bit_pos < NOT_A_PIN)) ? ((volatile uint8_t *)&(port->PIN0CTRL) + bit_pos) : NULL )
133131#define digitalPinToInterrupt (p ) ( digitalPinToPort(p) * 8 + digitalPinToBitPosition(p) )
134132
135133#define portOutputRegister (P ) ( (volatile uint8_t *)( &portToPortStruct(P)->OUT ) )
134+ #define portInputRegister (P ) ( (volatile uint8_t *)( &portToPortStruct(P)->IN ) )
136135
137136#ifdef __cplusplus
138137} // extern "C"
You can’t perform that action at this time.
0 commit comments