mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
No need to __ARDUINO_X86__ to have it's own entry
This commit is contained in:
parent
cc1023c2ac
commit
4ab24d9973
1 changed files with 3 additions and 5 deletions
|
@ -78,12 +78,10 @@ typedef SPi< Pb1, Pb2, Pb3, Pb0 > spi;
|
||||||
typedef SPi< Pb5, Pb3, Pb4, Pb2 > spi;
|
typedef SPi< Pb5, Pb3, Pb4, Pb2 > spi;
|
||||||
#elif 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;
|
typedef SPi< Pb7, Pb5, Pb6, Pb4 > spi;
|
||||||
#elif defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))
|
#elif (defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))) || defined(__ARDUINO_X86__)
|
||||||
typedef SPi< P13, P11, P12, P10 > spi;
|
typedef SPi< P13, P11, P12, P10 > spi;
|
||||||
#elif defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)
|
#elif defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)
|
||||||
typedef SPi< P76, P75, P74, P10 > spi;
|
typedef SPi< P76, P75, P74, P10 > spi;
|
||||||
#elif defined(__ARDUINO_X86__)
|
|
||||||
typedef SPi< P13, P11, P12, P10 > spi;
|
|
||||||
#else
|
#else
|
||||||
#error "No SPI entry in usbhost.h"
|
#error "No SPI entry in usbhost.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -190,7 +188,7 @@ uint8_t* MAX3421e< SPI_SS, INTR >::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t*
|
||||||
spi4teensy3::send(reg | 0x02);
|
spi4teensy3::send(reg | 0x02);
|
||||||
spi4teensy3::send(data_p, nbytes);
|
spi4teensy3::send(data_p, nbytes);
|
||||||
data_p += nbytes;
|
data_p += nbytes;
|
||||||
#elif (defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__))
|
#elif defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)
|
||||||
SPI.transfer(reg | 0x02);
|
SPI.transfer(reg | 0x02);
|
||||||
while(nbytes) {
|
while(nbytes) {
|
||||||
SPI.transfer(*data_p);
|
SPI.transfer(*data_p);
|
||||||
|
@ -283,7 +281,7 @@ uint8_t* MAX3421e< SPI_SS, INTR >::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t*
|
||||||
spi4teensy3::send(reg);
|
spi4teensy3::send(reg);
|
||||||
spi4teensy3::receive(data_p, nbytes);
|
spi4teensy3::receive(data_p, nbytes);
|
||||||
data_p += nbytes;
|
data_p += nbytes;
|
||||||
#elif (defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__))
|
#elif defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)
|
||||||
SPI.transfer(reg);
|
SPI.transfer(reg);
|
||||||
while(nbytes) {
|
while(nbytes) {
|
||||||
*data_p++ = SPI.transfer(0);
|
*data_p++ = SPI.transfer(0);
|
||||||
|
|
Loading…
Reference in a new issue