c3dhall3 2.0.0.0
|
Functions | |
void | c3dhall3_cfg_setup (c3dhall3_cfg_t *cfg) |
Config Object Initialization function. | |
C3DHALL3_RETVAL | c3dhall3_init (c3dhall3_t *ctx, c3dhall3_cfg_t *cfg) |
Initialization function. | |
void | c3dhall3_default_cfg (c3dhall3_t *ctx) |
Click Default Configuration function. | |
void | c3dhall3_generic_write (c3dhall3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | c3dhall3_generic_read (c3dhall3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | c3dhall3_read_status (c3dhall3_t *ctx) |
Read status register. | |
int16_t | c3dhall3_read_x (c3dhall3_t *ctx) |
Read X value. | |
int16_t | c3dhall3_read_y (c3dhall3_t *ctx) |
Read Y value. | |
int16_t | c3dhall3_read_z (c3dhall3_t *ctx) |
Read Z value. | |
void | c3dhall3_read_xyz (c3dhall3_t *ctx, int16_t *out_xyz) |
Read XYZ value. | |
void | c3dhall3_write_offset (c3dhall3_t *ctx, uint8_t axis, uint16_t offset) |
Write offset value. | |
uint8_t | c3dhall3_read_interrupt_source (c3dhall3_t *ctx) |
Read interrupt source. | |
void | c3dhall3_interrupt_threshold (c3dhall3_t *ctx, uint16_t threshold) |
Set Interrupt Threshold. | |
uint8_t | c3dhall3_check_int_pin (c3dhall3_t *ctx) |
Check status of the int pin. | |
void c3dhall3_cfg_setup | ( | c3dhall3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t c3dhall3_check_int_pin | ( | c3dhall3_t * | ctx | ) |
Check status of the int pin.
ctx | Click object. |
@description This function gets status of the interrupt pin.
void c3dhall3_default_cfg | ( | c3dhall3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for 3D Hall 3 click.
void c3dhall3_generic_read | ( | c3dhall3_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 c3dhall3_generic_write | ( | c3dhall3_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.
C3DHALL3_RETVAL c3dhall3_init | ( | c3dhall3_t * | ctx, |
c3dhall3_cfg_t * | cfg ) |
Initialization function.
c3dhall3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void c3dhall3_interrupt_threshold | ( | c3dhall3_t * | ctx, |
uint16_t | threshold ) |
Set Interrupt Threshold.
ctx | Click object. |
threshold | Threshold value |
@description This function sets desired threshold value.
uint8_t c3dhall3_read_interrupt_source | ( | c3dhall3_t * | ctx | ) |
Read interrupt source.
ctx | Click object. |
@description This function returns interrupt source value.
uint8_t c3dhall3_read_status | ( | c3dhall3_t * | ctx | ) |
Read status register.
ctx | Click object. |
@description This function reads status from the register.
int16_t c3dhall3_read_x | ( | c3dhall3_t * | ctx | ) |
Read X value.
ctx | Click object. |
@description This function reads x value from the module.
void c3dhall3_read_xyz | ( | c3dhall3_t * | ctx, |
int16_t * | out_xyz ) |
Read XYZ value.
ctx | Click object. |
out_xyz | XYZ register |
@description This function reads xyz values from the module.
int16_t c3dhall3_read_y | ( | c3dhall3_t * | ctx | ) |
Read Y value.
ctx | Click object. |
@description This function reads y value from the module.
int16_t c3dhall3_read_z | ( | c3dhall3_t * | ctx | ) |
Read Z value.
ctx | Click object. |
@description This function reads z value from the module.
void c3dhall3_write_offset | ( | c3dhall3_t * | ctx, |
uint8_t | axis, | ||
uint16_t | offset ) |
Write offset value.
ctx | Click object. |
axis | Axis value |
offset | Offset value |
@description This function writes offest values to the module.