lighttemp 2.0.0.0
lighttemp.h File Reference

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

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_pwm.h"

Go to the source code of this file.

Data Structures

struct  lighttemp_t
 Click ctx object definition. More...
 
struct  lighttemp_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LIGHTTEMP_MAP_MIKROBUS(cfg, mikrobus)
 
#define LIGHTTEMP_RETVAL   uint8_t
 
#define LIGHTTEMP_OK   0x00
 
#define LIGHTTEMP_INIT_ERROR   0xFF
 
#define LIGHTTEMP_DEF_FREQ   20000
 

Functions

void lighttemp_cfg_setup (lighttemp_cfg_t *cfg)
 Config Object Initialization function.
 
LIGHTTEMP_RETVAL lighttemp_init (lighttemp_t *ctx, lighttemp_cfg_t *cfg)
 Initialization function.
 
void lighttemp_generic_write (lighttemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void lighttemp_generic_read (lighttemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t lighttemp_get_pg_voltage (lighttemp_t *ctx)
 Get voltage.
 
uint8_t lighttemp_get_interrupt_state (lighttemp_t *ctx)
 Get INT pin state.
 
void lighttemp_led1_set_duty_cycle (lighttemp_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle for LED1.
 
void lighttemp_led1_pwm_stop (lighttemp_t *ctx)
 Stop PWM module for LED1.
 
void lighttemp_led1_pwm_start (lighttemp_t *ctx)
 Start PWM module for LED1.
 
void lighttemp_led2_set_duty_cycle (lighttemp_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle for LED2.
 
void lighttemp_led2_pwm_stop (lighttemp_t *ctx)
 Stop PWM module for LED2.
 
void lighttemp_led2_pwm_start (lighttemp_t *ctx)
 Start PWM module for LED2.
 

Detailed Description

This file contains API for Light Temp Click driver.