|
116 | 116 | // |
117 | 117 | // ADC Reference Voltage |
118 | 118 | // |
119 | | -#define ADC_REFERENCE_VOLTAGE 2.5 // 2.5V reference VDDA |
120 | | - |
121 | | -// |
122 | | -// MicroSD card |
123 | | -// |
124 | | -#define SD_MOSI_PIN 23 |
125 | | -#define SD_MISO_PIN 19 |
126 | | -#define SD_SCK_PIN 18 |
127 | | -#define SDSS 5 |
128 | | -#define SD_DETECT_PIN 34 // IO34 default is SD_DET signal (Jump to SDDET) |
129 | | -#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers |
| 119 | +#define ADC_REFERENCE_VOLTAGE 2.5 // 2.5V reference VDDA |
130 | 120 |
|
131 | 121 | /** |
132 | 122 | * ------ ------ |
|
157 | 147 | #define EXP2_09_PIN 18 |
158 | 148 | #define EXP2_10_PIN 19 |
159 | 149 |
|
160 | | -#if HAS_WIRED_LCD |
| 150 | +// |
| 151 | +// MicroSD card |
| 152 | +// |
| 153 | +//#define SD_MOSI_PIN EXP2_05_PIN // uses esp32 default 23 |
| 154 | +//#define SD_MISO_PIN EXP2_10_PIN // uses esp32 default 19 |
| 155 | +//#define SD_SCK_PIN EXP2_09_PIN // uses esp32 default 18 |
| 156 | +#define SDSS EXP2_07_PIN |
| 157 | +#define SD_DETECT_PIN EXP2_04_PIN // IO34 default is SD_DET signal (Jump to SDDET) |
| 158 | +#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers |
161 | 159 |
|
162 | | - #define BEEPER_PIN 149 |
163 | | - #define BTN_ENC 13 |
164 | | - #define LCD_PINS_ENABLE 21 |
165 | | - #define LCD_PINS_RS 4 |
166 | | - #define BTN_EN1 14 |
167 | | - #define BTN_EN2 12 |
| 160 | +#if HAS_WIRED_LCD |
| 161 | + #define BEEPER_PIN EXP1_10_PIN |
| 162 | + #define LCD_PINS_ENABLE EXP1_08_PIN |
| 163 | + #define LCD_PINS_RS EXP1_07_PIN |
| 164 | + #define BTN_ENC EXP1_09_PIN |
| 165 | + #define BTN_EN1 EXP2_08_PIN |
| 166 | + #define BTN_EN2 EXP2_06_PIN |
168 | 167 | #define LCD_BACKLIGHT_PIN -1 |
169 | 168 |
|
170 | | - // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) |
171 | 169 | #if ENABLED(MKS_MINI_12864) |
172 | | - |
173 | | - //#define LCD_BACKLIGHT_PIN -1 |
174 | | - //#define LCD_RESET_PIN -1 |
175 | | - #define DOGLCD_A0 15 |
176 | | - #define DOGLCD_CS 16 |
177 | | - //#define DOGLCD_SCK 19 |
178 | | - //#define DOGLCD_MOSI 23 |
179 | | - |
180 | | - // Required for MKS_MINI_12864 with this board |
181 | | - //#define MKS_LCD12864B |
182 | | - |
183 | | - #elif ENABLED(MKS_MINI_12864_V3) |
184 | | - |
185 | | - #define LCD_PINS_DC EXP1_07_PIN |
| 170 | + // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) |
| 171 | + #define DOGLCD_CS EXP1_05_PIN |
| 172 | + #define DOGLCD_A0 EXP1_04_PIN |
| 173 | + #define LCD_RESET_PIN -1 |
| 174 | + #elif ENABLED(FYSETC_MINI_12864_2_1) |
| 175 | + // MKS_MINI_12864_V3, BTT_MINI_12864_V1, FYSETC_MINI_12864_2_1 |
186 | 176 | #define DOGLCD_CS EXP1_08_PIN |
187 | | - #define DOGLCD_A0 LCD_PINS_DC |
188 | | - #define LCD_BACKLIGHT_PIN -1 |
| 177 | + #define DOGLCD_A0 EXP1_07_PIN |
189 | 178 | #define LCD_RESET_PIN EXP1_06_PIN |
190 | 179 | #define NEOPIXEL_PIN EXP1_05_PIN |
191 | | - #define DOGLCD_MOSI EXP2_05_PIN |
192 | | - #define DOGLCD_SCK EXP2_09_PIN |
193 | 180 | #if SD_CONNECTION_IS(ONBOARD) |
194 | 181 | #define FORCE_SOFT_SPI |
195 | 182 | #endif |
196 | | - |
197 | | - #else // !MKS_MINI_12864 |
198 | | - |
199 | | - #define LCD_PINS_D4 0 |
| 183 | + #else |
| 184 | + #define LCD_PINS_D4 EXP1_06_PIN |
200 | 185 | #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) |
201 | | - #define LCD_PINS_D5 16 |
202 | | - #define LCD_PINS_D6 15 |
203 | | - #define LCD_PINS_D7 17 |
| 186 | + #define LCD_PINS_D5 EXP1_05_PIN |
| 187 | + #define LCD_PINS_D6 EXP1_04_PIN |
| 188 | + #define LCD_PINS_D7 EXP1_03_PIN |
204 | 189 | #endif |
205 | | - |
206 | 190 | #define BOARD_ST7920_DELAY_1 96 |
207 | 191 | #define BOARD_ST7920_DELAY_2 48 |
208 | 192 | #define BOARD_ST7920_DELAY_3 600 |
209 | | - |
210 | | - #endif // !MKS_MINI_12864 |
211 | | - |
| 193 | + #endif |
212 | 194 | #endif // HAS_WIRED_LCD |
0 commit comments