Browse Source

Added support for Atmega 1281 chip

atfield90 9 years ago
parent
commit
d273c90d53
1 changed files with 70 additions and 1 deletions
  1. 70
    1
      Marlin/Sd2PinMap.h

+ 70
- 1
Marlin/Sd2PinMap.h View File

@@ -312,6 +312,75 @@ static const pin_map_t digitalPinMap[] = {
312 312
   {&DDRC, &PINC, &PORTC, 4},  // C4 18
313 313
   {&DDRC, &PINC, &PORTC, 5}   // C5 19
314 314
 };
315
+#elif defined(__AVR_ATmega1281__)
316
+// Waspmote
317
+ 
318
+// Two Wire (aka I2C) ports
319
+uint8_t const SDA_PIN = 41;
320
+uint8_t const SCL_PIN = 40;
321
+ 
322
+ 
323
+#undef MOSI_PIN
324
+#undef MISO_PIN
325
+// SPI port
326
+uint8_t const SS_PIN = 16;    // B0
327
+uint8_t const MOSI_PIN = 11;  // B2
328
+uint8_t const MISO_PIN = 12;  // B3
329
+uint8_t const SCK_PIN = 10;   // B1
330
+ 
331
+static const pin_map_t digitalPinMap[] = {
332
+    {&DDRE, &PINE, &PORTE, 0}, // E0 0
333
+    {&DDRE, &PINE, &PORTE, 1}, // E1 1
334
+    {&DDRE, &PINE, &PORTE, 3}, // E3 2
335
+    {&DDRE, &PINE, &PORTE, 4}, // E4 3
336
+    {&DDRC, &PINC, &PORTC, 4}, // C4 4
337
+    {&DDRC, &PINC, &PORTC, 5}, // C5 5
338
+    {&DDRC, &PINC, &PORTC, 6}, // C6 6
339
+    {&DDRC, &PINC, &PORTC, 7}, // C7 7
340
+    {&DDRA, &PINA, &PORTA, 2}, // A2 8
341
+    {&DDRA, &PINA, &PORTA, 3}, // A3 9
342
+    {&DDRA, &PINA, &PORTA, 4}, // A4 10
343
+    {&DDRD, &PIND, &PORTD, 5}, // D5 11
344
+    {&DDRD, &PIND, &PORTD, 6}, // D6 12
345
+    {&DDRC, &PINC, &PORTC, 1}, // C1 13
346
+    {&DDRF, &PINF, &PORTF, 1}, // F1 14
347
+    {&DDRF, &PINF, &PORTF, 2}, // F2 15
348
+    {&DDRF, &PINF, &PORTF, 3}, // F3 16
349
+    {&DDRF, &PINF, &PORTF, 4}, // F4 17
350
+    {&DDRF, &PINF, &PORTF, 5}, // F5 18
351
+    {&DDRF, &PINF, &PORTF, 6}, // F6 19
352
+    {&DDRF, &PINF, &PORTF, 7}, // F7 20
353
+    {&DDRF, &PINF, &PORTF, 0}, // F0 21
354
+    {&DDRA, &PINA, &PORTA, 1}, // A1 22
355
+    {&DDRD, &PIND, &PORTD, 7}, // D7 23
356
+    {&DDRE, &PINE, &PORTE, 5}, // E5 24
357
+    {&DDRA, &PINA, &PORTA, 6}, // A6 25
358
+    {&DDRE, &PINE, &PORTE, 2}, // E2 26
359
+    {&DDRA, &PINA, &PORTA, 5}, // A5 27
360
+    {&DDRC, &PINC, &PORTC, 0}, // C0 28
361
+    {&DDRB, &PINB, &PORTB, 0}, // B0 29
362
+    {&DDRB, &PINB, &PORTB, 1}, // B1 30
363
+    {&DDRB, &PINB, &PORTB, 2}, // B2 31
364
+    {&DDRB, &PINB, &PORTB, 3}, // B3 32
365
+    {&DDRB, &PINB, &PORTB, 4}, // B4 33
366
+    {&DDRB, &PINB, &PORTB, 5}, // B5 34
367
+    {&DDRA, &PINA, &PORTA, 0}, // A0 35
368
+    {&DDRB, &PINB, &PORTB, 6}, // B6 36
369
+    {&DDRB, &PINB, &PORTB, 7}, // B7 37
370
+    {&DDRE, &PINE, &PORTE, 6}, // E6 38
371
+    {&DDRE, &PINE, &PORTE, 7}, // E7 39
372
+    {&DDRD, &PIND, &PORTD, 0}, // D0 40
373
+    {&DDRD, &PIND, &PORTD, 1}, // D1 41
374
+    {&DDRC, &PINC, &PORTC, 3}, // C3 42
375
+    {&DDRD, &PIND, &PORTD, 2}, // D2 43
376
+    {&DDRD, &PIND, &PORTD, 3}, // D3 44
377
+    {&DDRA, &PINA, &PORTA, 7}, // A7 45
378
+    {&DDRC, &PINC, &PORTC, 2}, // C2 46
379
+    {&DDRD, &PIND, &PORTD, 4}, // D4 47
380
+    {&DDRG, &PING, &PORTG, 2}, // G2 48
381
+    {&DDRG, &PING, &PORTG, 1}, // G1 49
382
+    {&DDRG, &PING, &PORTG, 0}, // G0 50
383
+};
315 384
 #else  // defined(__AVR_ATmega1280__)
316 385
 #error unknown chip
317 386
 #endif  // defined(__AVR_ATmega1280__)
@@ -364,4 +433,4 @@ static inline __attribute__((always_inline))
364 433
 #endif  // Sd2PinMap_h
365 434
 
366 435
 
367
-#endif
436
+#endif

Loading…
Cancel
Save