c10x10rgb 2.0.0.0
c10x10rgb.h File Reference

This file contains API for 10x10 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  c10x10rgb_byte_t
 Byte object definition. More...
 
struct  drv_update_line_t
 Update line object definition. More...
 
struct  drv_scroll_buf_t
 Scroll buffer object definition. More...
 
struct  c10x10rgb_t
 Click ctx object definition. More...
 
struct  c10x10rgb_cfg_t
 Click configuration structure definition. More...
 

Macros

#define C10X10RGB_MAP_MIKROBUS(cfg, mikrobus)
 
#define SELECT_INVERT(pos, x)   ( ( pos == 0 ) ? x : ( 8 - x ) )
 
#define SELECT_ROTATE(pos, x, y)   ( ( pos == 0 ) ? ( 10 * y + x ) : ( 10 * x + y ) )
 
#define SELECT_INV_BYTE_POS(rotate, x)   ( ( ( rotate & 0x11 ) == 0x11 || ( rotate & 0x11 ) == 0x00 ) ? x : ( 9 - x ) )
 
#define C10X10RGB_RETVAL   uint8_t
 
#define C10X10RGB_OK   0x00
 
#define C10X10RGB_INIT_ERROR   0xFF
 
#define LOGIC_ONE   0x01
 
#define LOGIC_ZERO   0x00
 
#define NUM_DATA_BITS   24
 
#define NUM_MATRIX_BYTE   100
 
#define NUX_MAX_CHAR   40
 
#define COLOR_DEFAULT   0x00000000
 
#define BG_COLOR_DEFAULT   0x00000000
 
#define ROTATE_DEFAULT   0x00
 
#define C10X10RGB_BYTE_ROTATE_H_UP   0x00
 
#define C10X10RGB_BYTE_ROTATE_H_DOWN   0x01
 
#define C10X10RGB_BYTE_ROTATE_V_RIGHT   0x11
 
#define C10X10RGB_BYTE_ROTATE_V_LEFT   0x10
 
#define C10X10RGB_SCROLL_ROTATE_H   0x00
 
#define C10X10RGB_SCROLL_ROTATE_V   0x11
 
#define C10X10RGB_CTRL_PIN_LOW   0x00
 
#define C10X10RGB_CTRL_PIN_HIGH   0x01
 
#define C10X10RGB_COLOR_WHITE_100   0x002F2F2F
 
#define C10X10RGB_COLOR_WHITE_75   0x00232323
 
#define C10X10RGB_COLOR_WHITE_50   0x00181818
 
#define C10X10RGB_COLOR_WHITE_25   0x000C0C0C
 
#define C10X10RGB_COLOR_RED_100   0x00002F00
 
#define C10X10RGB_COLOR_RED_75   0x00002300
 
#define C10X10RGB_COLOR_RED_50   0x00001800
 
#define C10X10RGB_COLOR_RED_25   0x00000C00
 
#define C10X10RGB_COLOR_GREEN_100   0x002F0000
 
#define C10X10RGB_COLOR_GREEN_75   0x00230000
 
#define C10X10RGB_COLOR_GREEN_50   0x00180000
 
#define C10X10RGB_COLOR_GREEN_25   0x000C0000
 
#define C10X10RGB_COLOR_BLUE_100   0x0000002F
 
#define C10X10RGB_COLOR_BLUE_75   0x00000023
 
#define C10X10RGB_COLOR_BLUE_50   0x00000018
 
#define C10X10RGB_COLOR_BLUE_25   0x0000000C
 
#define C10X10RGB_COLOR_LIGHT_BLUE_100   0x002F002F
 
#define C10X10RGB_COLOR_LIGHT_BLUE_75   0x00230023
 
#define C10X10RGB_COLOR_LIGHT_BLUE_50   0x00180018
 
#define C10X10RGB_COLOR_LIGHT_BLUE_25   0x000C000C
 
#define C10X10RGB_COLOR_YELLOW_100   0x002F2F00
 
#define C10X10RGB_COLOR_YELLOW_75   0x00232300
 
#define C10X10RGB_COLOR_YELLOW_50   0x00181800
 
#define C10X10RGB_COLOR_YELLOW_25   0x000C0C00
 
#define C10X10RGB_COLOR_PURPLE_100   0x00002F2F
 
#define C10X10RGB_COLOR_PURPLE_75   0x00002323
 
#define C10X10RGB_COLOR_PURPLE_50   0x00001818
 
#define C10X10RGB_COLOR_PURPLE_25   0x00000C0C
 
#define C10X10RGB_COLOR_OFF   0x00000000
 

Typedefs

typedef void(* drv_logic_t) (void)
 

Functions

void c10x10rgb_cfg_setup (c10x10rgb_cfg_t *cfg, drv_logic_t logic_zero, drv_logic_t logic_one)
 Config Object Initialization function.
 
C10X10RGB_RETVAL c10x10rgb_init (c10x10rgb_t *ctx, c10x10rgb_cfg_t *cfg)
 Initialization function.
 
void c10x10rgb_write_data (c10x10rgb_t *ctx, uint32_t w_data)
 Write data function.
 
void c10x10rgb_fill_screen (c10x10rgb_t *ctx, uint32_t screen_color)
 Fill screen function.
 
uint32_t c10x10rgb_make_color (uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness)
 Make color function.
 
void c10x10rgb_display_image (c10x10rgb_t *ctx, const uint32_t *demo_image)
 Display image function.
 
void c10x10rgb_display_byte (c10x10rgb_t *ctx, c10x10rgb_byte_t *data_obj)
 Display byte function.
 
void c10x10rgb_display_string (c10x10rgb_t *ctx, c10x10rgb_byte_t *data_obj, uint8_t len, uint16_t speed_ms)
 Display string function.
 
void c10x10rgb_demo_rainbow (c10x10rgb_t *ctx, uint8_t brightness, uint16_t speed_ms)
 Demo rainbow function.
 

Detailed Description

This file contains API for 10x10 RGB Click driver.