diff --git a/avrpins.h b/avrpins.h index fd4fdf39..5eb679fb 100644 --- a/avrpins.h +++ b/avrpins.h @@ -613,7 +613,7 @@ public: // Arduino Leonardo pin numbers #elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) -// Teensy++ 2.0 pin numbers +// Teensy++ 1.0 and 2.0 pin numbers // http://www.pjrc.com/teensy/pinout.html #define P0 Pd0 #define P1 Pd1 @@ -661,7 +661,7 @@ public: #define P43 Pf5 #define P44 Pf6 #define P45 Pf7 -// Teensy++ 2.0 +// Teensy++ 1.0 and 2.0 #elif defined(ARDUINO_AVR_BALANDUINO) && (defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284P__)) // Balanduino pin numbers @@ -738,6 +738,9 @@ public: #define P31 Pa7 // Sanguino +#else +#error "Please define board in avrpins.h" + #endif // Arduino pin definitions #endif // __AVR__ diff --git a/usbhost.h b/usbhost.h index 04341923..26b8036f 100644 --- a/usbhost.h +++ b/usbhost.h @@ -44,15 +44,14 @@ public: /* SPI pin definitions. see avrpins.h */ #if defined(__AVR_ATmega1280__) || (__AVR_ATmega2560__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) typedef SPi< Pb1, Pb2, Pb3, Pb0 > spi; -#endif -#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) typedef SPi< Pb5, Pb3, Pb4, Pb2 > spi; -#endif -#if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) +#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) typedef SPi< Pb7, Pb5, Pb6, Pb4 > spi; -#endif -#if defined(__MK20DX128__) +#elif defined(__MK20DX128__) typedef SPi< P13, P11, P12, P10 > spi; +#else +#error "No SPI entry in usbhost.h" #endif typedef enum {