magneto7 2.0.0.0
|
Functions | |
void | magneto7_cfg_setup (magneto7_cfg_t *cfg) |
Config Object Initialization function. | |
MAGNETO7_RETVAL | magneto7_init (magneto7_t *ctx, magneto7_cfg_t *cfg) |
Initialization function. | |
uint8_t | magneto7_default_cfg (magneto7_t *ctx) |
Click Default Configuration function. | |
void | magneto7_generic_write (magneto7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | magneto7_generic_read (magneto7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | magneto7_int_get (magneto7_t *ctx) |
Getting INT pin state function. | |
uint8_t | magneto7_get_register (magneto7_t *ctx, uint8_t register_address, uint8_t *data_buffer, uint8_t n_data) |
Getting register value(s) function. | |
uint8_t | magneto7_set_register (magneto7_t *ctx, uint8_t register_address, uint8_t *data_buffer, uint8_t n_data) |
Setting register value(s) function. | |
uint8_t | magneto7_set_offset (magneto7_t *ctx, uint8_t offset_axis, uint8_t offset_value) |
Setting offset values function. | |
void | magneto7_get_temperature (magneto7_t *ctx, uint16_t *device_temperature) |
Getting raw device temperature value function. | |
void | magneto7_get_data (magneto7_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis) |
Getting data function. | |
void | magneto7_get_fine_data (magneto7_t *ctx, uint16_t *x_axis, uint16_t *y_axis, uint16_t *z_axis) |
Getting fine data function. | |
float | magneto7_convert_to_ut (magneto7_t *ctx, int16_t raw_data, uint8_t sensor_resolution) |
Getting fine data function. | |
void | magneto7_get_gain_para (magneto7_t *ctx, uint16_t *x_axis, uint16_t *y_axis, uint16_t *z_axis) |
Getting gain data function. | |
void magneto7_cfg_setup | ( | magneto7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
float magneto7_convert_to_ut | ( | magneto7_t * | ctx, |
int16_t | raw_data, | ||
uint8_t | sensor_resolution ) |
Getting fine data function.
ctx | Click object. |
raw_data | Raw data. |
sensor_resolutions | Sensor resolution. |
@description This function converts raw data by dividing raw data with 6 or 24 for 12bit or 14bit data.
uint8_t magneto7_default_cfg | ( | magneto7_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Magneto7 click.
void magneto7_generic_read | ( | magneto7_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 magneto7_generic_write | ( | magneto7_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 magneto7_get_data | ( | magneto7_t * | ctx, |
int16_t * | x_axis, | ||
int16_t * | y_axis, | ||
int16_t * | z_axis ) |
Getting data function.
ctx | Click object. |
x_axis | Address of a variable to store x-axis data. |
y_axis | Address of a variable to store y-axis data. |
z_axis | Address of a variable to store z-axis data. |
@description This function gets data register values and sorts thair content into signed 16bit values.
void magneto7_get_fine_data | ( | magneto7_t * | ctx, |
uint16_t * | x_axis, | ||
uint16_t * | y_axis, | ||
uint16_t * | z_axis ) |
Getting fine data function.
ctx | Click object. |
x_axis | Address of a variable to store x-axis data. |
y_axis | Address of a variable to store y-axis data. |
z_axis | Address of a variable to store z-axis data. |
@description This function gets fine data register values and sorts thair content into unsigned 16bit values.
void magneto7_get_gain_para | ( | magneto7_t * | ctx, |
uint16_t * | x_axis, | ||
uint16_t * | y_axis, | ||
uint16_t * | z_axis ) |
Getting gain data function.
ctx | Click object. |
x_axis | Address of a variable to store x-axis data. |
y_axis | Address of a variable to store y-axis data. |
z_axis | Address of a variable to store z-axis data. |
@description This function gets gain data.
uint8_t magneto7_get_register | ( | magneto7_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | data_buffer, | ||
uint8_t | n_data ) |
Getting register value(s) function.
ctx | Click object. |
register_address | Register address. |
data_buffer | Data buffer. |
n_data | Number of the bytes to be read |
@description This function gets register value(s).
void magneto7_get_temperature | ( | magneto7_t * | ctx, |
uint16_t * | device_temperature ) |
Getting raw device temperature value function.
ctx | Click object. |
device_temperature | Address of a variable to store raw device temperature value. |
@description This function gets raw device temperature value.
MAGNETO7_RETVAL magneto7_init | ( | magneto7_t * | ctx, |
magneto7_cfg_t * | cfg ) |
Initialization function.
magneto7 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t magneto7_int_get | ( | magneto7_t * | ctx | ) |
Getting INT pin state function.
ctx | Click object. |
@description This function returns INT pin state.
uint8_t magneto7_set_offset | ( | magneto7_t * | ctx, |
uint8_t | offset_axis, | ||
uint8_t | offset_value ) |
Setting offset values function.
ctx | Click object. |
offset_axis | Offset axis. |
offset_value | Offset value. |
@description This function sets offset values.
uint8_t magneto7_set_register | ( | magneto7_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | data_buffer, | ||
uint8_t | n_data ) |
Setting register value(s) function.
ctx | Click object. |
register_address | Register address. |
data_buffer | Data buffer. |
n_data | Number of the bytes to be read |
@description This function sets register value(s).