Make compatible with Heltec's CubeCell Arduino-core
The functions fast pin-I/O uses are currently missing, so don't define BUSIO_USE_FAST_PINIO. Also, we need typedef for BitOrder, but it refuses to compile without also including Arduino.h, at least under PlatformIO.
This commit is contained in:
parent
bbb893f51d
commit
031e1c2d31
|
|
@ -26,6 +26,14 @@ typedef enum _BitOrder {
|
||||||
SPI_BITORDER_LSBFIRST = SPI_LSBFIRST,
|
SPI_BITORDER_LSBFIRST = SPI_LSBFIRST,
|
||||||
} BitOrder;
|
} BitOrder;
|
||||||
|
|
||||||
|
#elif defined(__ASR6501__)
|
||||||
|
#include <Arduino.h>
|
||||||
|
typedef enum _BitOrder
|
||||||
|
{
|
||||||
|
SPI_BITORDER_MSBFIRST = MSBFIRST,
|
||||||
|
SPI_BITORDER_LSBFIRST = LSBFIRST,
|
||||||
|
} BitOrder;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// Some platforms have a BitOrder enum but its named MSBFIRST/LSBFIRST
|
// Some platforms have a BitOrder enum but its named MSBFIRST/LSBFIRST
|
||||||
#define SPI_BITORDER_MSBFIRST MSBFIRST
|
#define SPI_BITORDER_MSBFIRST MSBFIRST
|
||||||
|
|
@ -47,7 +55,9 @@ typedef uint32_t BusIO_PortMask;
|
||||||
!defined(ARDUINO_ARCH_MBED)
|
!defined(ARDUINO_ARCH_MBED)
|
||||||
typedef volatile uint32_t BusIO_PortReg;
|
typedef volatile uint32_t BusIO_PortReg;
|
||||||
typedef uint32_t BusIO_PortMask;
|
typedef uint32_t BusIO_PortMask;
|
||||||
|
#if not defined(__ASR6501__)
|
||||||
#define BUSIO_USE_FAST_PINIO
|
#define BUSIO_USE_FAST_PINIO
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#undef BUSIO_USE_FAST_PINIO
|
#undef BUSIO_USE_FAST_PINIO
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue