proximity2 2.0.0.0
|
Functions | |
void | proximity2_cfg_setup (proximity2_cfg_t *cfg) |
Config Object Initialization function. | |
PROXIMITY2_RETVAL | proximity2_init (proximity2_t *ctx, proximity2_cfg_t *cfg) |
Initialization function. | |
void | proximity2_default_cfg (proximity2_t *ctx) |
Click Default Configuration function. | |
void | proximity2_generic_write (proximity2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | proximity2_generic_read (proximity2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | proximity2_read_prox (proximity2_t *ctx) |
Read PROX Data Register function. | |
uint16_t | proximity2_read_als (proximity2_t *ctx) |
Read ALS Data Registers function. | |
uint8_t | proximity2_get_int_pin_status (proximity2_t *ctx) |
Get int pin status. | |
void proximity2_cfg_setup | ( | proximity2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void proximity2_default_cfg | ( | proximity2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Proximity2 click.
reg : PROXIMITY2_REG_MAIN_CONFIG ------------------------------------------------- tx_buf : PROXIMITY2_MAIN_CONFIG_DEFAULT
reg : PROXIMITY2_REG_RECEIVE_CONFIG
tx_buf : PROXIMITY2_RECE_CONFIG_DEFAULT
reg : PROXIMITY2_REG_TRANSMIT_CONFIG ------------------------------------------------- tx_buf : PROXIMITY2_LED_DRV_CURRENT_110_MA
void proximity2_generic_read | ( | proximity2_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 proximity2_generic_write | ( | proximity2_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.
uint8_t proximity2_get_int_pin_status | ( | proximity2_t * | ctx | ) |
Get int pin status.
ctx | Click object. |
@description This function is used to read interrupt pin status.
PROXIMITY2_RETVAL proximity2_init | ( | proximity2_t * | ctx, |
proximity2_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.
uint16_t proximity2_read_als | ( | proximity2_t * | ctx | ) |
Read ALS Data Registers function.
ctx | Click object. |
@description This function is used to read both ADC High Byte and ADC Low Byte registers.
uint8_t proximity2_read_prox | ( | proximity2_t * | ctx | ) |
Read PROX Data Register function.
ctx | Click object. |
@description This function is used to read prox data register in order to get data on distance from sensor to an object.