From 159163384e53eeb78751f2edf449fc8d36810dfc Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:30:32 -0700 Subject: [PATCH 01/11] fix issue with trigger --- .github/workflows/compile-sketch.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index f9af39f..54a92e9 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -1,8 +1,10 @@ name: Cross-compilation on: - # - push - #- pull_request + push: + branches: + - main + workflow_dispatch: jobs: From 734d11869ae9ee7867deb532955d7c003b7f72b2 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:33:13 -0700 Subject: [PATCH 02/11] fix build sketch specified - try example 1 --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 54a92e9..4023a71 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -101,7 +101,7 @@ jobs: libraries: | - source-path: ./ sketch-paths: | - - test/test + - examples/Example01_Basic_OneShot enable-warnings-report: true enable-deltas-report: true verbose: true From bf4c91a342532faebe17e3dfc9c9e2711885aaca Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:36:41 -0700 Subject: [PATCH 03/11] fix build sketch specified - try example 1 --- .github/workflows/compile-sketch.yml | 29 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 4023a71..4b982ca 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -93,19 +93,24 @@ jobs: - name: Branch name run: echo running on branch ${GITHUB_REF##*/} - - name: Compile Sketch - uses: arduino/compile-sketches@v1.1.0 - with: - platforms: ${{ matrix.board.platforms }} - fqbn: ${{ matrix.board.fqbn }} - libraries: | - - source-path: ./ - sketch-paths: | - - examples/Example01_Basic_OneShot - enable-warnings-report: true - enable-deltas-report: true - verbose: true + - name: Arduino - Start config file + run: arduino-cli config init --additional-urls ${{ matrix.board.source-url}} + + - name: Arduino - Update index + run: arduino-cli core update-index + + - name: Arduino - Install platform + run: arduino-cli core install ${{ matrix.board.name}} + - name: Arduino - Install libraries + run: | + arduino-cli config set library.enable_unsafe_install true + arduino-cli version + arduino-cli lib install 'SparkFun_Toolkit' + + - name: Compile Sketch + run: arduino-cli compile --fqbn ${{ matrix.board.fqbn }} examples/Example01_Basic_OneShot --library . + # outputs: # report-artifact-name: ${{ steps.report-artifact-name.outputs.report-artifact-name }} From ac08edf8d9dc23f9b9da619289a27a352051b008 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:40:31 -0700 Subject: [PATCH 04/11] fix arduino-cli install issue --- .github/workflows/compile-sketch.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 4b982ca..c526eb9 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -93,6 +93,10 @@ jobs: - name: Branch name run: echo running on branch ${GITHUB_REF##*/} + # Setup Arduino command line - install esp32 and all the libs flux needs + - name: Arduino - Install and setup the Arduino CLI + uses: arduino/setup-arduino-cli@v2 + - name: Arduino - Start config file run: arduino-cli config init --additional-urls ${{ matrix.board.source-url}} From dfe2cb5e15ab6a1c7d7acbde1e09655e649b8a83 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:42:38 -0700 Subject: [PATCH 05/11] fix matrix issue --- .github/workflows/compile-sketch.yml | 67 +++++++++++++++------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index c526eb9..544d207 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -19,72 +19,79 @@ jobs: # Uno # https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt - fqbn: arduino:avr:mega - platforms: | - - name: arduino:avr - source-url: https://downloads.arduino.cc/packages/package_index.json + # platforms: | + name: arduino:avr + source-url: https://downloads.arduino.cc/packages/package_index.json # ESP32 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - fqbn: esp32:esp32:esp32 - platforms: | - - name: esp32:esp32 - source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + # platforms: | + name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # ESP32-S2 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - fqbn: esp32:esp32:esp32s2 - platforms: | - - name: esp32:esp32 - source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + # platforms: | + name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # ESP32-C3 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - fqbn: esp32:esp32:esp32c3 - platforms: | - - name: esp32:esp32 - source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + # platforms: | + name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # Artemis / Apollo3 # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt - fqbn: SparkFun:apollo3:sfe_artemis_atp - platforms: | - - name: SparkFun:apollo3 - source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json + # platforms: | + name: SparkFun:apollo3 + source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json # ESP8266 # https://github.com/esp8266/Arduino/blob/master/boards.txt - fqbn: esp8266:esp8266:thingdev - platforms: | - - name: esp8266:esp8266 - source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + # platforms: | + name: esp8266:esp8266 + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json # SAMD21 # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt - fqbn: arduino:samd:mkr1000 - platforms: | - - name: arduino:samd - # source-url: https://downloads.arduino.cc/packages/package_index.json + # platforms: | + name: arduino:samd + source-url: https://downloads.arduino.cc/packages/package_index.json # Nano BLE 33 / nRF52840 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: arduino:mbed:nano33ble - platforms: | - - name: arduino:mbed - # source-url: https://downloads.arduino.cc/packages/package_index.json + # platforms: | + name: arduino:mbed + source-url: https://downloads.arduino.cc/packages/package_index.json # RP2040 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: rp2040:rp2040:sparkfun_promicrorp2040 - platforms: | - - name: rp2040:rp2040 - source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + # platforms: | + name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + + # RP2350 + # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt + - fqbn: rp2040:rp2040:sparkfun_promicrorp2350 + # platforms: | + name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json # STM32 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: STMicroelectronics:stm32:GenF4 - platforms: | - - name: STMicroelectronics:stm32 - source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json + # platforms: | + name: STMicroelectronics:stm32 + source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json steps: - name: Checkout From 209bb550da10e7578e7960b423e1f217291c0d3c Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 16 Feb 2025 14:43:45 -0700 Subject: [PATCH 06/11] wrong toolkit name - grrr --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 544d207..3d37c75 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -117,7 +117,7 @@ jobs: run: | arduino-cli config set library.enable_unsafe_install true arduino-cli version - arduino-cli lib install 'SparkFun_Toolkit' + arduino-cli lib install 'SparkFun Toolkit' - name: Compile Sketch run: arduino-cli compile --fqbn ${{ matrix.board.fqbn }} examples/Example01_Basic_OneShot --library . From be73f6216f27a146e132d822481947979abe2b24 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Mon, 17 Feb 2025 07:58:19 -0700 Subject: [PATCH 07/11] make inherited members visible on arduino class --- docs/doxygen/doxygen-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/doxygen-config b/docs/doxygen/doxygen-config index d421d7f..e121b00 100644 --- a/docs/doxygen/doxygen-config +++ b/docs/doxygen/doxygen-config @@ -171,7 +171,7 @@ ALWAYS_DETAILED_SEC = YES # operators of the base classes will not be shown. # The default value is: NO. -INLINE_INHERITED_MEMB = NO +INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the From 55d4fc1ef3c83d5e7a9fb4659aedbf25d4d32479 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Mon, 17 Feb 2025 07:58:40 -0700 Subject: [PATCH 08/11] make inherited members visible on arduino class --- docs/doxygen/doxygen-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/doxygen-config b/docs/doxygen/doxygen-config index d421d7f..e121b00 100644 --- a/docs/doxygen/doxygen-config +++ b/docs/doxygen/doxygen-config @@ -171,7 +171,7 @@ ALWAYS_DETAILED_SEC = YES # operators of the base classes will not be shown. # The default value is: NO. -INLINE_INHERITED_MEMB = NO +INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the From 2319bb71974bd762ea987e15788492676c0678f9 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Mon, 17 Feb 2025 15:36:18 -0700 Subject: [PATCH 09/11] better doc link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6dbdc1..dac2e67 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ The following examples are provided with the library ## Documentation -The full API and use documentation for this library is provided [here](http://docs.sparkfun.com/SparkFun_AS7331_Arduino_Library/). For a quick reference, the main methods available in the library are listed [here](http://docs.sparkfun.com/SparkFun_AS7331_Arduino_Library/functions.html). +The full API and use documentation for this library is provided [here](http://docs.sparkfun.com/SparkFun_AS7331_Arduino_Library/). For a quick reference, the main methods available in the library are listed [here](https://docs.sparkfun.com/SparkFun_AS7331_Arduino_Library/class_sfe_a_s7331_ard_i2_c.html). Curious about the hardware this board works with - visit the SparkFun Spectral UV Sensor [hardware repository](https://github.com/sparkfun/SparkFun_Spectral_UV_Sensor_AS7331). From b2d75d7d5e3f303e0046bd15702f5a72ae054793 Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Sun, 23 Feb 2025 08:15:42 -0700 Subject: [PATCH 10/11] move to updated toolkit api; tweaks to call parameters for toolkit --- src/sfTk/sfDevAS7331.cpp | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/sfTk/sfDevAS7331.cpp b/src/sfTk/sfDevAS7331.cpp index a86c474..daff821 100644 --- a/src/sfTk/sfDevAS7331.cpp +++ b/src/sfTk/sfDevAS7331.cpp @@ -73,7 +73,7 @@ uint8_t sfDevAS7331::getDeviceID(void) uint8_t devID; // Read the device ID register, if it errors then return 0. - if (ksfTkErrOk != _theBus->readRegisterByte(kSfeAS7331RegCfgAgen, devID)) + if (ksfTkErrOk != _theBus->readRegister(kSfeAS7331RegCfgAgen, devID)) return 0; // If we changed it at first, change it back. @@ -124,7 +124,7 @@ bool sfDevAS7331::runDefaultSetup(const bool &runSoftReset) uint8_t regs[6]; size_t nRead = 0; - sfTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegCfgCreg1, regs, 6U, nRead); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegCfgCreg1, regs, sizeof(regs), nRead); if (nRead != 6 || result != ksfTkErrOk) return false; @@ -174,7 +174,7 @@ bool sfDevAS7331::runDefaultSetup(const bool &runSoftReset) regs[5] = optreg.byte; // Write the bytes to the sensor, ensuring the device matches local settings. - if (ksfTkErrOk != _theBus->writeRegisterRegion(kSfeAS7331RegCfgCreg1, regs, 6U)) + if (ksfTkErrOk != _theBus->writeRegister(kSfeAS7331RegCfgCreg1, regs, 6U)) return false; } @@ -261,7 +261,7 @@ sfTkError_t sfDevAS7331::readTemp(void) uint16_t tempRaw; // Read in the raw value. - sfTkError_t result = _theBus->readRegisterWord(kSfeAS7331RegMeasTemp, tempRaw); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegMeasTemp, tempRaw); if (ksfTkErrOk != result) return result; @@ -298,7 +298,7 @@ sfTkError_t sfDevAS7331::readAllUV(void) // Read in the raw data from the results registers. size_t nRead = 0; - sfTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasMres1, dataRaw, 6U, nRead); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegMeasMres1, dataRaw, sizeof(dataRaw), nRead); if (nRead != 6 || result != ksfTkErrOk) return result; @@ -343,7 +343,7 @@ sfTkError_t sfDevAS7331::readAll(void) uint8_t dataRaw[8]; size_t nRead = 0; - sfTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasTemp, dataRaw, 8U, nRead); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegMeasTemp, dataRaw, sizeof(dataRaw), nRead); if (nRead != 8 || result != ksfTkErrOk) return result; @@ -392,7 +392,7 @@ sfTkError_t sfDevAS7331::readOutConv(void) size_t nRead; - sfTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasOutConvL, tconvRaw, 4U, nRead); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegMeasOutConvL, tconvRaw, 4U, nRead); if (nRead != 4 || result != ksfTkErrOk) return result; @@ -862,7 +862,7 @@ sfTkError_t sfDevAS7331::getStatus(sfe_as7331_reg_meas_osr_status_t &statusReg) uint16_t statusRaw; - sfTkError_t result = _theBus->readRegisterWord(kSfeAS7331RegMeasOsrStatus, statusRaw); + sfTkError_t result = _theBus->readRegister(kSfeAS7331RegMeasOsrStatus, statusRaw); if (ksfTkErrOk != result) return result; @@ -878,7 +878,7 @@ sfTkError_t sfDevAS7331::getOSR(sfe_as7331_reg_cfg_osr_t &osrReg) if (!_theBus) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgOsr, osrReg.byte); + return _theBus->readRegister(kSfeAS7331RegCfgOsr, osrReg.byte); } sfTkError_t sfDevAS7331::setOSR(const sfe_as7331_reg_cfg_osr_t &osrReg) @@ -887,7 +887,7 @@ sfTkError_t sfDevAS7331::setOSR(const sfe_as7331_reg_cfg_osr_t &osrReg) if (!_theBus) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgOsr, osrReg.byte); + return _theBus->writeRegister(kSfeAS7331RegCfgOsr, osrReg.byte); } sfTkError_t sfDevAS7331::getCReg1(sfe_as7331_reg_cfg_creg1_t &creg1) @@ -896,7 +896,7 @@ sfTkError_t sfDevAS7331::getCReg1(sfe_as7331_reg_cfg_creg1_t &creg1) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgCreg1, creg1.byte); + return _theBus->readRegister(kSfeAS7331RegCfgCreg1, creg1.byte); } sfTkError_t sfDevAS7331::setCReg1(const sfe_as7331_reg_cfg_creg1_t &creg1) @@ -905,7 +905,7 @@ sfTkError_t sfDevAS7331::setCReg1(const sfe_as7331_reg_cfg_creg1_t &creg1) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgCreg1, creg1.byte); + return _theBus->writeRegister(kSfeAS7331RegCfgCreg1, creg1.byte); } sfTkError_t sfDevAS7331::getCReg2(sfe_as7331_reg_cfg_creg2_t &creg2) @@ -914,7 +914,7 @@ sfTkError_t sfDevAS7331::getCReg2(sfe_as7331_reg_cfg_creg2_t &creg2) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgCreg2, creg2.byte); + return _theBus->readRegister(kSfeAS7331RegCfgCreg2, creg2.byte); } sfTkError_t sfDevAS7331::setCReg2(const sfe_as7331_reg_cfg_creg2_t &creg2) @@ -923,7 +923,7 @@ sfTkError_t sfDevAS7331::setCReg2(const sfe_as7331_reg_cfg_creg2_t &creg2) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgCreg2, creg2.byte); + return _theBus->writeRegister(kSfeAS7331RegCfgCreg2, creg2.byte); } sfTkError_t sfDevAS7331::getCReg3(sfe_as7331_reg_cfg_creg3_t &creg3) @@ -932,7 +932,7 @@ sfTkError_t sfDevAS7331::getCReg3(sfe_as7331_reg_cfg_creg3_t &creg3) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgCreg3, creg3.byte); + return _theBus->readRegister(kSfeAS7331RegCfgCreg3, creg3.byte); } sfTkError_t sfDevAS7331::setCReg3(const sfe_as7331_reg_cfg_creg3_t &creg3) @@ -941,7 +941,7 @@ sfTkError_t sfDevAS7331::setCReg3(const sfe_as7331_reg_cfg_creg3_t &creg3) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgCreg3, creg3.byte); + return _theBus->writeRegister(kSfeAS7331RegCfgCreg3, creg3.byte); } sfTkError_t sfDevAS7331::getBreak(uint8_t &breakReg) @@ -950,7 +950,7 @@ sfTkError_t sfDevAS7331::getBreak(uint8_t &breakReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgBreak, breakReg); + return _theBus->readRegister(kSfeAS7331RegCfgBreak, breakReg); } sfTkError_t sfDevAS7331::setBreak(const uint8_t &breakReg) @@ -959,7 +959,7 @@ sfTkError_t sfDevAS7331::setBreak(const uint8_t &breakReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgBreak, breakReg); + return _theBus->writeRegister(kSfeAS7331RegCfgBreak, breakReg); } sfTkError_t sfDevAS7331::getEdges(uint8_t &edgesReg) @@ -968,7 +968,7 @@ sfTkError_t sfDevAS7331::getEdges(uint8_t &edgesReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgEdges, edgesReg); + return _theBus->readRegister(kSfeAS7331RegCfgEdges, edgesReg); } sfTkError_t sfDevAS7331::setEdges(const uint8_t &edgesReg) @@ -977,7 +977,7 @@ sfTkError_t sfDevAS7331::setEdges(const uint8_t &edgesReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgEdges, edgesReg); + return _theBus->writeRegister(kSfeAS7331RegCfgEdges, edgesReg); } sfTkError_t sfDevAS7331::getOptIndex(sfe_as7331_reg_cfg_optreg_t &optReg) @@ -986,7 +986,7 @@ sfTkError_t sfDevAS7331::getOptIndex(sfe_as7331_reg_cfg_optreg_t &optReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->readRegisterByte(kSfeAS7331RegCfgOptReg, optReg.byte); + return _theBus->readRegister(kSfeAS7331RegCfgOptReg, optReg.byte); } sfTkError_t sfDevAS7331::setOptIndex(const sfe_as7331_reg_cfg_optreg_t &optReg) @@ -995,7 +995,7 @@ sfTkError_t sfDevAS7331::setOptIndex(const sfe_as7331_reg_cfg_optreg_t &optReg) if (!_theBus || _opMode != DEVICE_MODE_CFG) return ksfTkErrFail; - return _theBus->writeRegisterByte(kSfeAS7331RegCfgOptReg, optReg.byte); + return _theBus->writeRegister(kSfeAS7331RegCfgOptReg, optReg.byte); } sfTkError_t sfDevAS7331::readRawUV(const as7331_uv_type &uv_type) @@ -1033,7 +1033,7 @@ sfTkError_t sfDevAS7331::readRawUV(const as7331_uv_type &uv_type) break; } - sfTkError_t result = _theBus->readRegisterWord(regAddress, uvRawVal); + sfTkError_t result = _theBus->readRegister(regAddress, uvRawVal); if (ksfTkErrOk != result) return result; From 17264abb678b3ca6617a9d910639a4c45140306d Mon Sep 17 00:00:00 2001 From: Kirk Benell Date: Wed, 5 Mar 2025 15:22:08 -0700 Subject: [PATCH 11/11] fix version --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 349458e..ecee1e3 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun AS7331 Arduino Library -version=2.1.2 +version=2.2.0 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=An Arduino library to make use of the Qwiic and Qwiic Mini AS7331 Spectral UV Sensor