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

CTL_GYROSCOPE_t is an abstract gyroscope interface that provides clients with a means to set the range and bandwidth of the gyroscope and to sample rotation in up to three axes.

Structure
transport
The underlying transport for the gyroscope 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 degrees per second. Client software may alter these to provide more accurate calibration of the gyroscope.
gain
The gain for the x, y, and z axes, in degrees per second per count. Client software may alter these to provide more accurate calibration of the gyroscope.
range
Current range selected for the gyroscope, in degrees per second, and is read only.
bandwidth
Current bandwidth selected for the gyroscope, in hertz, and is read only.
extra
Client-side data. You can use this to store additional information relating to the gyroscope instance.
measure
Method to sample the x, y, and z axes of the gyroscope.
set_range
Method to set the range of the gyroscope.
set_bandwidth
Method to set the bandwidth of the gyroscope.