Skip to content

Commit 51f0492

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 9dc1e91 commit 51f0492

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

cores/arduino/stm32/PinNames.h

+19
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88
extern "C" {
99
#endif
1010

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

keywords.txt

+10
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,16 @@ 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+
PDUAL LITERAL1
737+
PREMAP LITERAL1
738+
729739
# Port Name
730740
PortName KEYWORD3
731741
FirstPort

0 commit comments

Comments
 (0)