compass 2.0.0.0
|
Functions | |
void | compass_cfg_setup (compass_cfg_t *cfg) |
Config Object Initialization function. | |
COMPASS_RETVAL | compass_init (compass_t *ctx, compass_cfg_t *cfg) |
Initialization function. | |
void | compass_accel_generic_write (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic accel write function. | |
void | compass_magnet_generic_write (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic magnet write function. | |
void | compass_accel_generic_read (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic accel read function. | |
void | compass_magnet_generic_read (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic magnet read function. | |
void | compass_default_config (compass_t *ctx) |
Default config function. | |
void | compass_read_accel_axis (compass_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis) |
Accel axes read function. | |
void | compass_read_magnet_axis (compass_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis) |
Magnet axes read function. | |
void compass_accel_generic_read | ( | compass_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic accel read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf. |
len | Number of the bytes to be read. |
@description This function reads data from the desired accelerometer register.
void compass_accel_generic_write | ( | compass_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic accel write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes accelerometer data to the desired register.
void compass_cfg_setup | ( | compass_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void compass_default_config | ( | compass_t * | ctx | ) |
Default config function.
ctx | Click object. |
@description This function does default configuration for the chip.
COMPASS_RETVAL compass_init | ( | compass_t * | ctx, |
compass_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void compass_magnet_generic_read | ( | compass_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic magnet read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf. |
len | Number of the bytes to be read. |
@description This function reads data from the desired magnetic register.
void compass_magnet_generic_write | ( | compass_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic magnet write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes magnet data to the desired register.
void compass_read_accel_axis | ( | compass_t * | ctx, |
int16_t * | x_axis, | ||
int16_t * | y_axis, | ||
int16_t * | z_axis ) |
Accel axes read function.
ctx | Click object. |
x_axis | X axis value. |
y_axis | Y axis value. |
z_axis | Z axis value. |
@description This function reads data for accelerometer axes.
void compass_read_magnet_axis | ( | compass_t * | ctx, |
int16_t * | x_axis, | ||
int16_t * | y_axis, | ||
int16_t * | z_axis ) |
Magnet axes read function.
ctx | Click object. |
x_axis | X axis value. |
y_axis | Y axis value. |
z_axis | Z axis value. |
@description This function reads data for megnetic axes.