Skip to content

Commit 89c4c5a

Browse files
committed
Update sfeAS7331.cpp
Retype a few variables to match the dependent i2c library.
1 parent 056973f commit 89c4c5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sfeAS7331.cpp

Lines changed: 4 additions & 4 deletions
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)