Skip to content

Commit bc5febd

Browse files
committed
Introduce all alternative pins per peripheral
- Alternate pins (PY_n_ALTx) - Dual pad pins (PY_n_C) - Remap pins (PY_n_R) Signed-off-by: Frederic Pillon <[email protected]>
1 parent 946b68b commit bc5febd

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

cores/arduino/stm32/PinNames.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@
88
extern "C" {
99
#endif
1010

11+
// Alternative possibilities which use other HW peripheral instances
12+
#define ALT0 0x000
13+
#define ALT1 0x100
14+
#define ALT2 0x200
15+
#define ALT3 0x300
16+
#define ALT4 0x400
17+
#define ALT5 0x500
18+
#define ALT6 0x600
19+
#define ALT7 0x700
20+
21+
// Specific pins
22+
// Dual pad pin
23+
// Direct channels are connected to analog I/Os
24+
// (PY_C) to optimize ADC performance.
25+
#define PDUAL 0x2000
26+
// Remap pin
27+
#define PREMAP 0x3000
28+
// PinName mask
29+
#define PNAME_MASK 0xFF
30+
1131
typedef enum {
1232
// Not connected
1333
NC = (int)0xFFFFFFFF,

keywords.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,17 @@ PADC_TEMP LITERAL1
726726
PADC_VREF LITERAL1
727727
PADC_VBAT LITERAL1
728728

729+
ALT0 LITERAL1
730+
ALT1 LITERAL1
731+
ALT2 LITERAL1
732+
ALT3 LITERAL1
733+
ALT4 LITERAL1
734+
ALT5 LITERAL1
735+
ALT6 LITERAL1
736+
ALT7 LITERAL1
737+
PDUAL LITERAL1
738+
PREMAP LITERAL1
739+
729740
# Port Name
730741
PortName KEYWORD3
731742
FirstPort

0 commit comments

Comments
 (0)