harden sensor acquisition after audit
This commit is contained in:
@@ -20,15 +20,21 @@ typedef struct {
|
||||
int16_t z;
|
||||
} l3g4200d_sample_t;
|
||||
|
||||
#define L3G4200D_STATUS_ZYXDA 0x08
|
||||
#define L3G4200D_STATUS_ZYXOR 0x80
|
||||
|
||||
/** Detect, identify, and configure an L3G4200D for 100 Hz, 25 Hz BW, +/-500 dps. */
|
||||
esp_err_t l3g4200d_init(l3g4200d_t *sensor, i2c_master_bus_handle_t bus, uint32_t bus_speed_hz);
|
||||
|
||||
/** Read one sensor-native, uncalibrated XYZ sample. */
|
||||
esp_err_t l3g4200d_read_raw(const l3g4200d_t *sensor, l3g4200d_sample_t *sample);
|
||||
/** Remove the sensor from its I2C bus. Safe to call on an uninitialized handle. */
|
||||
esp_err_t l3g4200d_deinit(l3g4200d_t *sensor);
|
||||
|
||||
/** Read STATUS_REG followed by one sensor-native, uncalibrated XYZ sample. */
|
||||
esp_err_t l3g4200d_read_raw(const l3g4200d_t *sensor, l3g4200d_sample_t *sample,
|
||||
uint8_t *status);
|
||||
|
||||
uint8_t l3g4200d_address(const l3g4200d_t *sensor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user