File tree 1 file changed +34
-1
lines changed
1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ extern "C" {
86
86
#define NUM_DIGITAL_PINS 50
87
87
#define NUM_ANALOG_INPUTS 16
88
88
#define NUM_ANALOG_FIRST 0
89
- #define MAX_ANALOG_INPUTS 15
90
89
#define AEND 36
91
90
92
91
// On-board LED pin number
@@ -96,6 +95,40 @@ extern "C" {
96
95
// On-board user button
97
96
#define USER_BTN PC13
98
97
98
+ // Analog pin definitions
99
+ #define PIN_A0 PA0
100
+ #define PIN_A1 PA1
101
+ #define PIN_A2 PA2
102
+ #define PIN_A3 PA3
103
+ #define PIN_A4 PA4
104
+ #define PIN_A5 PA5
105
+ #define PIN_A6 PA6
106
+ #define PIN_A7 PA7
107
+ #define PIN_A8 PB0
108
+ #define PIN_A9 PB1
109
+ #define PIN_A10 PC0
110
+ #define PIN_A11 PC1
111
+ #define PIN_A12 PC2
112
+ #define PIN_A13 PC3
113
+ #define PIN_A14 PC4
114
+ #define PIN_A15 PC5
115
+
116
+ // Convert analog channel, analog pin or digital pin to digital pin
117
+ #define analogInputToDigitalPin (p ) ((p <= 7) ? (p) : (p <= 9) ? (p + 8) : (p <= 15) ? (p + 21) : (p))
118
+
119
+ // SPI definitions
120
+ #define PIN_SPI_SS PA4
121
+ #define PIN_SPI_SS1 PA4
122
+ #define PIN_SPI_SS2 PB12
123
+ #define PIN_SPI_SS3 PA15
124
+ #define PIN_SPI_MOSI PA7
125
+ #define PIN_SPI_MISO PA6
126
+ #define PIN_SPI_SCK PA5
127
+
128
+ // I2C definitions
129
+ #define PIN_WIRE_SDA PB9
130
+ #define PIN_WIRE_SCL PB8
131
+
99
132
// Timer Definitions
100
133
#define TIMER_TONE TIM10
101
134
#define TIMER_SERVO TIM11
You can’t perform that action at this time.
0 commit comments