proximity3
2.0.0.0
|
Functions | |
void | proximity3_cfg_setup (proximity3_cfg_t *cfg) |
Config Object Initialization function. More... | |
PROXIMITY3_RETVAL | proximity3_init (proximity3_t *ctx, proximity3_cfg_t *cfg) |
Initialization function. More... | |
void | proximity3_generic_write (proximity3_t *ctx, uint8_t reg_address, uint16_t data_in) |
Generic write function. More... | |
uint16_t | proximity3_generic_read (proximity3_t *ctx, uint8_t reg_address) |
Generic read function. More... | |
uint16_t | proximity3_read_ambient_light_sensor (proximity3_t *ctx) |
Read ambient light sensor data. More... | |
uint8_t | proximity3_read_proximity (proximity3_t *ctx) |
Read proximity. More... | |
uint8_t | proximity3_get_distance (proximity3_t *ctx) |
Get distance. More... | |
uint16_t | proximity3_get_illuminance (proximity3_t *ctx) |
Get illuminance. More... | |
void proximity3_cfg_setup | ( | proximity3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint16_t proximity3_generic_read | ( | proximity3_t * | ctx, |
uint8_t | reg_address | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
This function reads data from the desired register.
void proximity3_generic_write | ( | proximity3_t * | ctx, |
uint8_t | reg_address, | ||
uint16_t | data_in | ||
) |
Generic write function.
ctx | Click object. |
reg_address | Register address. |
data_in | Data to be written. |
This function writes data to the desired register.
uint8_t proximity3_get_distance | ( | proximity3_t * | ctx | ) |
Get distance.
ctx | Click object. |
This function calculates distance using data reported by sensor.
uint16_t proximity3_get_illuminance | ( | proximity3_t * | ctx | ) |
Get illuminance.
ctx | Click object. |
This function returns illuminance.
PROXIMITY3_RETVAL proximity3_init | ( | proximity3_t * | ctx, |
proximity3_cfg_t * | cfg | ||
) |
Initialization function.
proximity3 | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint16_t proximity3_read_ambient_light_sensor | ( | proximity3_t * | ctx | ) |
Read ambient light sensor data.
ctx | Click object. |
This function gets the data returned by the ambient light sensor.
uint8_t proximity3_read_proximity | ( | proximity3_t * | ctx | ) |
Read proximity.
ctx | Click object. |
This function returns the proximity.