proximity 2.0.0.0
Public function

Functions

void proximity_cfg_setup (proximity_cfg_t *cfg)
 Config Object Initialization function.
 
PROXIMITY_RETVAL proximity_init (proximity_t *ctx, proximity_cfg_t *cfg)
 Initialization function.
 
void proximity_write_byte (proximity_t *ctx, uint8_t w_addr, uint8_t w_data)
 Functions for write one byte in register.
 
uint8_t proximity_read_byte (proximity_t *ctx, uint8_t r_addr)
 Functions for read byte from register.
 
void proximity_read_data (proximity_t *ctx, uint8_t r_addr, uint8_t *rcv_data, uint8_t n_len)
 Functions for read data from register.
 
void proximity_write_data (proximity_t *ctx, uint8_t w_addr, uint8_t *wr_data, uint8_t n_len)
 Functions for write data.
 
void proximity_set_default_mode (proximity_t *ctx)
 Functions for sets default mode.
 
void proximity_set_upper_threshold (proximity_t *ctx)
 Functions for sets upper threshold.
 
uint16_t proximity_read_prox_data (proximity_t *ctx)
 Functions for reads Proximity data.
 
uint16_t proximity_read_ambient_light (proximity_t *ctx)
 Functions for reads Ambient light.
 

Detailed Description

Function Documentation

◆ proximity_cfg_setup()

void proximity_cfg_setup ( proximity_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ proximity_init()

PROXIMITY_RETVAL proximity_init ( proximity_t * ctx,
proximity_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ proximity_read_ambient_light()

uint16_t proximity_read_ambient_light ( proximity_t * ctx)

Functions for reads Ambient light.

Parameters
ctxClick object
Returns
Ambient Light data

◆ proximity_read_byte()

uint8_t proximity_read_byte ( proximity_t * ctx,
uint8_t r_addr )

Functions for read byte from register.

Parameters
ctxClick object
r_addrRegister which will be read
Return values
onebyte data which is read from the register

◆ proximity_read_data()

void proximity_read_data ( proximity_t * ctx,
uint8_t r_addr,
uint8_t * rcv_data,
uint8_t n_len )

Functions for read data from register.

Parameters
ctxClick object
r_addrRegister which will be read
rcv_dataOutput buffer
n_lenNumber of bytes will be reads

◆ proximity_read_prox_data()

uint16_t proximity_read_prox_data ( proximity_t * ctx)

Functions for reads Proximity data.

Parameters
ctxClick object
Returns
Proximity data

◆ proximity_set_default_mode()

void proximity_set_default_mode ( proximity_t * ctx)

Functions for sets default mode.

Parameters
ctxClick object

◆ proximity_set_upper_threshold()

void proximity_set_upper_threshold ( proximity_t * ctx)

Functions for sets upper threshold.

Parameters
ctxClick object

◆ proximity_write_byte()

void proximity_write_byte ( proximity_t * ctx,
uint8_t w_addr,
uint8_t w_data )

Functions for write one byte in register.

Parameters
ctxClick object
w_addrRegister in which the data will be written
w_dataData which be written in the register

◆ proximity_write_data()

void proximity_write_data ( proximity_t * ctx,
uint8_t w_addr,
uint8_t * wr_data,
uint8_t n_len )

Functions for write data.

Parameters
ctxClick object
w_addrRegister
wr_dataBuffer with data
n_lenNumber of bytes will be writting