diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index d50125b..b8f664e 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -21,9 +21,6 @@ jobs: LIBRARIES: | # Install the library from the local path. - source-path: ./ - - name: 107-Arduino-Debug - - name: 107-Arduino-Sensor - - name: 107-Arduino-BoostUnits strategy: fail-fast: false diff --git a/examples/TCS3472-Basic/TCS3472-Basic.ino b/examples/TCS3472-Basic/TCS3472-Basic.ino index 520b21c..c60cbfd 100644 --- a/examples/TCS3472-Basic/TCS3472-Basic.ino +++ b/examples/TCS3472-Basic/TCS3472-Basic.ino @@ -23,7 +23,6 @@ void i2c_generic_read (uint8_t const i2c_slave_addr, uint8_t const reg_addr, uin ArduinoTCS3472 tcs3472(i2c_generic_write, i2c_generic_read, -// delay, TCS3472::DEFAULT_I2C_ADDR); /************************************************************************************** @@ -42,7 +41,7 @@ void setup() if (!tcs3472.begin()) { Serial.print("ArduinoTCS3472::begin(...) failed, error code "); - Serial.print((int)tcs3472.error()); + Serial.print(static cast(tcs3472.error())); for(;;) { } } diff --git a/keywords.txt b/keywords.txt index 70b2ce2..0a70ea7 100644 --- a/keywords.txt +++ b/keywords.txt @@ -22,10 +22,10 @@ write KEYWORD2 # Constants (LITERAL1) ####################################### -TCS3472_ClearErrorFlag LITERAL1 -TCS3472_ProgrammingControl LITERAL1 -TCS3472_OTP_RegisterZeroPosition_HIGH LITERAL1 -TCS3472_OTP_RegisterZeroPosition_LOW LITERAL1 -TCS3472_Diagnostics_AutomaticGainControl LITERAL1 -TCS3472_Magnitude LITERAL1 -TCS3472_Angle LITERAL1 +ClearErrorFlag LITERAL1 +ProgrammingControl LITERAL1 +OTP_RegisterZeroPosition_HIGH LITERAL1 +OTP_RegisterZeroPosition_LOW LITERAL1 +Diagnostics_AutomaticGainControl LITERAL1 +Magnitude LITERAL1 +Angle LITERAL1 diff --git a/library.properties b/library.properties index 538597e..a45255d 100644 --- a/library.properties +++ b/library.properties @@ -8,4 +8,4 @@ category=Sensors url=https://github.com/107-systems/107-Arduino-TCS3472 architectures=samd,mbed,mbed_nano,mbed_portenta,mbed_edge,esp8266 includes=107-Arduino-TCS3472.h -depends=107-Arduino-Sensor +depends= diff --git a/src/107-Arduino-TCS3472.cpp b/src/107-Arduino-TCS3472.cpp index 3b9e980..09405ba 100644 --- a/src/107-Arduino-TCS3472.cpp +++ b/src/107-Arduino-TCS3472.cpp @@ -23,7 +23,6 @@ using namespace TCS3472; ArduinoTCS3472::ArduinoTCS3472(TCS3472::I2cWriteFunc write, TCS3472::I2cReadFunc read, - // TCS3472::DelayFunc delay, uint8_t const i2c_slave_addr) : _error{TCS3472::Error::None} , _io{write, read, i2c_slave_addr} diff --git a/src/107-Arduino-TCS3472.h b/src/107-Arduino-TCS3472.h index f3d429f..48e4508 100644 --- a/src/107-Arduino-TCS3472.h +++ b/src/107-Arduino-TCS3472.h @@ -13,7 +13,6 @@ **************************************************************************************/ #include "TCS3472/TCS3472_Io.h" -#include "Arduino.h" /************************************************************************************** * CLASS DECLARATION @@ -34,7 +33,6 @@ class ArduinoTCS3472 ArduinoTCS3472(TCS3472::I2cWriteFunc write, TCS3472::I2cReadFunc read, - // TCS3472::DelayFunc delay, uint8_t const i2c_slave_addr); bool begin(); diff --git a/src/TCS3472/TCS3472_Io.cpp b/src/TCS3472/TCS3472_Io.cpp index 2184fdb..0fd2004 100644 --- a/src/TCS3472/TCS3472_Io.cpp +++ b/src/TCS3472/TCS3472_Io.cpp @@ -69,23 +69,6 @@ void TCS3472_Io::write(Register const reg, uint8_t const * buf, size_t const byt _write(_i2c_slave_addr, to_integer(reg), buf, bytes); } -void TCS3472_Io::modify(Register const reg, uint8_t const bitmask, uint8_t const val) -{ - uint8_t reg_val = read(reg); - reg_val &= ~(bitmask); - reg_val |= (val & bitmask); - write(reg, reg_val); -} - -bool TCS3472_Io::isBitSet(Register const reg, uint8_t const bitpos) -{ - uint8_t const reg_val = read(reg); - if (reg_val & (1<