leddriver3 2.0.0.0
leddriver3.h File Reference

This file contains API for LED Driver 3 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  leddriver3_rgb_t
 RGB color value definition. More...
 
struct  leddriver3_t
 Click ctx object definition. More...
 
struct  leddriver3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LEDDRIVER3_MAP_MIKROBUS(cfg, mikrobus)
 
#define LEDDRIVER3_RETVAL   uint8_t
 
#define LEDDRIVER3_OK   0x00
 
#define LEDDRIVER3_INIT_ERROR   0xFF
 
#define LEDDRIVER3_COLOR_RED   0x5F6080
 
#define LEDDRIVER3_COLOR_ORANGE   0x5F6280
 
#define LEDDRIVER3_COLOR_YELLOW   0x5F7480
 
#define LEDDRIVER3_COLOR_GREEN   0x407F80
 
#define LEDDRIVER3_COLOR_BLUE   0x40609F
 
#define LEDDRIVER3_COLOR_WHITE   0x5F7F9F
 
#define LEDDRIVER3_COLOR_PURPLE   0x58609C
 
#define LEDDRIVER3_COLOR_OFF   0x000000
 
#define LEDDRIVER3_TIMER_8ms   0xE1
 
#define LEDDRIVER3_TIMER_16ms   0xE2
 
#define LEDDRIVER3_TIMER_32ms   0xE4
 
#define LEDDRIVER3_TIMER_64ms   0xE8
 
#define LEDDRIVER3_TIMER_128ms   0xE0
 
#define LEDDRIVER3_INTENSITY_1   0x01
 
#define LEDDRIVER3_INTENSITY_2   0x02
 
#define LEDDRIVER3_INTENSITY_4   0x04
 
#define LEDDRIVER3_INTENSITY_8   0x08
 
#define LEDDRIVER3_INTENSITY_16   0x10
 
#define LEDDRIVER3_INCREMENT   0xA0
 
#define LEDDRIVER3_DECREMENT   0xC0
 
#define LEDDRIVER3_CONSTANT   0x20
 

Functions

void leddriver3_cfg_setup (leddriver3_cfg_t *cfg)
 Config Object Initialization function.
 
LEDDRIVER3_RETVAL leddriver3_init (leddriver3_t *ctx, leddriver3_cfg_t *cfg)
 Initialization function.
 
void leddriver3_generic_write (leddriver3_t *ctx, uint8_t reg)
 Generic write function.
 
void leddriver3_generic_read (leddriver3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void leddriver3_set_intensity (leddriver3_t *ctx, uint8_t intensity)
 Set intensity function.
 
void leddriver3_set_rgb_color (leddriver3_t *ctx, leddriver3_rgb_t *rgb)
 Function set RGB color.
 
void leddriver3_set_color (leddriver3_t *ctx, uint32_t color)
 Function set color.
 
void leddriver3_shut_down (leddriver3_t *ctx)
 Shut down function.
 
void leddriver3_set_timer (leddriver3_t *ctx, uint8_t time)
 Set timer function.
 

Detailed Description

This file contains API for LED Driver 3 Click driver.