8000 Fix boards.txt.py compatible with python3 by wemos · Pull Request #4995 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Fix boards.txt.py compatible with python3 #4995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
fix macros (..) parenthesis lost
  • Loading branch information
wemos committed Jul 28, 2018
commit 0824c0f358f38156442245089cdb88e8c7f4d6aa
10 changes: 5 additions & 5 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ void yield(void);
void optimistic_yield(uint32_t interval_us);

#define _PORT_GPIO16 1
#define digitalPinToPort(pin) (pin==16)?(_PORT_GPIO16):(0)
#define digitalPinToBitMask(pin) (pin==16)?(1):(1UL << (pin))
#define digitalPinToPort(pin) ((pin)==16)?(_PORT_GPIO16):(0)
#define digitalPinToBitMask(pin) ((pin)==16)?(1):(1UL << (pin))
#define digitalPinToTimer(pin) (0)
#define portOutputRegister(port) (port==_PORT_GPIO16)?((volatile uint32_t*) &GP16O):((volatile uint32_t*) &GPO)
#define portInputRegister(port) (port==_PORT_GPIO16)?((volatile uint32_t*) &GP16I):((volatile uint32_t*) &GPI)
#define portModeRegister(port) (port==_PORT_GPIO16)?((volatile uint32_t*) &GP16E):((volatile uint32_t*) &GPE)
#define portOutputRegister(port) ((port)==_PORT_GPIO16)?((volatile uint32_t*) &GP16O):((volatile uint32_t*) &GPO)
#define portInputRegister(port) ((port)==_PORT_GPIO16)?((volatile uint32_t*) &GP16I):((volatile uint32_t*) &GPI)
#define portModeRegister(port) ((port)==_PORT_GPIO16)?((volatile uint32_t*) &GP16E):((volatile uint32_t*) &GPE)

#define NOT_A_PIN -1
#define NOT_A_PORT -1
Expand Down
0