harden sensor acquisition after audit
This commit is contained in:
@@ -20,15 +20,21 @@ typedef struct {
|
||||
int16_t z;
|
||||
} adxl345_sample_t;
|
||||
|
||||
#define ADXL345_INT_SOURCE_DATA_READY 0x80
|
||||
#define ADXL345_INT_SOURCE_OVERRUN 0x01
|
||||
|
||||
/** Detect, identify, and configure an ADXL345 for 100 Hz, full-resolution +/-8 g. */
|
||||
esp_err_t adxl345_init(adxl345_t *sensor, i2c_master_bus_handle_t bus, uint32_t bus_speed_hz);
|
||||
|
||||
/** Read one sensor-native, uncalibrated XYZ sample. */
|
||||
esp_err_t adxl345_read_raw(const adxl345_t *sensor, adxl345_sample_t *sample);
|
||||
/** Remove the sensor from its I2C bus. Safe to call on an uninitialized handle. */
|
||||
esp_err_t adxl345_deinit(adxl345_t *sensor);
|
||||
|
||||
/** Read INT_SOURCE followed by one sensor-native, uncalibrated XYZ sample. */
|
||||
esp_err_t adxl345_read_raw(const adxl345_t *sensor, adxl345_sample_t *sample,
|
||||
uint8_t *interrupt_source);
|
||||
|
||||
uint8_t adxl345_address(const adxl345_t *sensor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user