Switch SD2cadrLib to fastio

Replace all fastDigitalRead/Write() with READ/WRITE()

Define SCK_PIN, MISO_PIN, MOSI_PIN in pins.h if not already defined in the pins_*.h files.

Remove these conditional pin definitions from the pin-files. They are now always defined.

Define separate sets of SPI-pins for AT90USB with and without Teensy support in fastio.h.
Likely this was the main reason for all that confusion about the AT90USB-SPI pins.
This commit is contained in:
AnHardt
2016-07-27 12:40:44 +02:00
parent 9f1dd6d431
commit e4942d2163
18 changed files with 42 additions and 544 deletions

View File

@ -2047,11 +2047,6 @@
#endif
#if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
// SPI
#define SCK DIO9
#define MISO DIO11
#define MOSI DIO10
#define SS DIO8
// change for your board
#define DEBUG_LED DIO31 /* led D5 red */
@ -2063,6 +2058,12 @@
//#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
// SPI
#define SCK DIO9 // 21
#define MISO DIO11 // 23
#define MOSI DIO10 // 22
#define SS DIO8 // 20
#define DIO0_PIN PINA0
#define DIO0_RPORT PINA
#define DIO0_WPORT PORTA
@ -2707,6 +2708,12 @@
The pins 46 and 47 are not supported by Teensyduino, but are supported below.
*/
// SPI
#define SCK DIO21 // 9
#define MISO DIO23 // 11
#define MOSI DIO22 // 10
#define SS DIO20 // 8
#define DIO0_PIN PIND0
#define DIO0_RPORT PIND
#define DIO0_WPORT PORTD