Skip to content

Commit ad7da64

Browse files
authored
Merge pull request #5 from sparkfun/fix#4
Update sfeAS7331.cpp
2 parents 056973f + 85fc1a0 commit ad7da64

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun AS7331 Arduino Library
2-
version=2.1.0
2+
version=2.1.1
33
author=SparkFun Electronics
44
maintainer=SparkFun Electronics
55
sentence=An Arduino library to make use of the Qwiic and Qwiic Mini AS7331 Spectral UV Sensor

src/sfeAS7331.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ bool SfeAS7331Driver::runDefaultSetup(const bool &runSoftReset)
9191
// Read all the configuration registers in.
9292
uint8_t regs[6];
9393

94-
uint32_t nRead = 0;
94+
size_t nRead = 0;
9595
sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegCfgCreg1, regs, 6U, nRead);
9696
if (nRead != 6 || result != kSTkErrOk)
9797
return false;
@@ -264,7 +264,7 @@ sfeTkError_t SfeAS7331Driver::readAllUV(void)
264264
uint8_t dataRaw[6];
265265

266266
// Read in the raw data from the results registers.
267-
uint32_t nRead = 0;
267+
size_t nRead = 0;
268268

269269
sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasMres1, dataRaw, 6U, nRead);
270270

@@ -310,7 +310,7 @@ sfeTkError_t SfeAS7331Driver::readAll(void)
310310

311311
uint8_t dataRaw[8];
312312

313-
uint32_t nRead = 0;
313+
size_t nRead = 0;
314314
sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasTemp, dataRaw, 8U, nRead);
315315

316316
if (nRead != 8 || result != kSTkErrOk)
@@ -358,7 +358,7 @@ sfeTkError_t SfeAS7331Driver::readOutConv(void)
358358

359359
uint8_t tconvRaw[4];
360360

361-
uint32_t nRead = 0;
361+
size_t nRead;
362362

363363
sfeTkError_t result = _theBus->readRegisterRegion(kSfeAS7331RegMeasOutConvL, tconvRaw, 4U, nRead);
364364

0 commit comments

Comments
 (0)