Skip to content

Commit 9124056

Browse files
PontusOPontus Oldberg
andauthored
Fixed incorrect AVR compatibility macros. (#2249)
* Fixed incorrect AVR compatibility macros. --------- Co-authored-by: Pontus Oldberg <[email protected]>
1 parent 247e48f commit 9124056

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/rp2040/Arduino.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ void noInterrupts();
6565
#define digitalPinToTimer(pin) (0)
6666
#define digitalPinToInterrupt(pin) (pin)
6767
#define NOT_AN_INTERRUPT (-1)
68-
#define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out)
69-
#define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in)
70-
#define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe)
68+
#define portOutputRegister(port) ((volatile uint32_t *)&(sio_hw->gpio_out))
69+
#define portInputRegister(port) ((volatile uint32_t *)&(sio_hw->gpio_in))
70+
#define portModeRegister(port) ((volatile uint32_t *)&(sio_hw->gpio_oe))
7171
#define digitalWriteFast(pin, val) (val ? sio_hw->gpio_set = (1 << pin) : sio_hw->gpio_clr = (1 << pin))
7272
#define digitalReadFast(pin) ((1 << pin) & sio_hw->gpio_in)
7373
#define sei() interrupts()

0 commit comments

Comments
 (0)