light 2.0.0.0
light.h File Reference

This file contains API for Light Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  light_t
 Click ctx object definition. More...
 
struct  light_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LIGHT_MAP_MIKROBUS(cfg, mikrobus)
 
#define LIGHT_RETVAL   uint8_t
 
#define LIGHT_OK   0x00
 
#define LIGHT_INIT_ERROR   0xFF
 
#define LIGHT_COMMAND_REG   0x80
 

Functions

void light_cfg_setup (light_cfg_t *cfg)
 Config Object Initialization function.
 
LIGHT_RETVAL light_init (light_t *ctx, light_cfg_t *cfg)
 Initialization function.
 
uint16_t light_read_data (light_t *ctx)
 Generic read data function.
 
uint8_t light_calculate_percent (light_t *ctx, uint16_t light_value)
 Function calculate percent.
 

Detailed Description

This file contains API for Light Click driver.