Skip to content

Commit 337e0b7

Browse files
committed
[RUMBA32_F446VE] Avoid duplicated analog pins
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 2eaa5da commit 337e0b7

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

Diff for: variants/RUMBA32_F446VE/variant.cpp

+12-10
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,18 @@ const PinName digitalPin[] = {
103103
PE_12, //D76
104104
PE_13, //D77
105105
PE_14, //D78
106-
PE_15, //D79
107-
108-
//Duplicated ADC Pins
109-
PA_3, //D80/A0
110-
PA_4, //D81/A1
111-
PC_0, //D82/A2
112-
PC_1, //D83/A3
113-
PC_2, //D84/A4
114-
PC_3, //D85/A5
115-
PC_4 //D86/A6
106+
PE_15 //D79
107+
};
108+
109+
// Analog (Ax) pin number array
110+
const uint32_t analogInPin[] = {
111+
3, //A0
112+
4, //A1
113+
32, //A2
114+
33, //A3
115+
34, //A4
116+
35, //A5
117+
36 //A6
116118
};
117119

118120
#ifdef __cplusplus

Diff for: variants/RUMBA32_F446VE/variant.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ extern "C" {
3030
#define PA0 0 //D0
3131
#define PA1 1 //D1
3232
#define PA2 2 //D2
33-
#define PA3 3 //D3
34-
#define PA4 4 //D4
33+
#define PA3 A0 //D3
34+
#define PA4 A1 //D4
3535
#define PA5 5 //D5
3636
#define PA6 6 //D6
3737
#define PA7 7 //D7
@@ -59,11 +59,11 @@ extern "C" {
5959
#define PB13 29 //D29
6060
#define PB14 30 //D30
6161
#define PB15 31 //D31
62-
#define PC0 32 //D32
63-
#define PC1 33 //D33
64-
#define PC2 34 //D34
65-
#define PC3 35 //D35
66-
#define PC4 36 //D36
62+
#define PC0 A2 //D32
63+
#define PC1 A3 //D33
64+
#define PC2 A4 //D34
65+
#define PC3 A5 //D35
66+
#define PC4 A6 //D36
6767
#define PC5 37 //D37
6868
#define PC6 38 //D38
6969
#define PC7 39 //D39
@@ -108,11 +108,10 @@ extern "C" {
108108
#define PE14 78 //D78
109109
#define PE15 79 //D79
110110

111-
// This must be a literal with the same value as PEND
112-
#define NUM_DIGITAL_PINS 87
111+
// This must be a literal
112+
#define NUM_DIGITAL_PINS 80
113113
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
114114
#define NUM_ANALOG_INPUTS 7
115-
#define NUM_ANALOG_FIRST 80
116115

117116
// PWM resolution
118117
#define PWM_FREQUENCY 20000 // >= 20 Khz => inaudible noise for fans

0 commit comments

Comments
 (0)