Browse Source

Define STM32F1 GPIO for the preprocessor (#14785)

Tanguy Pruvot 5 years ago
parent
commit
202d3ab3c9
1 changed files with 127 additions and 0 deletions
  1. 127
    0
      Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h

+ 127
- 0
Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h View File

@@ -56,3 +56,130 @@
56 56
 #define extDigitalRead(IO)    digitalRead(IO)
57 57
 #define extDigitalWrite(IO,V) digitalWrite(IO,V)
58 58
 
59
+//
60
+// Pins Definitions
61
+//
62
+#define PA0  0x00
63
+#define PA1  0x01
64
+#define PA2  0x02
65
+#define PA3  0x03
66
+#define PA4  0x04
67
+#define PA5  0x05
68
+#define PA6  0x06
69
+#define PA7  0x07
70
+#define PA8  0x08
71
+#define PA9  0x09
72
+#define PA10 0x0A
73
+#define PA11 0x0B
74
+#define PA12 0x0C
75
+#define PA13 0x0D
76
+#define PA14 0x0E
77
+#define PA15 0x0F
78
+
79
+#define PB0  0x10
80
+#define PB1  0x11
81
+#define PB2  0x12
82
+#define PB3  0x13
83
+#define PB4  0x14
84
+#define PB5  0x15
85
+#define PB6  0x16
86
+#define PB7  0x17 // 36 pins (F103T)
87
+#define PB8  0x18
88
+#define PB9  0x19
89
+#define PB10 0x1A
90
+#define PB11 0x1B
91
+#define PB12 0x1C
92
+#define PB13 0x1D
93
+#define PB14 0x1E
94
+#define PB15 0x1F
95
+
96
+#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
97
+  #define PC13 0x20
98
+  #define PC14 0x21
99
+  #define PC15 0x22
100
+#else
101
+  #define PC0  0x20
102
+  #define PC1  0x21
103
+  #define PC2  0x22
104
+  #define PC3  0x23
105
+  #define PC4  0x24
106
+  #define PC5  0x25
107
+  #define PC6  0x26
108
+  #define PC7  0x27
109
+  #define PC8  0x28
110
+  #define PC9  0x29
111
+  #define PC10 0x2A
112
+  #define PC11 0x2B
113
+  #define PC12 0x2C
114
+  #define PC13 0x2D
115
+  #define PC14 0x2E
116
+  #define PC15 0x2F
117
+#endif
118
+
119
+#define PD0  0x30
120
+#define PD1  0x31
121
+#define PD2  0x32 // 64 pins (F103R)
122
+#define PD3  0x33
123
+#define PD4  0x34
124
+#define PD5  0x35
125
+#define PD6  0x36
126
+#define PD7  0x37
127
+#define PD8  0x38
128
+#define PD9  0x39
129
+#define PD10 0x3A
130
+#define PD11 0x3B
131
+#define PD12 0x3C
132
+#define PD13 0x3D
133
+#define PD14 0x3E
134
+#define PD15 0x3F
135
+
136
+#define PE0  0x40
137
+#define PE1  0x41
138
+#define PE2  0x42
139
+#define PE3  0x43
140
+#define PE4  0x44
141
+#define PE5  0x45
142
+#define PE6  0x46
143
+#define PE7  0x47
144
+#define PE8  0x48
145
+#define PE9  0x49
146
+#define PE10 0x4A
147
+#define PE11 0x4B
148
+#define PE12 0x4C
149
+#define PE13 0x4D
150
+#define PE14 0x4E
151
+#define PE15 0x4F // 100 pins (F103V)
152
+
153
+#define PF0  0x50
154
+#define PF1  0x51
155
+#define PF2  0x52
156
+#define PF3  0x53
157
+#define PF4  0x54
158
+#define PF5  0x55
159
+#define PF6  0x56
160
+#define PF7  0x57
161
+#define PF8  0x58
162
+#define PF9  0x59
163
+#define PF10 0x5A
164
+#define PF11 0x5B
165
+#define PF12 0x5C
166
+#define PF13 0x5D
167
+#define PF14 0x5E
168
+#define PF15 0x5F
169
+
170
+#define PG0  0x60
171
+#define PG1  0x61
172
+#define PG2  0x62
173
+#define PG3  0x63
174
+#define PG4  0x64
175
+#define PG5  0x65
176
+#define PG6  0x66
177
+#define PG7  0x67
178
+#define PG8  0x68
179
+#define PG9  0x69
180
+#define PG10 0x6A
181
+#define PG11 0x6B
182
+#define PG12 0x6C
183
+#define PG13 0x6D
184
+#define PG14 0x6E
185
+#define PG15 0x6F // 144 pins (F103Z)

Loading…
Cancel
Save