Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion libraries/I2S/src/I2S.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,20 @@ static I2SDevice_SAMD21G18x i2sd(*I2S);
#include "I2S.h"

#ifdef USE_TINYUSB
// For Serial when selecting TinyUSB
// For Serial when selecting TinyUSB (also causes the Arduino builder to link
// the TinyUSB library). Outside PlatformIO this include must stay plain and
// unconditional: the Arduino builder discovers the library from it, and its
// dependency-detection pass cannot parse a __has_include() expression.
#ifdef PLATFORMIO
// PlatformIO does not give framework-bundled libraries the lib_deps include
// paths, so the header can be unreachable here; skip it instead of failing.
#if !defined(__has_include) || __has_include(<Adafruit_TinyUSB.h>)
#include <Adafruit_TinyUSB.h>
#endif
#else
#include <Adafruit_TinyUSB.h>
#endif
#endif


int I2SClass::_beginCount = 0;
Expand Down
13 changes: 12 additions & 1 deletion libraries/SAMD_AnalogCorrection/src/SAMD_AnalogCorrection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@
#include "SAMD_AnalogCorrection.h"

#ifdef USE_TINYUSB
// For Serial when selecting TinyUSB
// For Serial when selecting TinyUSB (also causes the Arduino builder to link
// the TinyUSB library). Outside PlatformIO this include must stay plain and
// unconditional: the Arduino builder discovers the library from it, and its
// dependency-detection pass cannot parse a __has_include() expression.
#ifdef PLATFORMIO
// PlatformIO does not give framework-bundled libraries the lib_deps include
// paths, so the header can be unreachable here; skip it instead of failing.
#if !defined(__has_include) || __has_include(<Adafruit_TinyUSB.h>)
#include <Adafruit_TinyUSB.h>
#endif
#else
#include <Adafruit_TinyUSB.h>
#endif
#endif

void analogReadCorrection (int offset, uint16_t gain)
{
Expand Down
13 changes: 12 additions & 1 deletion libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,20 @@
#include <assert.h>

#ifdef USE_TINYUSB
// For Serial when selecting TinyUSB
// For Serial when selecting TinyUSB (also causes the Arduino builder to link
// the TinyUSB library). Outside PlatformIO this include must stay plain and
// unconditional: the Arduino builder discovers the library from it, and its
// dependency-detection pass cannot parse a __has_include() expression.
#ifdef PLATFORMIO
// PlatformIO does not give framework-bundled libraries the lib_deps include
// paths, so the header can be unreachable here; skip it instead of failing.
#if !defined(__has_include) || __has_include(<Adafruit_TinyUSB.h>)
#include <Adafruit_TinyUSB.h>
#endif
#else
#include <Adafruit_TinyUSB.h>
#endif
#endif

#define SPI_IMODE_NONE 0
#define SPI_IMODE_EXTINT 1
Expand Down
13 changes: 12 additions & 1 deletion libraries/Servo/src/samd/Servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,20 @@
#include <Servo.h>

#ifdef USE_TINYUSB
// For Serial when selecting TinyUSB
// For Serial when selecting TinyUSB (also causes the Arduino builder to link
// the TinyUSB library). Outside PlatformIO this include must stay plain and
// unconditional: the Arduino builder discovers the library from it, and its
// dependency-detection pass cannot parse a __has_include() expression.
#ifdef PLATFORMIO
// PlatformIO does not give framework-bundled libraries the lib_deps include
// paths, so the header can be unreachable here; skip it instead of failing.
#if !defined(__has_include) || __has_include(<Adafruit_TinyUSB.h>)
#include <Adafruit_TinyUSB.h>
#endif
#else
#include <Adafruit_TinyUSB.h>
#endif
#endif

#if defined(__SAMD51__)
// Different prescalers depending on FCPU (avoid overflowing 16-bit counter)
Expand Down
13 changes: 12 additions & 1 deletion libraries/Wire/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,20 @@ extern "C" {
#include <wiring_private.h>

#ifdef USE_TINYUSB
// For Serial when selecting TinyUSB
// For Serial when selecting TinyUSB (also causes the Arduino builder to link
// the TinyUSB library). Outside PlatformIO this include must stay plain and
// unconditional: the Arduino builder discovers the library from it, and its
// dependency-detection pass cannot parse a __has_include() expression.
#ifdef PLATFORMIO
// PlatformIO does not give framework-bundled libraries the lib_deps include
// paths, so the header can be unreachable here; skip it instead of failing.
#if !defined(__has_include) || __has_include(<Adafruit_TinyUSB.h>)
#include <Adafruit_TinyUSB.h>
#endif
#else
#include <Adafruit_TinyUSB.h>
#endif
#endif

#include "Wire.h"

Expand Down
Loading