c2x4rgb  2.1.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
c2x4rgb.h File Reference

This file contains API for 2x4 RGB Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  c2x4rgb_color_t
 2x4 RGB Click RGB color object. More...
 
struct  c2x4rgb_led_t
 2x4 RGB Click led object. More...
 
struct  c2x4rgb_t
 2x4 RGB Click context object. More...
 
struct  c2x4rgb_cfg_t
 2x4 RGB Click configuration object. More...
 

Macros

#define C2X4RGB_LED_0   0
 2x4 RGB LED selection values. More...
 
#define C2X4RGB_LED_1   1
 
#define C2X4RGB_LED_2   2
 
#define C2X4RGB_LED_3   3
 
#define C2X4RGB_LED_4   4
 
#define C2X4RGB_LED_5   5
 
#define C2X4RGB_LED_6   6
 
#define C2X4RGB_LED_7   7
 
#define C2X4RGB_NUM_LEDS   8
 
#define C2X4RGB_LED_BRIGHTNESS_MIN   0
 2x4 RGB LED brightness setting. More...
 
#define C2X4RGB_LED_BRIGHTNESS_DEFAULT   0
 
#define C2X4RGB_LED_BRIGHTNESS_MAX   15
 
#define C2X4RGB_LED_CURRENT_GAIN_MIN   0
 2x4 RGB LED current gain setting. More...
 
#define C2X4RGB_LED_CURRENT_GAIN_DEFAULT   0
 
#define C2X4RGB_LED_CURRENT_GAIN_MAX   15
 
#define C2X4RGB_COLOR_BLACK   0x000000ul
 2x4 RGB 24-bit RGB color codes. More...
 
#define C2X4RGB_COLOR_WHITE   0xFFFFFFul
 
#define C2X4RGB_COLOR_RED   0xFF0000ul
 
#define C2X4RGB_COLOR_LIME   0x00FF00ul
 
#define C2X4RGB_COLOR_BLUE   0x0000FFul
 
#define C2X4RGB_COLOR_YELLOW   0xFFFF00ul
 
#define C2X4RGB_COLOR_CYAN   0x00FFFFul
 
#define C2X4RGB_COLOR_MAGENTA   0xFF00FFul
 
#define C2X4RGB_COLOR_SILVER   0xC0C0C0ul
 
#define C2X4RGB_COLOR_GRAY   0x808080ul
 
#define C2X4RGB_COLOR_MAROON   0x800000ul
 
#define C2X4RGB_COLOR_OLIVE   0x808000ul
 
#define C2X4RGB_COLOR_GREEN   0x008000ul
 
#define C2X4RGB_COLOR_PURPLE   0x800080ul
 
#define C2X4RGB_COLOR_TEAL   0x008080ul
 
#define C2X4RGB_COLOR_NAVY   0x000080ul
 
#define C2X4RGB_NUM_COLORS   16
 
#define C2X4RGB_SIZE_COLOR_NAME   32
 
#define C2X4RGB_MAP_MIKROBUS(cfg, mikrobus)    cfg.din = MIKROBUS( mikrobus, MIKROBUS_PWM );
 MikroBUS pin mapping. More...
 

Typedefs

typedef void(* c2x4rgb_logic_t) (void)
 Function pointer for logic level one and zero. More...
 

Enumerations

enum  c2x4rgb_return_value_t { C2X4RGB_OK = 0, C2X4RGB_ERROR = -1 }
 2x4 RGB Click return value data. More...
 

Functions

void c2x4rgb_cfg_setup (c2x4rgb_cfg_t *cfg)
 2x4 RGB configuration object setup function. More...
 
err_t c2x4rgb_init (c2x4rgb_t *ctx, c2x4rgb_logic_t logic_zero, c2x4rgb_logic_t logic_one, c2x4rgb_cfg_t *cfg)
 2x4 RGB initialization function. More...
 
err_t c2x4rgb_default_cfg (c2x4rgb_t *ctx)
 2x4 RGB default configuration function. More...
 
err_t c2x4rgb_write_leds (c2x4rgb_t *ctx, c2x4rgb_led_t *leds, uint8_t num_leds)
 2x4 RGB write LEDs function. More...
 
err_t c2x4rgb_write_led_matrix (c2x4rgb_t *ctx)
 2x4 RGB write LED matrix function. More...
 
void c2x4rgb_set_led_intensity (c2x4rgb_t *ctx, uint8_t led_num, uint8_t brightness, uint8_t gain)
 2x4 RGB set LED intensity function. More...
 
void c2x4rgb_set_leds_intensity (c2x4rgb_t *ctx, uint8_t brightness, uint8_t gain)
 2x4 RGB set LEDs intensity function. More...
 
void c2x4rgb_set_led_color (c2x4rgb_t *ctx, uint8_t led_num, uint32_t rgb)
 2x4 RGB set LED color function. More...
 
void c2x4rgb_set_leds_color (c2x4rgb_t *ctx, uint32_t rgb)
 2x4 RGB set LEDs color function. More...
 

Detailed Description

This file contains API for 2x4 RGB Click Driver.

Typedef Documentation

◆ c2x4rgb_logic_t

typedef void( * c2x4rgb_logic_t) (void)

Function pointer for logic level one and zero.

Function pointer definition of 2x4 RGB Click driver.

Enumeration Type Documentation

◆ c2x4rgb_return_value_t

2x4 RGB Click return value data.

Predefined enum values for driver return values.

Enumerator
C2X4RGB_OK 
C2X4RGB_ERROR