spectral3 2.0.0.0

Functions

void spectral3_cfg_setup (spectral3_cfg_t *cfg)
 Config Object Initialization function.
 
SPECTRAL3_RETVAL spectral3_init (spectral3_t *ctx, spectral3_cfg_t *cfg)
 Initialization function.
 
void spectral3_module_reset (spectral3_t *ctx)
 Reset module.
 
void spectral3_set_rst_pin (spectral3_t *ctx, uint8_t state)
 Set RST ( reset ) pin state.
 
void spectral3_generic_write (spectral3_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t spectral3_generic_read (spectral3_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void spectral3_send_command (spectral3_t *ctx, char *command)
 Send command.
 
void spectral3_get_data (char *rsp, uint16_t *c_data)
 Read raw X, Y, Z and NIR data as well as two special internal registers D, & C.
 

Detailed Description

Function Documentation

◆ spectral3_cfg_setup()

void spectral3_cfg_setup ( spectral3_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.

◆ spectral3_generic_read()

int32_t spectral3_generic_read ( spectral3_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
spectral3Click object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ spectral3_generic_write()

void spectral3_generic_write ( spectral3_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
spectral3Click object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ spectral3_get_data()

void spectral3_get_data ( char * rsp,
uint16_t * c_data )

Read raw X, Y, Z and NIR data as well as two special internal registers D, & C.

Parameters
rsppointer to buffer
c_datapointer to the buffer in which will be written

◆ spectral3_init()

SPECTRAL3_RETVAL spectral3_init ( spectral3_t * ctx,
spectral3_cfg_t * cfg )

Initialization function.

Parameters
spectral3Click object.
cfgClick configuration structure.

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

◆ spectral3_module_reset()

void spectral3_module_reset ( spectral3_t * ctx)

Reset module.

Parameters
spectral3Click object.

◆ spectral3_send_command()

void spectral3_send_command ( spectral3_t * ctx,
char * command )

Send command.

Parameters
spectral3Click object.
commandpointer to command string

◆ spectral3_set_rst_pin()

void spectral3_set_rst_pin ( spectral3_t * ctx,
uint8_t state )

Set RST ( reset ) pin state.

Parameters
spectral3Click object.
stattePin state ( 1 or 0 ).