compass3 2.0.0.0
|
Functions | |
void | compass3_cfg_setup (compass3_cfg_t *cfg) |
Config Object Initialization function. | |
COMPASS3_RETVAL | compass3_init (compass3_t *ctx, compass3_cfg_t *cfg) |
Initialization function. | |
void | compass3_default_cfg (compass3_t *ctx) |
Click Default Configuration function. | |
void | compass3_generic_write (compass3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | compass3_generic_read (compass3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | compass3_full_measurement (compass3_t *ctx, float *x_val, float *y_val, float *z_val) |
Full measurement function. | |
float | compass3_read_temp (compass3_t *ctx) |
Read temperature function. | |
uint8_t | compass3_check_int (compass3_t *ctx) |
Check interrupt function. | |
void compass3_cfg_setup | ( | compass3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t compass3_check_int | ( | compass3_t * | ctx | ) |
Check interrupt function.
ctx | Click object. |
@description Function checks interrupt occurence.
void compass3_default_cfg | ( | compass3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Compass3 click.
void compass3_full_measurement | ( | compass3_t * | ctx, |
float * | x_val, | ||
float * | y_val, | ||
float * | z_val ) |
Full measurement function.
ctx | Click object. |
x_val | float value of magnetic field across X-axis |
y_val | float value of magnetic field across Y-axis |
z_val | float value of magnetic field across Z-axis |
@description Measures magnetic field surrounding the device.
void compass3_generic_read | ( | compass3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic 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 register.
void compass3_generic_write | ( | compass3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic 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 data to the desired register.
COMPASS3_RETVAL compass3_init | ( | compass3_t * | ctx, |
compass3_cfg_t * | cfg ) |
Initialization function.
compass3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
float compass3_read_temp | ( | compass3_t * | ctx | ) |
Read temperature function.
ctx | Click object. |
@description Function is used to measure temperature.