gaussmeter 2.0.0.0
|
Functions | |
void | gaussmeter_cfg_setup (gaussmeter_cfg_t *cfg) |
Config Object Initialization function. | |
GAUSSMETER_RETVAL | gaussmeter_init (gaussmeter_t *ctx, gaussmeter_cfg_t *cfg) |
Initialization function. | |
void | gaussmeter_default_cfg (gaussmeter_t *ctx) |
Click Default Configuration function. | |
uint8_t | gaussmeter_write_reg (gaussmeter_t *ctx, uint8_t reg_addr, uint16_t transfer_data) |
Write register function. | |
uint8_t | gaussmeter_send_command (gaussmeter_t *ctx, uint8_t command) |
Send command function. | |
void | gaussmeter_enable_measure (gaussmeter_t *ctx, uint8_t temp) |
Enable measure function. | |
uint8_t | gaussmeter_get_data (gaussmeter_t *ctx, float *output_data) |
Get data function. | |
void | gaussmeter_generic_data_transfer (gaussmeter_t *ctx, uint8_t *write_buf, uint8_t write_len, uint8_t *read_buf, uint8_t read_len) |
Generic read function. | |
uint8_t | gaussmeter_digital_read_int (gaussmeter_t *ctx) |
Digital read interrupt function. | |
uint8_t | gaussmeter_digital_read_pwm (gaussmeter_t *ctx) |
Digital read pwm function. | |
void gaussmeter_cfg_setup | ( | gaussmeter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void gaussmeter_default_cfg | ( | gaussmeter_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Gaussmeter click.
uint8_t gaussmeter_digital_read_int | ( | gaussmeter_t * | ctx | ) |
Digital read interrupt function.
ctx | Click object. |
@description This function reads the digital input signal from the INT pin.
uint8_t gaussmeter_digital_read_pwm | ( | gaussmeter_t * | ctx | ) |
Digital read pwm function.
ctx | Click object. |
@description This function reads the digital input signal from the PWM pin.
void gaussmeter_enable_measure | ( | gaussmeter_t * | ctx, |
uint8_t | temp ) |
Enable measure function.
ctx | Click object. |
temp | Command value. |
@description This function enables the measurement function on the chip.
void gaussmeter_generic_data_transfer | ( | gaussmeter_t * | ctx, |
uint8_t * | write_buf, | ||
uint8_t | write_len, | ||
uint8_t * | read_buf, | ||
uint8_t | read_len ) |
Generic read function.
ctx | Click object. |
write_buf | Output data buf |
write_len | Number of the bytes to be written. |
read_buf | Data buf to be written. |
read_len | Number of the bytes to be read. |
@description This function reads data from the desired register.
uint8_t gaussmeter_get_data | ( | gaussmeter_t * | ctx, |
float * | output_data ) |
Get data function.
ctx | Click object. |
output_data | Command value. |
@description This function reads the temperature and axis data from the chip.
GAUSSMETER_RETVAL gaussmeter_init | ( | gaussmeter_t * | ctx, |
gaussmeter_cfg_t * | cfg ) |
Initialization function.
gaussmeter | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t gaussmeter_send_command | ( | gaussmeter_t * | ctx, |
uint8_t | command ) |
Send command function.
ctx | Click object. |
command | Command value. |
@description This function sends a single specified command to the chip and checks for communication errors.
uint8_t gaussmeter_write_reg | ( | gaussmeter_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | transfer_data ) |
Write register function.
ctx | Click object. |
reg_addr | Register address value. |
transfer_data | Data to be transfered. |
@description This function writes 16-bit data to the specified register address.