magneto5 2.0.0.0
|
Functions | |
void | magneto5_cfg_setup (magneto5_cfg_t *cfg) |
Config Object Initialization function. | |
MAGNETO5_RETVAL | magneto5_init (magneto5_t *ctx, magneto5_cfg_t *cfg) |
Initialization function. | |
void | magneto5_default_cfg (magneto5_t *ctx) |
Click Default Configuration function. | |
void | magneto5_generic_write (magneto5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | magneto5_generic_read (magneto5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | magneto5_set_status_reg (magneto5_t *ctx) |
Functions reads status register. | |
uint8_t | magneto5_get_product_id (magneto5_t *ctx) |
Functions reads product ID from register. | |
void | magneto5_get_axis_data (magneto5_t *ctx, int16_t *axis_buffer, uint8_t max_resolution) |
Functions reads axis data. | |
float | magneto5_get_axis_value (magneto5_t *ctx, uint8_t axis, uint8_t max_resolution) |
Functions reads axis data value. | |
void | magneto5_config_register_0 (magneto5_t *ctx, uint8_t config_data) |
Functions sets configuration register 0. | |
void | magneto5_config_register_1 (magneto5_t *ctx, uint8_t config_data) |
Functions sets configuration register 1. | |
void | magneto5_reset (magneto5_t *ctx) |
Functions for reset data. | |
void magneto5_cfg_setup | ( | magneto5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void magneto5_config_register_0 | ( | magneto5_t * | ctx, |
uint8_t | config_data ) |
Functions sets configuration register 0.
ctx | Click object. |
config_data | Data which be set. |
@description Options for set: Take measurement, Continuous Measurement Mode, Frequency in continuous measurement mode (1.5Hz, 13Hz, 25Hz or 50 Hz), No Boost ( disable the charge pump ) SET / RESET Refill Cap.
void magneto5_config_register_1 | ( | magneto5_t * | ctx, |
uint8_t | config_data ) |
Functions sets configuration register 1.
ctx | Click object. |
config_data | Data which be set. |
@description Options for set: X/Y/Z channel measurements, Self Test, Temperature test, Soft reset.
void magneto5_default_cfg | ( | magneto5_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Magneto5 click.
void magneto5_generic_read | ( | magneto5_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 magneto5_generic_write | ( | magneto5_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.
void magneto5_get_axis_data | ( | magneto5_t * | ctx, |
int16_t * | axis_buffer, | ||
uint8_t | max_resolution ) |
Functions reads axis data.
ctx | Click object. |
axis_buffer | Buffer in which axis data will be written. |
max_resolution | Maximum resolution axis value. |
@description This function gets axis data.
float magneto5_get_axis_value | ( | magneto5_t * | ctx, |
uint8_t | axis, | ||
uint8_t | max_resolution ) |
Functions reads axis data value.
ctx | Click object. |
axis | Axis which be read. |
max_resolution | Maximum resolution axis value. |
@description This function float axis value.
uint8_t magneto5_get_product_id | ( | magneto5_t * | ctx | ) |
Functions reads product ID from register.
ctx | Click object. |
@description The function gets product id.
MAGNETO5_RETVAL magneto5_init | ( | magneto5_t * | ctx, |
magneto5_cfg_t * | cfg ) |
Initialization function.
magneto5 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void magneto5_reset | ( | magneto5_t * | ctx | ) |
Functions for reset data.
ctx | Click object. |
@description This function is reset.
uint8_t magneto5_set_status_reg | ( | magneto5_t * | ctx | ) |
Functions reads status register.
ctx | Click object. |
@description The function is used to check if the chip is ready to read data and measurment data.