Patch use of UNUSED
This commit is contained in:
parent
282c39e3d0
commit
2405ccb7ef
|
@ -45,6 +45,14 @@
|
||||||
#define _O2 __attribute__((optimize("O2")))
|
#define _O2 __attribute__((optimize("O2")))
|
||||||
#define _O3 __attribute__((optimize("O3")))
|
#define _O3 __attribute__((optimize("O3")))
|
||||||
|
|
||||||
|
#ifndef UNUSED
|
||||||
|
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
||||||
|
#define UNUSED(X) (void)X
|
||||||
|
#else
|
||||||
|
#define UNUSED(x) ((void)(x))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clock speed factors
|
// Clock speed factors
|
||||||
#if !defined(CYCLES_PER_MICROSECOND) && !defined(__STM32F1__)
|
#if !defined(CYCLES_PER_MICROSECOND) && !defined(__STM32F1__)
|
||||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000UL) // 16 or 20 on AVR
|
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000UL) // 16 or 20 on AVR
|
||||||
|
|
|
@ -47,7 +47,7 @@ void XPT2046::init() {
|
||||||
SET_INPUT(TOUCH_MISO_PIN);
|
SET_INPUT(TOUCH_MISO_PIN);
|
||||||
SET_OUTPUT(TOUCH_MOSI_PIN);
|
SET_OUTPUT(TOUCH_MOSI_PIN);
|
||||||
SET_OUTPUT(TOUCH_SCK_PIN);
|
SET_OUTPUT(TOUCH_SCK_PIN);
|
||||||
OUT_WRITE(TOUCH_CS_PIN, 1);
|
OUT_WRITE(TOUCH_CS_PIN, HIGH);
|
||||||
|
|
||||||
#if PIN_EXISTS(TOUCH_INT)
|
#if PIN_EXISTS(TOUCH_INT)
|
||||||
// Optional Pendrive interrupt pin
|
// Optional Pendrive interrupt pin
|
||||||
|
|
Loading…
Reference in a new issue