|
spectral 2.2.0
|
Functions | |
| void | spectral_cfg_setup (spectral_cfg_t *cfg) |
| Config Object Initialization function. | |
| err_t | spectral_init (spectral_t *ctx, spectral_cfg_t *cfg) |
| Initialization function. | |
| void | spectral_module_reset (spectral_t *ctx) |
| Reset module. | |
| void | spectral_uart_write (spectral_t *ctx, uint8_t *data_buf, uint16_t len) |
| Generic write function. | |
| int32_t | spectral_uart_read (spectral_t *ctx, uint8_t *data_buf, uint16_t max_len) |
| Generic read function. | |
| void | spectral_send_command (spectral_t *ctx, uint8_t *command) |
| Send Command. | |
| void | spectral_get_color_data (uint8_t *rsp, uint8_t *xyz_data) |
| Read calibrated X, Y, and Z color data. | |
| void | spectral_get_xyz_data (uint8_t *rsp, uint8_t *xyzr_data) |
| Read raw X, Y, and Z data. | |
| void | spectral_get_xy_small_data (uint8_t *rsp, uint8_t *xy_data) |
| Read calibrated x and y for CIE 1931 color gamut. | |
| uint8_t | spectral_get_lux_data (uint8_t *rsp) |
| Read the calibrated LUX value from the sensor. | |
| uint8_t | spectral_get_cct_data (uint8_t *rsp) |
| Read the calibrated CCT value from the sensor. | |
| void | spectral_get_uv_data (uint8_t *rsp, uint16_t *uv_data) |
| Read calibrated u�, v� and u, v for CIE 1976 color gamut. | |
| void | spectral_get_data (uint8_t *rsp, uint16_t *c_data) |
| Read raw X, Y, Z and NIR data as well as two special internal registers D, & C. | |
| uint8_t | spectral_get_duv_data (uint8_t *rsp) |
| Read calibrated Duv for CIE 1976-color gamut. | |
| void spectral_cfg_setup | ( | spectral_cfg_t * | cfg | ) |
Config Object Initialization function.
| cfg | Click configuration structure. |
This function initializes Click configuration structure to init state.
| uint8_t spectral_get_cct_data | ( | uint8_t * | rsp | ) |
Read the calibrated CCT value from the sensor.
| rsp | pointer to buffer |
| void spectral_get_color_data | ( | uint8_t * | rsp, |
| uint8_t * | xyz_data ) |
Read calibrated X, Y, and Z color data.
| rsp | pointer to buffer |
| xyz_data | pointer to the buffer in which will be written |
| void spectral_get_data | ( | uint8_t * | 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 |
| uint8_t spectral_get_duv_data | ( | uint8_t * | rsp | ) |
Read calibrated Duv for CIE 1976-color gamut.
| rsp | pointer to buffer |
| uint8_t spectral_get_lux_data | ( | uint8_t * | rsp | ) |
Read the calibrated LUX value from the sensor.
| rsp | pointer to buffer |
| void spectral_get_uv_data | ( | uint8_t * | rsp, |
| uint16_t * | uv_data ) |
Read calibrated u�, v� and u, v for CIE 1976 color gamut.
| rsp | pointer to buffer |
| uv_data | pointer to the buffer in which will be written |
| void spectral_get_xy_small_data | ( | uint8_t * | rsp, |
| uint8_t * | xy_data ) |
Read calibrated x and y for CIE 1931 color gamut.
| rsp | pointer to buffer |
| xy_data | pointer to the buffer in which will be written |
| void spectral_get_xyz_data | ( | uint8_t * | rsp, |
| uint8_t * | xyzr_data ) |
Read raw X, Y, and Z data.
| rsp | pointer to buffer |
| xyzr_data | pointer to the buffer in which will be written |
| err_t spectral_init | ( | spectral_t * | ctx, |
| spectral_cfg_t * | cfg ) |
Initialization function.
| spectral | Click object. |
| cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this Click.
| void spectral_module_reset | ( | spectral_t * | ctx | ) |
Reset module.
| spectral | Click object. |
| void spectral_send_command | ( | spectral_t * | ctx, |
| uint8_t * | command ) |
Send Command.
| command | pointer to command string |
| int32_t spectral_uart_read | ( | spectral_t * | ctx, |
| uint8_t * | data_buf, | ||
| uint16_t | max_len ) |
Generic read function.
| spectral | Click object. |
| data_buf | Data buffer for read data. |
| max_len | The maximum length of data that can be read. |
| void spectral_uart_write | ( | spectral_t * | ctx, |
| uint8_t * | data_buf, | ||
| uint16_t | len ) |
Generic write function.
| spectral | Click object. |
| data_buf | Data buffer for sends. |
| len | Number of bytes for sends. |