From a0fcb66c20ba3fca8f2fbb240df289faee9af7c3 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 18 Dec 2020 10:00:01 +0100 Subject: [PATCH] Fix all warnings Fixes https://github.com/arduino/ArduinoCore-samd/issues/581 --- cores/arduino/Arduino.h | 1 + cores/arduino/USB/USBCore.cpp | 1 - cores/arduino/USB/samd21_host.c | 1 - libraries/SPI/SPI.h | 3 ++- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 8dcd4f0d0..199e65e22 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -31,6 +31,7 @@ extern "C"{ #endif // __cplusplus // Include Atmel headers +#undef LITTLE_ENDIAN #include #define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) diff --git a/cores/arduino/USB/USBCore.cpp b/cores/arduino/USB/USBCore.cpp index e6f33cf94..be0bb5612 100644 --- a/cores/arduino/USB/USBCore.cpp +++ b/cores/arduino/USB/USBCore.cpp @@ -230,7 +230,6 @@ bool USBDeviceClass::sendDescriptor(USBSetup &setup) else if (setup.wValueL == ISERIAL) { char name[ISERIAL_MAX_LEN]; memset(name, 0, sizeof(name)); - uint8_t idx = 0; #ifdef PLUGGABLE_USB_ENABLED PluggableUSB().getShortName(name); return sendStringDescriptor((uint8_t*)name, setup.wLength); diff --git a/cores/arduino/USB/samd21_host.c b/cores/arduino/USB/samd21_host.c index 4066d62f5..ef6a0b20d 100644 --- a/cores/arduino/USB/samd21_host.c +++ b/cores/arduino/USB/samd21_host.c @@ -25,7 +25,6 @@ #include "variant.h" #include "USB_host.h" #include "samd21_host.h" -#include "sam.h" #include "wiring_private.h" #define HOST_DEFINED diff --git a/libraries/SPI/SPI.h b/libraries/SPI/SPI.h index fcb56ca8a..5a266f70d 100644 --- a/libraries/SPI/SPI.h +++ b/libraries/SPI/SPI.h @@ -28,7 +28,8 @@ // - endTransaction() // - usingInterrupt() // - SPISetting(clock, bitOrder, dataMode) -#define SPI_HAS_TRANSACTION 1 +// #define SPI_HAS_TRANSACTION 1 +// Every core implementing arduino API has SPI transaction // SPI_HAS_NOTUSINGINTERRUPT means that SPI has notUsingInterrupt() method #define SPI_HAS_NOTUSINGINTERRUPT 1