gyro9 2.1.0.0
|
API for configuring and manipulating Gyro 9 Click driver. More...
Topics | |
Gyro 9 Registers List | |
List of registers of Gyro 9 Click driver. | |
Gyro 9 Registers Settings | |
Settings for registers of Gyro 9 Click driver. | |
Gyro 9 MikroBUS Map | |
MikroBUS pin mapping of Gyro 9 Click driver. | |
Functions | |
void | gyro9_cfg_setup (gyro9_cfg_t *cfg) |
Gyro 9 configuration object setup function. | |
void | gyro9_drv_interface_selection (gyro9_cfg_t *cfg, gyro9_drv_t drv_sel) |
Gyro 9 driver interface setup function. | |
err_t | gyro9_init (gyro9_t *ctx, gyro9_cfg_t *cfg) |
Gyro 9 initialization function. | |
err_t | gyro9_default_cfg (gyro9_t *ctx) |
Gyro 9 default configuration function. | |
err_t | gyro9_generic_write (gyro9_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Gyro 9 data writing function. | |
err_t | gyro9_generic_read (gyro9_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Gyro 9 data reading function. | |
err_t | gyro9_get_device_id (gyro9_t *ctx, uint8_t *who_am_i) |
Gyro 9 get device ID function. | |
err_t | gyro9_set_output_data_rate (gyro9_t *ctx, uint8_t odr) |
Gyro 9 set output data rate function. | |
err_t | gyro9_set_bandwidth_sel (gyro9_t *ctx, uint8_t bandwidth) |
Gyro 9 set bandwidth function. | |
err_t | gyro9_set_mode_pd (gyro9_t *ctx) |
Gyro 9 set power-down mode function. | |
err_t | gyro9_set_mode_sleep (gyro9_t *ctx) |
Gyro 9 set sleep mode function. | |
err_t | gyro9_set_mode_normal (gyro9_t *ctx) |
Gyro 9 set normal mode function. | |
err_t | gyro9_set_fifo_mode (gyro9_t *ctx, uint8_t fifo_mode) |
Gyro 9 set FIFO mode function. | |
err_t | gyro9_enable_data_ready (gyro9_t *ctx) |
Gyro 9 enable data ready function. | |
err_t | gyro9_get_status (gyro9_t *ctx, uint8_t *status) |
Gyro 9 get status function. | |
err_t | gyro9_get_axis_data (gyro9_t *ctx, gyro9_axis_data_t *gyro_axis) |
Gyro 9 get gyro data function. | |
err_t | gyro9_get_gyro_axis (gyro9_t *ctx, gyro9_axis_t *gyro_axis) |
Gyro 9 get gyro sensor axes function. | |
err_t | gyro9_get_temperature_raw (gyro9_t *ctx, int8_t *temp_raw) |
Gyro 9 get temperature data function. | |
uint8_t | gyro9_get_data_ready (gyro9_t *ctx) |
Gyro 9 get data ready function. | |
uint8_t | gyro9_get_interrupt (gyro9_t *ctx) |
Gyro 9 get interrupt function. | |
API for configuring and manipulating Gyro 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void gyro9_cfg_setup | ( | gyro9_cfg_t * | cfg | ) |
Gyro 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See gyro9_cfg_t object definition for detailed explanation. |
err_t gyro9_default_cfg | ( | gyro9_t * | ctx | ) |
Gyro 9 default configuration function.
This function executes a default configuration of Gyro 9 click board.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void gyro9_drv_interface_selection | ( | gyro9_cfg_t * | cfg, |
gyro9_drv_t | drv_sel ) |
Gyro 9 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See gyro9_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See gyro9_drv_t object definition for detailed explanation. |
err_t gyro9_enable_data_ready | ( | gyro9_t * | ctx | ) |
Gyro 9 enable data ready function.
This function enable data ready DR pin of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_generic_read | ( | gyro9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Gyro 9 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_generic_write | ( | gyro9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Gyro 9 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_get_axis_data | ( | gyro9_t * | ctx, |
gyro9_axis_data_t * | gyro_axis ) |
Gyro 9 get gyro data function.
This function reads the gyroscope raw data of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[out] | gyro_axis | : Gyroscope raw data object. See gyro9_axis_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t gyro9_get_data_ready | ( | gyro9_t * | ctx | ) |
Gyro 9 get data ready function.
This function gets states of the data ready (DR) pin of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Data is not ready, 1
- Data is ready. err_t gyro9_get_device_id | ( | gyro9_t * | ctx, |
uint8_t * | who_am_i ) |
Gyro 9 get device ID function.
This function reads a device identification value of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[out] | who_am_i | : Device identification data value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_get_gyro_axis | ( | gyro9_t * | ctx, |
gyro9_axis_t * | gyro_axis ) |
Gyro 9 get gyro sensor axes function.
This function reads the gyroscope raw data and convert to the engineering units of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[out] | gyro_axis | : Angular rate output data object (dps). See gyro9_axis_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t gyro9_get_interrupt | ( | gyro9_t * | ctx | ) |
Gyro 9 get interrupt function.
This function gets states of the Interrupt (INT) pin of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t gyro9_get_status | ( | gyro9_t * | ctx, |
uint8_t * | status ) |
Gyro 9 get status function.
This function reads status register of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | status | : Status register data value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_get_temperature_raw | ( | gyro9_t * | ctx, |
int8_t * | temp_raw ) |
Gyro 9 get temperature data function.
This function reads the temperature raw data of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[out] | temp_raw | : Temperature raw data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_init | ( | gyro9_t * | ctx, |
gyro9_cfg_t * | cfg ) |
Gyro 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See gyro9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_bandwidth_sel | ( | gyro9_t * | ctx, |
uint8_t | bandwidth ) |
Gyro 9 set bandwidth function.
This function sets the desired bandwidth of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | bandwidth | : Bandwidth selection [0-3]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_fifo_mode | ( | gyro9_t * | ctx, |
uint8_t | fifo_mode ) |
Gyro 9 set FIFO mode function.
This function sets the desired FIFO mode of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | fifo_mode | : FIFO mode configuration [0-2]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_mode_normal | ( | gyro9_t * | ctx | ) |
Gyro 9 set normal mode function.
This function sets normal mode of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_mode_pd | ( | gyro9_t * | ctx | ) |
Gyro 9 set power-down mode function.
This function sets power-down mode of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_mode_sleep | ( | gyro9_t * | ctx | ) |
Gyro 9 set sleep mode function.
This function sets sleep mode of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro9_set_output_data_rate | ( | gyro9_t * | ctx, |
uint8_t | odr ) |
Gyro 9 set output data rate function.
This function sets the desired output data rate of the A3G4250D, MEMS motion sensor: 3-axis digital output gyroscope on the Gyro 9 click board™.
[in] | ctx | : Click context object. See gyro9_t object definition for detailed explanation. |
[in] | odr | : Output data rate [0-3]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.