Created
April 4, 2023 07:36
-
-
Save reefwing/1138b0694240cdda680778140c3fe13b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool ReefwingLSM9DS1::gyroAvailable() { | |
uint8_t STATUS_REG = readByte(LSM9DS1AG_ADDRESS, LSM9DS1AG_STATUS_REG); | |
return (STATUS_REG & 0x02); | |
} | |
bool ReefwingLSM9DS1::accelAvailable() { | |
uint8_t STATUS_REG = readByte(LSM9DS1AG_ADDRESS, LSM9DS1AG_STATUS_REG); | |
return (STATUS_REG & 0x01); | |
} | |
bool ReefwingLSM9DS1::magAvailable() { | |
uint8_t STATUS_REG_M = readRegister(LSM9DS1M_ADDRESS, LSM9DS1M_STATUS_REG_M); | |
return (STATUS_REG_M & 0x08); | |
} | |
bool ReefwingLSM9DS1::tempAvailable() { | |
uint8_t STATUS_REG = readByte(LSM9DS1AG_ADDRESS, LSM9DS1AG_STATUS_REG); | |
return (STATUS_REG & 0x04); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment