proximity6
2.0.0.0
|
Functions | |
void | proximity6_cfg_setup (proximity6_cfg_t *cfg) |
Config Object Initialization function. More... | |
PROXIMITY6_RETVAL | proximity6_init (proximity6_t *ctx, proximity6_cfg_t *cfg) |
Initialization function. More... | |
void | proximity6_default_cfg (proximity6_t *ctx) |
Click Default Configuration function. More... | |
void | proximity6_generic_write (proximity6_t *ctx, uint8_t reg, uint16_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | proximity6_generic_read (proximity6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint8_t | proximity6_set_mode (proximity6_t *ctx, uint8_t select_mode) |
Mode Set function. More... | |
uint8_t | proximity6_read_data (proximity6_t *ctx, uint16_t *axis_out) |
Data Read function. More... | |
void | proximity6_get_position (proximity6_t *ctx, uint8_t *position) |
Position Get function. More... | |
uint8_t | proximity6_display_data (proximity6_t *ctx, uint8_t *data_value, uint8_t set_resolution) |
Data Display function. More... | |
void | proximity6_load_settings (proximity6_t *ctx) |
Settings Load function. More... | |
uint8_t | proximity6_check_interrupt (proximity6_t *ctx) |
Interrupt Check function. More... | |
void proximity6_cfg_setup | ( | proximity6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t proximity6_check_interrupt | ( | proximity6_t * | ctx | ) |
Interrupt Check function.
ctx | Click object. |
@description Function checks is interrupt occurred and returns the state of the INT pin. INT pin can be configured to show are data registers updated with the new values or not.
void proximity6_default_cfg | ( | proximity6_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Proximity6 click and sets the registers in default state.
uint8_t proximity6_display_data | ( | proximity6_t * | ctx, |
uint8_t * | data_value, | ||
uint8_t | set_resolution | ||
) |
Data Display function.
ctx | Click object. |
dataValue | Buffer where data be stored |
setResolution | Determines in which resolution the data be shown |
@description Function shows proximity data values in determined resolution as graphic view.
void proximity6_generic_read | ( | proximity6_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 proximity6_generic_write | ( | proximity6_t * | ctx, |
uint8_t | reg, | ||
uint16_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.
void proximity6_get_position | ( | proximity6_t * | ctx, |
uint8_t * | position | ||
) |
Position Get function.
ctx | Click object. |
position | Buffer where position data be stored |
@description Function reads proximity data and checks from which side the object (body) affects on the sensor.
PROXIMITY6_RETVAL proximity6_init | ( | proximity6_t * | ctx, |
proximity6_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.
void proximity6_load_settings | ( | proximity6_t * | ctx | ) |
Settings Load function.
ctx | Click object. |
@description Function loads settings which puts device in proper operating mode.
uint8_t proximity6_read_data | ( | proximity6_t * | ctx, |
uint16_t * | axis_out | ||
) |
Data Read function.
ctx | Click object. |
axisOut | Buffer where data be stored |
@description Function reads proximity data when one or more data register is updated.
uint8_t proximity6_set_mode | ( | proximity6_t * | ctx, |
uint8_t | select_mode | ||
) |
Mode Set function.
ctx | Click object. |
selectMode | 0 - Standby Mode, 1 - Proximity Mode, 2 - Sample Mode, 3 - Idle Mode |
@description Function puts the device in the desired operating mode.