Skip to content

Update sfeAS7331.cpp #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 2, 2024
Merged
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
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/sfeAS7331.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down