File tree 1 file changed +2
-3
lines changed
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);
125
125
#define analogPinToBitMask (pin ) ( (pin < NUM_ANALOG_INPUTS) ? (1 << analogPinToBitPosition(pin)) : NOT_A_PIN )
126
126
#define digitalPinToTimer (pin ) ( (pin < NUM_TOTAL_PINS) ? pgm_read_byte(digital_pin_to_timer + pin) : NOT_ON_TIMER )
127
127
128
- #define portInputRegister (port ) ( &(((PORT_t*)(&PORTA + port))->IN) )
129
-
130
128
#define portToPortStruct (port ) ( (port < NUM_TOTAL_PORTS) ? ((PORT_t *)&PORTA + port) : NULL)
131
129
#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 )
133
131
#define digitalPinToInterrupt (p ) ( digitalPinToPort(p) * 8 + digitalPinToBitPosition(p) )
134
132
135
133
#define portOutputRegister (P ) ( (volatile uint8_t *)( &portToPortStruct(P)->OUT ) )
134
+ #define portInputRegister (P ) ( (volatile uint8_t *)( &portToPortStruct(P)->IN ) )
136
135
137
136
#ifdef __cplusplus
138
137
} // extern "C"
You can’t perform that action at this time.
0 commit comments