spectral3  2.0.0.0
Data Structures | Macros | Typedefs | Functions
spectral3.h File Reference

This file contains API for Spectral 3 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  spectral3_t
 Click ctx object definition. More...
 
struct  spectral3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define SPECTRAL3_MAP_MIKROBUS(cfg, mikrobus)
 
#define SPECTRAL3_RETVAL   uint8_t
 
#define SPECTRAL3_OK   0x00
 
#define SPECTRAL3_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 

Typedefs

typedef uint8_t spectral3_error_t
 Error type. More...
 

Functions

void spectral3_cfg_setup (spectral3_cfg_t *cfg)
 Config Object Initialization function. More...
 
SPECTRAL3_RETVAL spectral3_init (spectral3_t *ctx, spectral3_cfg_t *cfg)
 Initialization function. More...
 
void spectral3_module_reset (spectral3_t *ctx)
 Reset module. More...
 
void spectral3_set_rst_pin (spectral3_t *ctx, uint8_t state)
 Set RST ( reset ) pin state. More...
 
void spectral3_generic_write (spectral3_t *ctx, char *data_buf, uint16_t len)
 Generic write function. More...
 
uint16_t spectral3_generic_read (spectral3_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function. More...
 
void spectral3_send_command (spectral3_t *ctx, char *command)
 Send command. More...
 
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. More...
 

Detailed Description

This file contains API for Spectral 3 Click driver.