From 106018df52e3b1509033aef6861c2e0f24781296 Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 17 Nov 2021 14:02:01 -0500 Subject: [PATCH] oof --- .github/workflows/githubci.yml | 2 +- Adafruit_I2CDevice.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index bfce51b..b1d3fa0 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -20,7 +20,7 @@ jobs: run: bash ci/actions_install.sh - name: test platforms - run: python3 ci/build_platform.py main_platforms + run: python3 ci/build_platform.py main_platforms zero - name: clang run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r . diff --git a/Adafruit_I2CDevice.h b/Adafruit_I2CDevice.h index b16fba9..fda0600 100644 --- a/Adafruit_I2CDevice.h +++ b/Adafruit_I2CDevice.h @@ -6,7 +6,11 @@ ///< The class which defines how we will talk to this device over I2C class Adafruit_I2CDevice { public: +#ifdef ARDUINO_SAMD_ZERO Adafruit_I2CDevice(uint8_t addr, arduino::TwoWire *theWire = &Wire); +#else + Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire); +#endif uint8_t address(void); bool begin(bool addr_detect = true); bool detected(void); @@ -25,7 +29,11 @@ public: private: uint8_t _addr; +#ifdef ARDUINO_SAMD_ZERO arduino::TwoWire *_wire; +#else + TwoWire *_wire; +#endif bool _begun; size_t _maxBufferSize; bool _read(uint8_t *buffer, size_t len, bool stop);