proximity7 2.0.0.0

Functions

void proximity7_cfg_setup (proximity7_cfg_t *cfg)
 Config Object Initialization function.
 
uint8_t proximity7_init (proximity7_t *ctx, proximity7_cfg_t *cfg)
 Initialization function.
 
void proximity7_default_cfg (proximity7_t *ctx)
 Click Default Configuration function.
 
void proximity7_generic_write (proximity7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void proximity7_generic_read (proximity7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t proximity7_set_als_integration_time (proximity7_t *ctx, float integration_time)
 Setting ALS int_pinegration time.
 
uint8_t proximity7_set_proximity_integration_time (proximity7_t *ctx, float integration_time)
 Setting proximity int_pinegration time.
 
uint8_t proximity7_set_wait_time (proximity7_t *ctx, float wait_time)
 Setting wait time.
 
void proximity7_set_low_alsCh0_threshold (proximity7_t *ctx, uint16_t low_als_ch0_threshold)
 Setting low ALS Ch0 threshold value.
 
void proximity7_set_high_alsCh0_threshold (proximity7_t *ctx, uint16_t high_als_ch0_threshold)
 Setting high ALS Ch0 threshold value.
 
void proximity7_set_low_proximity_threshold (proximity7_t *ctx, uint16_t low_proximity_threshold)
 Setting low proximity threshold.
 
void proximity7_set_high_proximity_threshold (proximity7_t *ctx, uint16_t high_proximity_threshold)
 Setting high proximity threshold.
 
void proximity7_set_int_persistance (proximity7_t *ctx, uint16_t proximity_int_persistence, uint16_t als_int_persistence)
 Setting int_pinerrupt persistance.
 
void proximity7_set_proximity_pulse_count (proximity7_t *ctx, uint8_t proximity_pulse_count)
 Setting proximity pulse count.
 
uint16_t proximity7_get_als_data_ch0 (proximity7_t *ctx)
 Getting channel measurement data.
 
uint16_t proximity7_get_als_data_ch1 (proximity7_t *ctx)
 Getting channel 1 measurement data.
 
uint16_t proximity7_get_proximity_data (proximity7_t *ctx)
 Getting proximity measurement data.
 
uint8_t proximity7_set_proximity_offset (proximity7_t *ctx, uint8_t proximity_offset_sign, uint8_t proximity_offset_magnitude)
 Setting proximity offset.
 
float proximity7_get_lux_level (proximity7_t *ctx)
 Calculating LUX level.
 
uint8_t proximity7_get_int_pin (proximity7_t *ctx)
 Checking INT_pin pin status.
 
void proximity7_set_constants (proximity7_t *ctx, proximity7_const_t *set_const_data)
 Generic read function.
 

Detailed Description

Function Documentation

◆ proximity7_cfg_setup()

void proximity7_cfg_setup ( proximity7_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.

◆ proximity7_default_cfg()

void proximity7_default_cfg ( proximity7_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Proximity7 click.

◆ proximity7_generic_read()

void proximity7_generic_read ( proximity7_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf.
lenNumber of the bytes to be read.

@description This function reads data from the desired register.

◆ proximity7_generic_write()

void proximity7_generic_write ( proximity7_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ proximity7_get_als_data_ch0()

uint16_t proximity7_get_als_data_ch0 ( proximity7_t * ctx)

Getting channel measurement data.

Parameters
ctxClick object.

@description This function gets data from channel 0 measurement.

◆ proximity7_get_als_data_ch1()

uint16_t proximity7_get_als_data_ch1 ( proximity7_t * ctx)

Getting channel 1 measurement data.

Parameters
ctxClick object.

@description This function gets data from channel 1 measurement.

◆ proximity7_get_int_pin()

uint8_t proximity7_get_int_pin ( proximity7_t * ctx)

Checking INT_pin pin status.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function returns 0 if INT_pin pin is LOW. This function returns 1 if INT_pin pin is HIGH.

◆ proximity7_get_lux_level()

float proximity7_get_lux_level ( proximity7_t * ctx)

Calculating LUX level.

Parameters
ctxClick object.

@description This function calculates LUX level based on Ch0 and Ch1 data.

◆ proximity7_get_proximity_data()

uint16_t proximity7_get_proximity_data ( proximity7_t * ctx)

Getting proximity measurement data.

Parameters
ctxClick object.

@description This function gets data from proximity measurement.

◆ proximity7_init()

uint8_t proximity7_init ( proximity7_t * ctx,
proximity7_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ proximity7_set_als_integration_time()

uint8_t proximity7_set_als_integration_time ( proximity7_t * ctx,
float integration_time )

Setting ALS int_pinegration time.

Parameters
ctxClick object.
int_pinegration_time_Int_pinegration time.
addr_reg

@description This function sets ALS int_pinegration time.

◆ proximity7_set_constants()

void proximity7_set_constants ( proximity7_t * ctx,
proximity7_const_t * set_const_data )

Generic read function.

Parameters
ctxClick object.
set_const_dataConstant data.

@description This function reads data from the desired register.

◆ proximity7_set_high_alsCh0_threshold()

void proximity7_set_high_alsCh0_threshold ( proximity7_t * ctx,
uint16_t high_als_ch0_threshold )

Setting high ALS Ch0 threshold value.

Parameters
ctxClick object.
high_als_ch0_threshold_High ALS Ch0.

@description This function sets high ALS Ch0 threshold value.

◆ proximity7_set_high_proximity_threshold()

void proximity7_set_high_proximity_threshold ( proximity7_t * ctx,
uint16_t high_proximity_threshold )

Setting high proximity threshold.

Parameters
ctxClick object.
high_proximity_threshold_High proximity.

@description This function sets high proximity threshold.

◆ proximity7_set_int_persistance()

void proximity7_set_int_persistance ( proximity7_t * ctx,
uint16_t proximity_int_persistence,
uint16_t als_int_persistence )

Setting int_pinerrupt persistance.

Parameters
ctxClick object.
als_int_pin_persistenceALS int_pinerrupt.

@description This function sets int_pinerrupt persistance for ALS and Proximity measurements.

◆ proximity7_set_low_alsCh0_threshold()

void proximity7_set_low_alsCh0_threshold ( proximity7_t * ctx,
uint16_t low_als_ch0_threshold )

Setting low ALS Ch0 threshold value.

Parameters
ctxClick object.
low_als_ch0_threshold_Low ALS Ch0.

@description This function sets low ALS Ch0 threshold value.

◆ proximity7_set_low_proximity_threshold()

void proximity7_set_low_proximity_threshold ( proximity7_t * ctx,
uint16_t low_proximity_threshold )

Setting low proximity threshold.

Parameters
ctxClick object.
low_proximity_threshold_Low proximity.

@description This function sets low proximity threshold.

◆ proximity7_set_proximity_integration_time()

uint8_t proximity7_set_proximity_integration_time ( proximity7_t * ctx,
float integration_time )

Setting proximity int_pinegration time.

Parameters
ctxClick object.
int_pinegration_time_Int_pinegration time.

@description This function sets priximity int_pinegration time.

◆ proximity7_set_proximity_offset()

uint8_t proximity7_set_proximity_offset ( proximity7_t * ctx,
uint8_t proximity_offset_sign,
uint8_t proximity_offset_magnitude )

Setting proximity offset.

Parameters
ctxClick object.
proximity_offset_signOffset sign.
proximity_offset_magnitude_Offset magnitude.

@description This function returns 0 if offset value is in range. This function returns 1 if offset value is not in range

◆ proximity7_set_proximity_pulse_count()

void proximity7_set_proximity_pulse_count ( proximity7_t * ctx,
uint8_t proximity_pulse_count )

Setting proximity pulse count.

Parameters
ctxClick object.
proximity_pulse_count_Proximity pulse count.

@description This function sets proximity pulse count.

◆ proximity7_set_wait_time()

uint8_t proximity7_set_wait_time ( proximity7_t * ctx,
float wait_time )

Setting wait time.

Parameters
ctxClick object.
wait_time_Wait time.

@description This function sets wait time.