proximity9 2.0.0.0
|
Functions | |
void | proximity9_cfg_setup (proximity9_cfg_t *cfg) |
Config Object Initialization function. | |
PROXIMITY9_RETVAL | proximity9_init (proximity9_t *ctx, proximity9_cfg_t *cfg) |
Initialization function. | |
void | proximity9_default_cfg (proximity9_t *ctx) |
Click Default Configuration function. | |
void | proximity9_generic_write (proximity9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | proximity9_generic_read (proximity9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
PROXIMITY9_RETVAL | proximity9_read_register (proximity9_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Generic Read function. | |
PROXIMITY9_RETVAL | proximity9_write_register (proximity9_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Generic Write function. | |
uint8_t | proximity9_check_int_pin (proximity9_t *ctx) |
INT Pin Check function. | |
uint8_t | proximity9_check_int_flag (proximity9_t *ctx, uint8_t bit_mask) |
INT Flag Check function. | |
float | proximity9_get_als_lux (proximity9_t *ctx) |
ALS Get function. | |
void proximity9_cfg_setup | ( | proximity9_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t proximity9_check_int_flag | ( | proximity9_t * | ctx, |
uint8_t | bit_mask ) |
INT Flag Check function.
ctx | Click object. |
bit_mask | Selects the flags to be checked |
@description This function allows user to check a desired interrupt flags.
uint8_t proximity9_check_int_pin | ( | proximity9_t * | ctx | ) |
INT Pin Check function.
ctx | Click object. |
@description This function returns the state of the INT pin.
void proximity9_default_cfg | ( | proximity9_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
PROXIMITY9_ALS_CONF_REG: set: PROXIMITY9_ALS_IT_320_MS; PROXIMITY9_PS_CONF_REG: set: PROXIMITY9_PS_OUTPUT_16BIT | PROXIMITY9_PS_INT_TRIGGER_BOTH | PROXIMITY9_PS_IR_ON_1_OFF_80 | PROXIMITY9_PS_IT_8T; PROXIMITY9_PS_MS_REG: set: PROXIMITY9_PS_NORMAL_OP_MODE | PROXIMITY9_LED_I_160_MA; PROXIMITY9_PS_THRSHD_L_REG: set: 30; PROXIMITY9_PS_THRSHD_H_REG: set: 2000;
@description This function executes default configuration for Proximity9 click.
void proximity9_generic_read | ( | proximity9_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 proximity9_generic_write | ( | proximity9_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.
float proximity9_get_als_lux | ( | proximity9_t * | ctx | ) |
ALS Get function.
ctx | Click object. |
@description This function allows user to get the ALS value calculated to lux.
PROXIMITY9_RETVAL proximity9_init | ( | proximity9_t * | ctx, |
proximity9_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.
PROXIMITY9_RETVAL proximity9_read_register | ( | proximity9_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Generic Read function.
ctx | Click object. |
reg_addr | Address which from data be read |
data_out | Memory location where data be stored |
@description This function reads a 16bit data from the desired register.
PROXIMITY9_RETVAL proximity9_write_register | ( | proximity9_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in ) |
Generic Write function.
ctx | Click object. |
reg_addr | Address where data be written |
data_in | Data to be written |
@description This function writes a 16bit data to the desired register.