Synopsis
typedef struct {
  CTL_TRANSPORT_t transport;
  CTL_STATUS_t (*measure)(CTL_ACCELEROMETER_s *, float *);
  CTL_STATUS_t (*set_range)(CTL_ACCELEROMETER_s *, int);
  CTL_STATUS_t (*set_bandwidth)(CTL_ACCELEROMETER_s *, float);
  float bias[];
  float gain[];
  int range;
  float bandwidth;
  void *extra;
  unsigned __mode;
} CTL_ACCELEROMETER_t;
Description

CTL_ACCELEROMETER_t is an abstract accelerometer interface that provides clients with a means to set the range and bandwidth of the accelerometer and to sample acceleration in up to three axes.

Structure
transport
The underlying transport for the accelerometer which provides, typically, an I2C or SPI connection to the device and a means to read one or more registers from the device.
bias
The zero offset for the x, y, and z axes, in g. Client software may alter these to provide more accurate calibration of the accelerometer.
gain
The gain for the x, y, and z axes, in g per count. Client software may alter these to provide more accurate calibration of the accelerometer.
range
Current range selected for the accelerometer, in g, and is read only.
bandwidth
Current bandwidth selected for the accelerometer, in hertz, and is read only.
extra
Client-side data. You can use this to store additional information relating to the accelerometer instance.
__mode
Private working storage for the driver.
measure
Method to sample the x, y, and z axes of the accelerometer.
set_range
Method to set the range of the accelerometer.
set_bandwidth
Method to set the bandwidth of the accelerometer.