Oluwatoni Bodunrin
Oluwatoni Bodunrin

Reputation: 21

can data from a sensor be read in a function

I am using the icm 20948 sensor, programming on MPLABx running harmonyV3.i2c is communication mode. Can I read and write in a function, does it have to be in a while loop?

For example would:

while(SERCOM1_I2C_IsBusy()) {}
SERCOM1_I2C_Write(ICM20948_ADDRESS,&FAccrangefactor, 1);

function properly in a function. Many thanks

Upvotes: 2

Views: 87

Answers (0)

Related Questions