Closed bitluni closed 5 years ago
Low-level macros are vulnerable to operator priorities which can cause problems. Took me some time to find why my code didn't work
Arduino/tools/sdk/include/eagle_soc.h rows:
# define GPIO_REG_READ(reg) READ_PERI_REG(PERIPHS_GPIO_BASEADDR + reg) # define GPIO_REG_WRITE(reg, val) WRITE_PERI_REG(PERIPHS_GPIO_BASEADDR + reg, val)
should bechanged to:
# define GPIO_REG_READ(reg) READ_PERI_REG(PERIPHS_GPIO_BASEADDR + (reg)) # define GPIO_REG_WRITE(reg, val) WRITE_PERI_REG(PERIPHS_GPIO_BASEADDR + (reg), val)
@bitluni I still see this in the latest code. Care to make a PR?
Correcting milestone to 2.4.2
Low-level macros are vulnerable to operator priorities which can cause problems. Took me some time to find why my code didn't work
Arduino/tools/sdk/include/eagle_soc.h rows:
should bechanged to: