geomagnetic 2.0.0.0
|
Functions | |
void | geomagnetic_cfg_setup (geomagnetic_cfg_t *cfg) |
Config Object Initialization function. | |
GEOMAGNETIC_RETVAL | geomagnetic_init (geomagnetic_t *ctx, geomagnetic_cfg_t *cfg) |
Initialization function. | |
void | geomagnetic_default_cfg (geomagnetic_t *ctx) |
Click Default Configuration function. | |
void | geomagnetic_generic_write (geomagnetic_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | geomagnetic_generic_read (geomagnetic_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
GEOMAGNETIC_RETVAL | geomagnetic_write_byte (geomagnetic_t *ctx, uint8_t input_data, uint8_t address) |
Write byte function. | |
GEOMAGNETIC_RETVAL | geomagnetic_read_data (geomagnetic_t *ctx, uint8_t *out_buf, uint8_t address, uint8_t len) |
Read data function. | |
uint8_t | geomagnetic_check_ready (geomagnetic_t *ctx) |
Check ready function. | |
void | geomagnetic_read_axis_data (geomagnetic_t *ctx, geomagnetic_axis_t *geomag_axis, uint16_t *resolution_hall) |
Read axis data function. | |
GEOMAGNETIC_RETVAL | geomagnetic_check_interrupt (geomagnetic_t *ctx) |
Check interrupt function. | |
uint8_t | get_interrupt (geomagnetic_t *ctx) |
Get interrupt function. | |
void | geomagnetic_software_reset (geomagnetic_t *ctx) |
Software reset function. | |
void | geomagnetic_power_on_reset (geomagnetic_t *ctx) |
Power ON reset function. | |
void geomagnetic_cfg_setup | ( | geomagnetic_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
GEOMAGNETIC_RETVAL geomagnetic_check_interrupt | ( | geomagnetic_t * | ctx | ) |
Check interrupt function.
ctx | Click object. |
@description This function returns 1/0 depeinding on the input from the INT pin.
uint8_t geomagnetic_check_ready | ( | geomagnetic_t * | ctx | ) |
Check ready function.
ctx | Click object. |
@description This function gives feedback on whether the device is ready to measure or not.
void geomagnetic_default_cfg | ( | geomagnetic_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for geomagnetic click.
void geomagnetic_generic_read | ( | geomagnetic_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read 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 reads data from the desired register.
void geomagnetic_generic_write | ( | geomagnetic_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
GEOMAGNETIC_RETVAL geomagnetic_init | ( | geomagnetic_t * | ctx, |
geomagnetic_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 geomagnetic_power_on_reset | ( | geomagnetic_t * | ctx | ) |
Power ON reset function.
ctx | Click object. |
@description This function configures some click module registers after the device has been reset.
void geomagnetic_read_axis_data | ( | geomagnetic_t * | ctx, |
geomagnetic_axis_t * | geomag_axis, | ||
uint16_t * | resolution_hall ) |
Read axis data function.
ctx | Click object. |
geomag_axis | Axis structures pointer. |
resolution_hall | Hall effect digital resolution value. |
@description This function sets the x/y/z axis and hall resolution value.
GEOMAGNETIC_RETVAL geomagnetic_read_data | ( | geomagnetic_t * | ctx, |
uint8_t * | out_buf, | ||
uint8_t | address, | ||
uint8_t | len ) |
Read data function.
ctx | Click object. |
out_buf | Output buffer. |
address | Address variable. |
len | Size of the output buffer. |
@description This function reads n bytes of data from the specified address.
void geomagnetic_software_reset | ( | geomagnetic_t * | ctx | ) |
Software reset function.
ctx | Click object. |
@description This function resets the click module.
GEOMAGNETIC_RETVAL geomagnetic_write_byte | ( | geomagnetic_t * | ctx, |
uint8_t | input_data, | ||
uint8_t | address ) |
Write byte function.
ctx | Click object. |
input_data | Input data variable. |
address | Address variable. |
@description This function writes one byte of data to the specified address.
uint8_t get_interrupt | ( | geomagnetic_t * | ctx | ) |
Get interrupt function.
ctx | Click object. |
@description This function returns the input value from the INT pin.