Bob-the-Kuhn пре 7 година
родитељ
комит
b6415dc169
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6
    6
      Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp

+ 6
- 6
Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp Прегледај датотеку

@@ -205,18 +205,18 @@
205 205
     PinCfg.Funcnum = 2;
206 206
     PinCfg.OpenDrain = 0;
207 207
     PinCfg.Pinmode = 0;
208
-    PinCfg.Pinnum = pin_map[SCK_PIN].pin;
209
-    PinCfg.Portnum = pin_map[SCK_PIN].port;
208
+  PinCfg.Pinnum = LPC1768_PIN_PIN(SCK_PIN);
209
+PinCfg.Portnum = LPC1768_PIN_PORT(SCK_PIN);
210 210
     PINSEL_ConfigPin(&PinCfg);
211 211
     SET_OUTPUT(SCK_PIN);
212 212
 
213
-    PinCfg.Pinnum = pin_map[MISO_PIN].pin;
214
-    PinCfg.Portnum = pin_map[MISO_PIN].port;
213
+PinCfg.Pinnum = LPC1768_PIN_PIN(MISO_PIN);
214
+PinCfg.Portnum = LPC1768_PIN_PORT(MISO_PIN);
215 215
     PINSEL_ConfigPin(&PinCfg);
216 216
     SET_INPUT(MISO_PIN);
217 217
 
218
-    PinCfg.Pinnum = pin_map[MOSI_PIN].pin;
219
-    PinCfg.Portnum = pin_map[MOSI_PIN].port;
218
+    PinCfg.Pinnum = LPC1768_PIN_PIN(MOSI_PIN);
219
+    PinCfg.Portnum = LPC1768_PIN_PORT(MOSI_PIN);
220 220
     PINSEL_ConfigPin(&PinCfg);
221 221
     SET_OUTPUT(MOSI_PIN);
222 222
   }

Loading…
Откажи
Сачувај