Reduce STM32_F4_F7 pin warnings
This commit is contained in:
parent
fb579212ea
commit
579e4396e2
1 changed files with 128 additions and 116 deletions
|
@ -27,8 +27,6 @@
|
||||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _BV(b) (1 << (b))
|
|
||||||
|
|
||||||
#define READ(IO) digitalRead(IO)
|
#define READ(IO) digitalRead(IO)
|
||||||
#define WRITE(IO,V) digitalWrite(IO,V)
|
#define WRITE(IO,V) digitalWrite(IO,V)
|
||||||
|
|
||||||
|
@ -66,127 +64,141 @@
|
||||||
|
|
||||||
#define _STM32_PIN(P,PN) ((PORT##P * 16) + PN)
|
#define _STM32_PIN(P,PN) ((PORT##P * 16) + PN)
|
||||||
|
|
||||||
#define PA0 _STM32_PIN(A, 0)
|
#ifndef PA0
|
||||||
#define PA1 _STM32_PIN(A, 1)
|
#define PA0 _STM32_PIN(A, 0)
|
||||||
#define PA2 _STM32_PIN(A, 2)
|
#define PA1 _STM32_PIN(A, 1)
|
||||||
#define PA3 _STM32_PIN(A, 3)
|
#define PA2 _STM32_PIN(A, 2)
|
||||||
#define PA4 _STM32_PIN(A, 4)
|
#define PA3 _STM32_PIN(A, 3)
|
||||||
#define PA5 _STM32_PIN(A, 5)
|
#define PA4 _STM32_PIN(A, 4)
|
||||||
#define PA6 _STM32_PIN(A, 6)
|
#define PA5 _STM32_PIN(A, 5)
|
||||||
#define PA7 _STM32_PIN(A, 7)
|
#define PA6 _STM32_PIN(A, 6)
|
||||||
#define PA8 _STM32_PIN(A, 8)
|
#define PA7 _STM32_PIN(A, 7)
|
||||||
#define PA9 _STM32_PIN(A, 9)
|
#define PA8 _STM32_PIN(A, 8)
|
||||||
#define PA10 _STM32_PIN(A, 10)
|
#define PA9 _STM32_PIN(A, 9)
|
||||||
#define PA11 _STM32_PIN(A, 11)
|
#define PA10 _STM32_PIN(A, 10)
|
||||||
#define PA12 _STM32_PIN(A, 12)
|
#define PA11 _STM32_PIN(A, 11)
|
||||||
#define PA13 _STM32_PIN(A, 13)
|
#define PA12 _STM32_PIN(A, 12)
|
||||||
#define PA14 _STM32_PIN(A, 14)
|
#define PA13 _STM32_PIN(A, 13)
|
||||||
#define PA15 _STM32_PIN(A, 15)
|
#define PA14 _STM32_PIN(A, 14)
|
||||||
|
#define PA15 _STM32_PIN(A, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PB0 _STM32_PIN(B, 0)
|
#ifndef PB0
|
||||||
#define PB1 _STM32_PIN(B, 1)
|
#define PB0 _STM32_PIN(B, 0)
|
||||||
#define PB2 _STM32_PIN(B, 2)
|
#define PB1 _STM32_PIN(B, 1)
|
||||||
#define PB3 _STM32_PIN(B, 3)
|
#define PB2 _STM32_PIN(B, 2)
|
||||||
#define PB4 _STM32_PIN(B, 4)
|
#define PB3 _STM32_PIN(B, 3)
|
||||||
#define PB5 _STM32_PIN(B, 5)
|
#define PB4 _STM32_PIN(B, 4)
|
||||||
#define PB6 _STM32_PIN(B, 6)
|
#define PB5 _STM32_PIN(B, 5)
|
||||||
#define PB7 _STM32_PIN(B, 7)
|
#define PB6 _STM32_PIN(B, 6)
|
||||||
#define PB8 _STM32_PIN(B, 8)
|
#define PB7 _STM32_PIN(B, 7)
|
||||||
#define PB9 _STM32_PIN(B, 9)
|
#define PB8 _STM32_PIN(B, 8)
|
||||||
#define PB10 _STM32_PIN(B, 10)
|
#define PB9 _STM32_PIN(B, 9)
|
||||||
#define PB11 _STM32_PIN(B, 11)
|
#define PB10 _STM32_PIN(B, 10)
|
||||||
#define PB12 _STM32_PIN(B, 12)
|
#define PB11 _STM32_PIN(B, 11)
|
||||||
#define PB13 _STM32_PIN(B, 13)
|
#define PB12 _STM32_PIN(B, 12)
|
||||||
#define PB14 _STM32_PIN(B, 14)
|
#define PB13 _STM32_PIN(B, 13)
|
||||||
#define PB15 _STM32_PIN(B, 15)
|
#define PB14 _STM32_PIN(B, 14)
|
||||||
|
#define PB15 _STM32_PIN(B, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PC0 _STM32_PIN(C, 0)
|
#ifndef PC0
|
||||||
#define PC1 _STM32_PIN(C, 1)
|
#define PC0 _STM32_PIN(C, 0)
|
||||||
#define PC2 _STM32_PIN(C, 2)
|
#define PC1 _STM32_PIN(C, 1)
|
||||||
#define PC3 _STM32_PIN(C, 3)
|
#define PC2 _STM32_PIN(C, 2)
|
||||||
#define PC4 _STM32_PIN(C, 4)
|
#define PC3 _STM32_PIN(C, 3)
|
||||||
#define PC5 _STM32_PIN(C, 5)
|
#define PC4 _STM32_PIN(C, 4)
|
||||||
#define PC6 _STM32_PIN(C, 6)
|
#define PC5 _STM32_PIN(C, 5)
|
||||||
#define PC7 _STM32_PIN(C, 7)
|
#define PC6 _STM32_PIN(C, 6)
|
||||||
#define PC8 _STM32_PIN(C, 8)
|
#define PC7 _STM32_PIN(C, 7)
|
||||||
#define PC9 _STM32_PIN(C, 9)
|
#define PC8 _STM32_PIN(C, 8)
|
||||||
#define PC10 _STM32_PIN(C, 10)
|
#define PC9 _STM32_PIN(C, 9)
|
||||||
#define PC11 _STM32_PIN(C, 11)
|
#define PC10 _STM32_PIN(C, 10)
|
||||||
#define PC12 _STM32_PIN(C, 12)
|
#define PC11 _STM32_PIN(C, 11)
|
||||||
#define PC13 _STM32_PIN(C, 13)
|
#define PC12 _STM32_PIN(C, 12)
|
||||||
#define PC14 _STM32_PIN(C, 14)
|
#define PC13 _STM32_PIN(C, 13)
|
||||||
#define PC15 _STM32_PIN(C, 15)
|
#define PC14 _STM32_PIN(C, 14)
|
||||||
|
#define PC15 _STM32_PIN(C, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PD0 _STM32_PIN(D, 0)
|
#ifndef PD0
|
||||||
#define PD1 _STM32_PIN(D, 1)
|
#define PD0 _STM32_PIN(D, 0)
|
||||||
#define PD2 _STM32_PIN(D, 2)
|
#define PD1 _STM32_PIN(D, 1)
|
||||||
#define PD3 _STM32_PIN(D, 3)
|
#define PD2 _STM32_PIN(D, 2)
|
||||||
#define PD4 _STM32_PIN(D, 4)
|
#define PD3 _STM32_PIN(D, 3)
|
||||||
#define PD5 _STM32_PIN(D, 5)
|
#define PD4 _STM32_PIN(D, 4)
|
||||||
#define PD6 _STM32_PIN(D, 6)
|
#define PD5 _STM32_PIN(D, 5)
|
||||||
#define PD7 _STM32_PIN(D, 7)
|
#define PD6 _STM32_PIN(D, 6)
|
||||||
#define PD8 _STM32_PIN(D, 8)
|
#define PD7 _STM32_PIN(D, 7)
|
||||||
#define PD9 _STM32_PIN(D, 9)
|
#define PD8 _STM32_PIN(D, 8)
|
||||||
#define PD10 _STM32_PIN(D, 10)
|
#define PD9 _STM32_PIN(D, 9)
|
||||||
#define PD11 _STM32_PIN(D, 11)
|
#define PD10 _STM32_PIN(D, 10)
|
||||||
#define PD12 _STM32_PIN(D, 12)
|
#define PD11 _STM32_PIN(D, 11)
|
||||||
#define PD13 _STM32_PIN(D, 13)
|
#define PD12 _STM32_PIN(D, 12)
|
||||||
#define PD14 _STM32_PIN(D, 14)
|
#define PD13 _STM32_PIN(D, 13)
|
||||||
#define PD15 _STM32_PIN(D, 15)
|
#define PD14 _STM32_PIN(D, 14)
|
||||||
|
#define PD15 _STM32_PIN(D, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PE0 _STM32_PIN(E, 0)
|
#ifndef PE0
|
||||||
#define PE1 _STM32_PIN(E, 1)
|
#define PE0 _STM32_PIN(E, 0)
|
||||||
#define PE2 _STM32_PIN(E, 2)
|
#define PE1 _STM32_PIN(E, 1)
|
||||||
#define PE3 _STM32_PIN(E, 3)
|
#define PE2 _STM32_PIN(E, 2)
|
||||||
#define PE4 _STM32_PIN(E, 4)
|
#define PE3 _STM32_PIN(E, 3)
|
||||||
#define PE5 _STM32_PIN(E, 5)
|
#define PE4 _STM32_PIN(E, 4)
|
||||||
#define PE6 _STM32_PIN(E, 6)
|
#define PE5 _STM32_PIN(E, 5)
|
||||||
#define PE7 _STM32_PIN(E, 7)
|
#define PE6 _STM32_PIN(E, 6)
|
||||||
#define PE8 _STM32_PIN(E, 8)
|
#define PE7 _STM32_PIN(E, 7)
|
||||||
#define PE9 _STM32_PIN(E, 9)
|
#define PE8 _STM32_PIN(E, 8)
|
||||||
#define PE10 _STM32_PIN(E, 10)
|
#define PE9 _STM32_PIN(E, 9)
|
||||||
#define PE11 _STM32_PIN(E, 11)
|
#define PE10 _STM32_PIN(E, 10)
|
||||||
#define PE12 _STM32_PIN(E, 12)
|
#define PE11 _STM32_PIN(E, 11)
|
||||||
#define PE13 _STM32_PIN(E, 13)
|
#define PE12 _STM32_PIN(E, 12)
|
||||||
#define PE14 _STM32_PIN(E, 14)
|
#define PE13 _STM32_PIN(E, 13)
|
||||||
#define PE15 _STM32_PIN(E, 15)
|
#define PE14 _STM32_PIN(E, 14)
|
||||||
|
#define PE15 _STM32_PIN(E, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STM32F7
|
#ifdef STM32F7
|
||||||
#define PORTF 5
|
|
||||||
#define PORTG 6
|
|
||||||
|
|
||||||
#define PF0 _STM32_PIN(F, 0)
|
#ifndef PF0
|
||||||
#define PF1 _STM32_PIN(F, 1)
|
#define PORTF 5
|
||||||
#define PF2 _STM32_PIN(F, 2)
|
#define PF0 _STM32_PIN(F, 0)
|
||||||
#define PF3 _STM32_PIN(F, 3)
|
#define PF1 _STM32_PIN(F, 1)
|
||||||
#define PF4 _STM32_PIN(F, 4)
|
#define PF2 _STM32_PIN(F, 2)
|
||||||
#define PF5 _STM32_PIN(F, 5)
|
#define PF3 _STM32_PIN(F, 3)
|
||||||
#define PF6 _STM32_PIN(F, 6)
|
#define PF4 _STM32_PIN(F, 4)
|
||||||
#define PF7 _STM32_PIN(F, 7)
|
#define PF5 _STM32_PIN(F, 5)
|
||||||
#define PF8 _STM32_PIN(F, 8)
|
#define PF6 _STM32_PIN(F, 6)
|
||||||
#define PF9 _STM32_PIN(F, 9)
|
#define PF7 _STM32_PIN(F, 7)
|
||||||
#define PF10 _STM32_PIN(F, 10)
|
#define PF8 _STM32_PIN(F, 8)
|
||||||
#define PF11 _STM32_PIN(F, 11)
|
#define PF9 _STM32_PIN(F, 9)
|
||||||
#define PF12 _STM32_PIN(F, 12)
|
#define PF10 _STM32_PIN(F, 10)
|
||||||
#define PF13 _STM32_PIN(F, 13)
|
#define PF11 _STM32_PIN(F, 11)
|
||||||
#define PF14 _STM32_PIN(F, 14)
|
#define PF12 _STM32_PIN(F, 12)
|
||||||
#define PF15 _STM32_PIN(F, 15)
|
#define PF13 _STM32_PIN(F, 13)
|
||||||
|
#define PF14 _STM32_PIN(F, 14)
|
||||||
|
#define PF15 _STM32_PIN(F, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PG0 _STM32_PIN(G, 0)
|
#ifndef PG0
|
||||||
#define PG1 _STM32_PIN(G, 1)
|
#define PORTG 6
|
||||||
#define PG2 _STM32_PIN(G, 2)
|
#define PG0 _STM32_PIN(G, 0)
|
||||||
#define PG3 _STM32_PIN(G, 3)
|
#define PG1 _STM32_PIN(G, 1)
|
||||||
#define PG4 _STM32_PIN(G, 4)
|
#define PG2 _STM32_PIN(G, 2)
|
||||||
#define PG5 _STM32_PIN(G, 5)
|
#define PG3 _STM32_PIN(G, 3)
|
||||||
#define PG6 _STM32_PIN(G, 6)
|
#define PG4 _STM32_PIN(G, 4)
|
||||||
#define PG7 _STM32_PIN(G, 7)
|
#define PG5 _STM32_PIN(G, 5)
|
||||||
#define PG8 _STM32_PIN(G, 8)
|
#define PG6 _STM32_PIN(G, 6)
|
||||||
#define PG9 _STM32_PIN(G, 9)
|
#define PG7 _STM32_PIN(G, 7)
|
||||||
#define PG10 _STM32_PIN(G, 10)
|
#define PG8 _STM32_PIN(G, 8)
|
||||||
#define PG11 _STM32_PIN(G, 11)
|
#define PG9 _STM32_PIN(G, 9)
|
||||||
#define PG12 _STM32_PIN(G, 12)
|
#define PG10 _STM32_PIN(G, 10)
|
||||||
#define PG13 _STM32_PIN(G, 13)
|
#define PG11 _STM32_PIN(G, 11)
|
||||||
#define PG14 _STM32_PIN(G, 14)
|
#define PG12 _STM32_PIN(G, 12)
|
||||||
#define PG15 _STM32_PIN(G, 15)
|
#define PG13 _STM32_PIN(G, 13)
|
||||||
|
#define PG14 _STM32_PIN(G, 14)
|
||||||
|
#define PG15 _STM32_PIN(G, 15)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // STM32GENERIC && STM32F7
|
#endif // STM32GENERIC && STM32F7
|
||||||
|
|
Reference in a new issue