proximity10 2.0.0.0
|
Functions | |
void | proximity10_cfg_setup (proximity10_cfg_t *cfg) |
Config Object Initialization function. | |
PROXIMITY10_RETVAL | proximity10_init (proximity10_t *ctx, proximity10_cfg_t *cfg) |
Initialization function. | |
void | proximity10_default_cfg (proximity10_t *ctx) |
Click Default Configuration function. | |
uint8_t | proximity10_generic_write (proximity10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
uint8_t | proximity10_generic_read (proximity10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | proximity10_check_int_status (proximity10_t *ctx, uint8_t bit_mask, uint8_t clear_en) |
Check INT Flags function. | |
uint8_t | proximity10_check_chip_status (proximity10_t *ctx, uint8_t bit_mask) |
Check Chip Status function. | |
uint8_t | proximity10_check_int_pin (proximity10_t *ctx) |
Check INT Pin function. | |
uint8_t | proximity10_send_command (proximity10_t *ctx, uint8_t prox_command) |
Command Send function. | |
uint8_t | proximity10_param_query (proximity10_t *ctx, uint8_t param_addr) |
Parameter Query function. | |
uint8_t | proximity10_param_set (proximity10_t *ctx, uint8_t param_addr, uint8_t param_value) |
Parameter Set function. | |
uint8_t | proximity10_param_and (proximity10_t *ctx, uint8_t param_addr, uint8_t param_value) |
Parameter AND function. | |
uint8_t | proximity10_param_or (proximity10_t *ctx, uint8_t param_addr, uint8_t param_value) |
Parameter OR function. | |
void proximity10_cfg_setup | ( | proximity10_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t proximity10_check_chip_status | ( | proximity10_t * | ctx, |
uint8_t | bit_mask ) |
Check Chip Status function.
ctx | Click object. |
bitMask | Selects a flags to be checked |
@description This function checks the desired chip status flags.
uint8_t proximity10_check_int_pin | ( | proximity10_t * | ctx | ) |
Check INT Pin function.
ctx | Click object. |
@description This function checks the INT pin status.
uint8_t proximity10_check_int_status | ( | proximity10_t * | ctx, |
uint8_t | bit_mask, | ||
uint8_t | clear_en ) |
Check INT Flags function.
ctx | Click object. |
bitMask | Selects a flags to be checked |
clearEn | 0 - Disable, 1 - Enable a interrupt clearing by the host |
@description This function checks the desired interrupt flags status.
void proximity10_default_cfg | ( | proximity10_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Proximity10 click.
uint8_t proximity10_generic_read | ( | proximity10_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.
uint8_t proximity10_generic_write | ( | proximity10_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.
PROXIMITY10_RETVAL proximity10_init | ( | proximity10_t * | ctx, |
proximity10_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.
uint8_t proximity10_param_and | ( | proximity10_t * | ctx, |
uint8_t | param_addr, | ||
uint8_t | param_value ) |
Parameter AND function.
ctx | Click object. |
paramAddr | Address of the desired parameter to be modified |
@descritpion This function performs a bit-wise AND operation between selected parameter and entered value, and checks the response.
uint8_t proximity10_param_or | ( | proximity10_t * | ctx, |
uint8_t | param_addr, | ||
uint8_t | param_value ) |
Parameter OR function.
ctx | Click object. |
paramAddr | Address of the desired parameter to be modified |
@description This function performs a bit-wise OR operation between selected parameter and entered value, and checks the response.
uint8_t proximity10_param_query | ( | proximity10_t * | ctx, |
uint8_t | param_addr ) |
Parameter Query function.
ctx | Click object. |
paramAddr | Address of the desired parameter to be read |
@descritpion This function reads the selected parameter and writes value to PARAM_RD register, and checks the response.
uint8_t proximity10_param_set | ( | proximity10_t * | ctx, |
uint8_t | param_addr, | ||
uint8_t | param_value ) |
Parameter Set function.
ctx | Click object. |
paramAddr | Address of the desired parameter to be set |
@description This function sets the selected parameter to the desired value, and checks the response.
uint8_t proximity10_send_command | ( | proximity10_t * | ctx, |
uint8_t | prox_command ) |
Command Send function.
ctx | Click object. |
prox_command | Selects a desired command to be sent |
@description This function allows user to execute a desired command and checks the response.