mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed pgm_read_ptr_aligned macro for the ESP8266 platform
See: https://github.com/esp8266/Arduino/pull/5735
This commit is contained in:
parent
0ecc486fee
commit
b3fa5718d5
1 changed files with 10 additions and 0 deletions
|
@ -157,6 +157,16 @@ e-mail : support@circuitsathome.com
|
|||
#define fprintf_P(s, ...) ((s), __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
// Workaround the following issue: https://github.com/esp8266/Arduino/pull/5735
|
||||
#undef pgm_read_ptr_aligned
|
||||
#ifdef __cplusplus
|
||||
#define pgm_read_ptr_aligned(addr) (*reinterpret_cast<const void* const*>(addr))
|
||||
#else
|
||||
#define pgm_read_ptr_aligned(addr) (*(const void* const*)(addr))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef pgm_read_byte
|
||||
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue