gyro 2.0.0.0
|
Functions | |
void | gyro_cfg_setup (gyro_cfg_t *cfg) |
Config Object Initialization function. | |
GYRO_RETVAL | gyro_init (gyro_t *ctx, gyro_cfg_t *cfg) |
Initialization function. | |
void | gyro_default_cfg (gyro_t *ctx) |
Click Default Configuration function. | |
void | gyro_write_data (gyro_t *ctx, uint8_t address, uint8_t write_command) |
Generic write data function. | |
uint8_t | gyro_read_data (gyro_t *ctx, uint8_t address) |
Generic read data function. | |
int16_t | gyro_get_axis (gyro_t *ctx, uint8_t adr_reg_low) |
Function get low and high register data. | |
void | gyro_read_gyro (gyro_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z) |
Function read axis. | |
void gyro_cfg_setup | ( | gyro_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void gyro_default_cfg | ( | gyro_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Gyro click.
int16_t gyro_get_axis | ( | gyro_t * | ctx, |
uint8_t | adr_reg_low ) |
Function get low and high register data.
ctx | Click object. |
adr_reg_low | low data register address |
@description Function get data from two L3GD20 register.
GYRO_RETVAL gyro_init | ( | gyro_t * | ctx, |
gyro_cfg_t * | cfg ) |
Initialization function.
gyro | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t gyro_read_data | ( | gyro_t * | ctx, |
uint8_t | address ) |
Generic read data function.
ctx | Click object. |
address | Register address |
@description Function read byte of data from register address of L3GD20.
void gyro_read_gyro | ( | gyro_t * | ctx, |
int16_t * | gyro_x, | ||
int16_t * | gyro_y, | ||
int16_t * | gyro_z ) |
Function read axis.
ctx | Click object. |
gyro_x | pointer to read Gyro X-axis data |
gyro_y | pointer to read Gyro Y-axis data |
gyro_z | pointer to read Gyro Z-axis data |
@description Function read Gyro X-axis, Y-axis and Z-axis axis.
void gyro_write_data | ( | gyro_t * | ctx, |
uint8_t | address, | ||
uint8_t | write_command ) |
Generic write data function.
ctx | Click object. |
address | Register address |
write_command | Command to write |
@description Function write byte of data to L3GD20.