gyro8 2.1.0.0
|
API for configuring and manipulating Gyro 8 Click driver. More...
Topics | |
Gyro 8 Registers List | |
List of registers of Gyro 8 Click driver. | |
Gyro 8 Registers Settings | |
Settings for registers of Gyro 8 Click driver. | |
Gyro 8 MikroBUS Map | |
MikroBUS pin mapping of Gyro 8 Click driver. | |
Functions | |
void | gyro8_cfg_setup (gyro8_cfg_t *cfg) |
Gyro 8 configuration object setup function. | |
err_t | gyro8_init (gyro8_t *ctx, gyro8_cfg_t *cfg) |
Gyro 8 initialization function. | |
err_t | gyro8_default_cfg (gyro8_t *ctx) |
Gyro 8 default configuration function. | |
err_t | gyro8_write_register (gyro8_t *ctx, uint8_t reg, uint16_t data_in) |
Gyro 8 write register function. | |
err_t | gyro8_read_register (gyro8_t *ctx, uint8_t reg, uint16_t *data_out) |
Gyro 8 read register function. | |
void | gyro8_set_rst_pin (gyro8_t *ctx, uint8_t state) |
Gyro 8 set rst pin function. | |
void | gyro8_reset_device (gyro8_t *ctx) |
Gyro 8 reset device function. | |
err_t | gyro8_check_communication (gyro8_t *ctx) |
Gyro 8 check communication function. | |
err_t | gyro8_read_serial_id (gyro8_t *ctx, uint32_t *serial_id) |
Gyro 8 read serial id function. | |
err_t | gyro8_read_temperature (gyro8_t *ctx, float *temperature) |
Gyro 8 read temperature function. | |
err_t | gyro8_read_angular_rate (gyro8_t *ctx, float *rate) |
Gyro 8 read angular rate function. | |
API for configuring and manipulating Gyro 8 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void gyro8_cfg_setup | ( | gyro8_cfg_t * | cfg | ) |
Gyro 8 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See gyro8_cfg_t object definition for detailed explanation. |
err_t gyro8_check_communication | ( | gyro8_t * | ctx | ) |
Gyro 8 check communication function.
This function checks the communication by reading and verifying the product ID.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_default_cfg | ( | gyro8_t * | ctx | ) |
Gyro 8 default configuration function.
This function executes a default configuration of Gyro 8 click board.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_init | ( | gyro8_t * | ctx, |
gyro8_cfg_t * | cfg ) |
Gyro 8 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See gyro8_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_read_angular_rate | ( | gyro8_t * | ctx, |
float * | rate ) |
Gyro 8 read angular rate function.
This function reads the angular rate of X-axis in dps.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[out] | rate | : Angular rate in dps. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_read_register | ( | gyro8_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Gyro 8 read register function.
This function reads data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_read_serial_id | ( | gyro8_t * | ctx, |
uint32_t * | serial_id ) |
Gyro 8 read serial id function.
This function reads the serial ID which is laser marked on the sensor lid.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[out] | serial_id | : Serial ID laser marked on the sensor lid. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gyro8_read_temperature | ( | gyro8_t * | ctx, |
float * | temperature ) |
Gyro 8 read temperature function.
This function reads the temperature measurement in Celsius.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[out] | temperature | : Temperature in Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void gyro8_reset_device | ( | gyro8_t * | ctx | ) |
Gyro 8 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
void gyro8_set_rst_pin | ( | gyro8_t * | ctx, |
uint8_t | state ) |
Gyro 8 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t gyro8_write_register | ( | gyro8_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Gyro 8 write register function.
This function writes a desired data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See gyro8_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.