mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
changes to support seeed xiao esp32s3
This commit is contained in:
parent
5ad684867f
commit
f81d4a39f5
2 changed files with 43 additions and 0 deletions
|
@ -48,6 +48,8 @@ typedef MAX3421e<P20, P19> MAX3421E; // Balanduino
|
||||||
typedef MAX3421e<P3, P2> MAX3421E; // The Intel Galileo supports much faster read and write speed at pin 2 and 3
|
typedef MAX3421e<P3, P2> MAX3421E; // The Intel Galileo supports much faster read and write speed at pin 2 and 3
|
||||||
#elif defined(ESP8266)
|
#elif defined(ESP8266)
|
||||||
typedef MAX3421e<P15, P5> MAX3421E; // ESP8266 boards
|
typedef MAX3421e<P15, P5> MAX3421E; // ESP8266 boards
|
||||||
|
#elif defined(ARDUINO_XIAO_ESP32S3)
|
||||||
|
typedef MAX3421e<P44, P4> MAX3421E; // ESP32 XIAO boards
|
||||||
#elif defined(ESP32)
|
#elif defined(ESP32)
|
||||||
typedef MAX3421e<P5, P17> MAX3421E; // ESP32 boards
|
typedef MAX3421e<P5, P17> MAX3421E; // ESP32 boards
|
||||||
#elif defined(MIGHTYCORE)
|
#elif defined(MIGHTYCORE)
|
||||||
|
|
41
avrpins.h
41
avrpins.h
|
@ -1661,6 +1661,47 @@ MAKE_PIN(P13, 13); // MOSI
|
||||||
MAKE_PIN(P14, 14); // SCK
|
MAKE_PIN(P14, 14); // SCK
|
||||||
MAKE_PIN(P15, 15); // SS
|
MAKE_PIN(P15, 15); // SS
|
||||||
|
|
||||||
|
#elif defined(ARDUINO_XIAO_ESP32S3)
|
||||||
|
|
||||||
|
// Workaround strict-aliasing warnings
|
||||||
|
#ifdef pgm_read_word
|
||||||
|
#undef pgm_read_word
|
||||||
|
#endif
|
||||||
|
#ifdef pgm_read_dword
|
||||||
|
#undef pgm_read_dword
|
||||||
|
#endif
|
||||||
|
#ifdef pgm_read_float
|
||||||
|
#undef pgm_read_float
|
||||||
|
#endif
|
||||||
|
#ifdef pgm_read_ptr
|
||||||
|
#undef pgm_read_ptr
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define pgm_read_word(addr) ({ \
|
||||||
|
typeof(addr) _addr = (addr); \
|
||||||
|
*(const unsigned short *)(_addr); \
|
||||||
|
})
|
||||||
|
#define pgm_read_dword(addr) ({ \
|
||||||
|
typeof(addr) _addr = (addr); \
|
||||||
|
*(const unsigned long *)(_addr); \
|
||||||
|
})
|
||||||
|
#define pgm_read_float(addr) ({ \
|
||||||
|
typeof(addr) _addr = (addr); \
|
||||||
|
*(const float *)(_addr); \
|
||||||
|
})
|
||||||
|
#define pgm_read_ptr(addr) ({ \
|
||||||
|
typeof(addr) _addr = (addr); \
|
||||||
|
*(void * const *)(_addr); \
|
||||||
|
})
|
||||||
|
|
||||||
|
// Pinout for ESP32 dev module
|
||||||
|
|
||||||
|
MAKE_PIN(P8, 8); // MISO
|
||||||
|
MAKE_PIN(P9, 9); // MOSI
|
||||||
|
MAKE_PIN(P7, 7); // SCK
|
||||||
|
MAKE_PIN(P44, 44); // SS
|
||||||
|
MAKE_PIN(P4, 4); // INT
|
||||||
|
|
||||||
#elif defined(ESP32)
|
#elif defined(ESP32)
|
||||||
|
|
||||||
// Workaround strict-aliasing warnings
|
// Workaround strict-aliasing warnings
|
||||||
|
|
Loading…
Reference in a new issue