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. | |
void spectral3_cfg_setup | ( | spectral3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t spectral3_generic_read | ( | spectral3_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
spectral3 | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void spectral3_generic_write | ( | spectral3_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
spectral3 | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
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.
rsp | pointer to buffer |
c_data | pointer to the buffer in which will be written |
SPECTRAL3_RETVAL spectral3_init | ( | spectral3_t * | ctx, |
spectral3_cfg_t * | cfg ) |
Initialization function.
spectral3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void spectral3_module_reset | ( | spectral3_t * | ctx | ) |
Reset module.
spectral3 | Click object. |
void spectral3_send_command | ( | spectral3_t * | ctx, |
char * | command ) |
Send command.
spectral3 | Click object. |
command | pointer to command string |
void spectral3_set_rst_pin | ( | spectral3_t * | ctx, |
uint8_t | state ) |
Set RST ( reset ) pin state.
spectral3 | Click object. |
statte | Pin state ( 1 or 0 ). |