color6 2.0.0.0
Public function

Functions

void color6_cfg_setup (color6_cfg_t *cfg)
 Config Object Initialization function.
 
COLOR6_RETVAL color6_init (color6_t *ctx, color6_cfg_t *cfg)
 Initialization function.
 
void color6_default_cfg (color6_t *ctx)
 Click Default Configuration function.
 
void color6_generic_write (color6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void color6_generic_read (color6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void color6_write_byte (color6_t *ctx, uint8_t reg, uint8_t r_data)
 Functions for write one byte in register.
 
uint8_t color6_read_byte (color6_t *ctx, uint8_t reg)
 Functions for read one byte data from register.
 
uint16_t color6_read_data (color6_t *ctx, uint8_t reg)
 Functions for read data from register.
 
float color6_get_temperature (color6_t *ctx)
 Functions for read temperature.
 
void color6_software_reset (color6_t *ctx)
 Functions for software reset.
 
void color6_go_to_measurement_mode (color6_t *ctx)
 Functions for go to measurement mode.
 
float color6_converting_to_ee (color6_t *ctx, uint8_t channel, uint16_t mres_data)
 Functions for go to measurement mode.
 

Detailed Description

Function Documentation

◆ color6_cfg_setup()

void color6_cfg_setup ( color6_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.

◆ color6_converting_to_ee()

float color6_converting_to_ee ( color6_t * ctx,
uint8_t channel,
uint16_t mres_data )

Functions for go to measurement mode.

Parameters
ctxClick object.
channelchannel from which the data will be converted.
mres_datadata read from the channel.

@description This function should be called before the start measurement.

◆ color6_default_cfg()

void color6_default_cfg ( color6_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Color6 click.

◆ color6_generic_read()

void color6_generic_read ( color6_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.

◆ color6_generic_write()

void color6_generic_write ( color6_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.

◆ color6_get_temperature()

float color6_get_temperature ( color6_t * ctx)

Functions for read temperature.

Parameters
ctxClick object.

@description The measurement result is available as TEMP of the output result registers.

◆ color6_go_to_measurement_mode()

void color6_go_to_measurement_mode ( color6_t * ctx)

Functions for go to measurement mode.

Parameters
ctxClick object.

@description This function should be called before the start measurement.

◆ color6_init()

COLOR6_RETVAL color6_init ( color6_t * ctx,
color6_cfg_t * cfg )

Initialization function.

Parameters
color6Click object.
cfgClick configuration structure.

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

◆ color6_read_byte()

uint8_t color6_read_byte ( color6_t * ctx,
uint8_t reg )

Functions for read one byte data from register.

Parameters
ctxClick object.
regRegister address.

@description This function reads one byte data from register.

◆ color6_read_data()

uint16_t color6_read_data ( color6_t * ctx,
uint8_t reg )

Functions for read data from register.

Parameters
ctxClick object.
regRegister address.

@description This function reads data from register.

◆ color6_software_reset()

void color6_software_reset ( color6_t * ctx)

Functions for software reset.

Parameters
ctxClick object.

@description This function should be called at the start of the program before the configuration of the chip.

◆ color6_write_byte()

void color6_write_byte ( color6_t * ctx,
uint8_t reg,
uint8_t r_data )

Functions for write one byte in register.

Parameters
ctxClick object.
regRegister address.
r_dataRegister data.

@description This function write one byte in register.