From 89c4c5a8584893ed8c0edefde9925734b69e8ecc Mon Sep 17 00:00:00 2001 From: Alex Brudner <101155592+SFE-Brudnerd@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:25:36 -0700 Subject: [PATCH 1/2] Update sfeAS7331.cpp Retype a few variables to match the dependent i2c library. --- src/sfeAS7331.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sfeAS7331.cpp b/src/sfeAS7331.cpp index 97158df..c3109b1 100644 --- a/src/sfeAS7331.cpp +++ b/src/sfeAS7331.cpp @@ -91,7 +91,7 @@ bool SfeAS7331Driver::runDefaultSetup(const bool &runSoftReset) // Read all the configuration registers in. uint8_t regs[6]; - uint32_t nRead = 0; + size_t nRead = 0; sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegCfgCreg1, regs, 6U, nRead); if (nRead != 6 || result != kSTkErrOk) return false; @@ -264,7 +264,7 @@ sfeTkError_t SfeAS7331Driver::readAllUV(void) uint8_t dataRaw[6]; // Read in the raw data from the results registers. - uint32_t nRead = 0; + size_t nRead = 0; sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasMres1, dataRaw, 6U, nRead); @@ -310,7 +310,7 @@ sfeTkError_t SfeAS7331Driver::readAll(void) uint8_t dataRaw[8]; - uint32_t nRead = 0; + size_t nRead = 0; sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasTemp, dataRaw, 8U, nRead); if (nRead != 8 || result != kSTkErrOk) @@ -358,7 +358,7 @@ sfeTkError_t SfeAS7331Driver::readOutConv(void) uint8_t tconvRaw[4]; - uint32_t nRead = 0; + size_t nRead; sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasOutConvL, tconvRaw, 4U, nRead); From 85fc1a0096a7af36f77decdb325b442916467b2b Mon Sep 17 00:00:00 2001 From: Alex Brudner <101155592+SFE-Brudnerd@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:52:35 -0700 Subject: [PATCH 2/2] Rev to v2.1.1. --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 01816d9..82f057b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun AS7331 Arduino Library -version=2.1.0 +version=2.1.1 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=An Arduino library to make use of the Qwiic and Qwiic Mini AS7331 Spectral UV Sensor