Skip to content

Commit 20db180

Browse files
committed
[BLUE_F407VE] Avoid duplicated analog pins
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 98062dc commit 20db180

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

Diff for: variants/BLUE_F407VE_Mini/variant.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,24 @@ const PinName digitalPin[] = {
149149
PC_5
150150
};
151151

152+
// Analog (Ax) pin number array
153+
const uint32_t analogInPin[] = {
154+
7, //A0
155+
8, //A1
156+
49, //A2
157+
50, //A3
158+
9, //A4
159+
51, //A5
160+
12, //A6
161+
54, //A7
162+
5, //A8
163+
47, //A9
164+
6, //A10
165+
48, //A11
166+
11, //A12
167+
53 //A13
168+
};
169+
152170
#ifdef __cplusplus
153171
}
154172
#endif

Diff for: variants/BLUE_F407VE_Mini/variant.h

+15-16
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ extern "C" {
4747
#define PE4 2
4848
#define PE6 3
4949
#define PC14 4 // OSC32_IN
50-
#define PC0 5 // A8
51-
#define PC2 6 // A10
52-
#define PA0 7 // A0
53-
#define PA1 8 // A1
54-
#define PA4 9 // A4
50+
#define PC0 A8
51+
#define PC2 A10
52+
#define PA0 A0
53+
#define PA1 A1
54+
#define PA4 A4
5555
#define PA6 10
56-
#define PC4 11 // A12
57-
#define PB0 12 // A6
56+
#define PC4 A12
57+
#define PB0 A6
5858
#define PB2 13
5959
#define PE8 14
6060
#define PE9 15
@@ -96,14 +96,14 @@ extern "C" {
9696
#define PE5 44
9797
#define PC13 45
9898
#define PC15 46 // OSC32_OUT
99-
#define PC1 47 // A9
100-
#define PC3 48 // A11
101-
#define PA2 49 // A2
102-
#define PA3 50 // A3
103-
#define PA5 51 // A5
99+
#define PC1 A9
100+
#define PC3 A11
101+
#define PA2 A2
102+
#define PA3 A3
103+
#define PA5 A5
104104
#define PA7 52
105-
#define PC5 53 // A13
106-
#define PB1 54 // A7
105+
#define PC5 A13
106+
#define PB1 A7
107107
#define PE7 55
108108
#define PE10 56
109109
#define PE12 57
@@ -135,10 +135,9 @@ extern "C" {
135135
// GND
136136

137137
// This must be a literal
138-
#define NUM_DIGITAL_PINS 94
138+
#define NUM_DIGITAL_PINS 80
139139
// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS
140140
#define NUM_ANALOG_INPUTS 14
141-
#define NUM_ANALOG_FIRST 80
142141

143142
// On-board LED pin number
144143
#define LED_BUILTIN PB9

0 commit comments

Comments
 (0)