proximity13 2.0.0.0

Functions

void proximity13_cfg_setup (proximity13_cfg_t *cfg)
 Config Object Initialization function.
 
PROXIMITY13_RETVAL proximity13_init (proximity13_t *ctx, proximity13_cfg_t *cfg)
 Initialization function.
 
void proximity13_default_cfg (proximity13_t *ctx)
 Click Default Configuration function.
 
void proximity13_generic_write (proximity13_t *ctx, uint8_t reg_adr, uint8_t write_data)
 Generic write function.
 
uint8_t proximity13_generic_read (proximity13_t *ctx, uint8_t reg_adr)
 Generic read function.
 
uint8_t proximity13_get_int_pin_status (proximity13_t *ctx)
 Checks status of int pin.
 
uint8_t proximity13_send_command (proximity13_t *ctx, uint8_t cmd_val)
 Sends command to command register.
 
uint8_t proximity13_set_parameter (proximity13_t *ctx, uint8_t param, uint8_t cmd_val)
 Sets parameter.
 
uint8_t porximity13_config_channel (proximity13_t *ctx, uint8_t chn_num, proximity13_config_t cfg_val)
 Configuration of channel.
 
uint8_t porximity13_check_id (proximity13_t *ctx)
 Checks id of the device.
 
void proximity13_read_channels (proximity13_t *ctx, proximity13_chn_val_t *chn_val)
 Reads all enabled channels.
 

Detailed Description

Function Documentation

◆ porximity13_check_id()

uint8_t porximity13_check_id ( proximity13_t * ctx)

Checks id of the device.

Parameters
ctxClick object.
Returns
Returns OK or ERROR status macro

@description This function checks ID

◆ porximity13_config_channel()

uint8_t porximity13_config_channel ( proximity13_t * ctx,
uint8_t chn_num,
proximity13_config_t cfg_val )

Configuration of channel.

Parameters
ctxClick object.
chn_numchannel number
cfg_valconfiguration struct value
Returns
Returns OK if function is done

@description This function configurates specific channel

◆ proximity13_cfg_setup()

void proximity13_cfg_setup ( proximity13_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.

◆ proximity13_default_cfg()

void proximity13_default_cfg ( proximity13_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Proximity13 click.

◆ proximity13_generic_read()

uint8_t proximity13_generic_read ( proximity13_t * ctx,
uint8_t reg_adr )

Generic read function.

Parameters
ctxClick object.
reg_adrRegister address.
Returns
Returns read data

@description This function reads data from the desired register.

◆ proximity13_generic_write()

void proximity13_generic_write ( proximity13_t * ctx,
uint8_t reg_adr,
uint8_t write_data )

Generic write function.

Parameters
ctxClick object.
reg_adrRegister address.
write_dataData to be written.

@description This function writes data to the desired register.

◆ proximity13_get_int_pin_status()

uint8_t proximity13_get_int_pin_status ( proximity13_t * ctx)

Checks status of int pin.

Parameters
ctxClick object.
Returns
0 or 1.

@description This function returns the state of the int pin.

◆ proximity13_init()

PROXIMITY13_RETVAL proximity13_init ( proximity13_t * ctx,
proximity13_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ proximity13_read_channels()

void proximity13_read_channels ( proximity13_t * ctx,
proximity13_chn_val_t * chn_val )

Reads all enabled channels.

Parameters
ctxClick object.
chn_valchannel value structure

@description This function reads all enabled channels

◆ proximity13_send_command()

uint8_t proximity13_send_command ( proximity13_t * ctx,
uint8_t cmd_val )

Sends command to command register.

Parameters
ctxClick object.
cmd_valsending value
Returns
Parameter query

@description This function sends command to command register

◆ proximity13_set_parameter()

uint8_t proximity13_set_parameter ( proximity13_t * ctx,
uint8_t param,
uint8_t cmd_val )

Sets parameter.

Parameters
ctxClick object.
paramparameter
cmd_valsending value
Returns
Returns OK if function is done

@description This function sets paramter