Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
61 #define C10X10RGB_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.di_pin = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
63 cfg.do_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
66 #define SELECT_INVERT( pos , x ) ( ( pos == 0 ) ? x : ( 8 - x ) )
67 #define SELECT_ROTATE( pos , x , y ) ( ( pos == 0 ) ? ( 10 * y + x ) : ( 10 * x + y ) )
68 #define SELECT_INV_BYTE_POS( rotate, x ) ( ( ( rotate & 0x11 ) == 0x11 || ( rotate & 0x11 ) == 0x00 ) ? x : ( 9 - x ) )
74 #define C10X10RGB_RETVAL uint8_t
76 #define C10X10RGB_OK 0x00
77 #define C10X10RGB_INIT_ERROR 0xFF
84 #define LOGIC_ONE 0x01
85 #define LOGIC_ZERO 0x00
87 #define NUM_DATA_BITS 24
88 #define NUM_MATRIX_BYTE 100
89 #define NUX_MAX_CHAR 40
91 #define COLOR_DEFAULT 0x00000000
92 #define BG_COLOR_DEFAULT 0x00000000
93 #define ROTATE_DEFAULT 0x00
95 #define C10X10RGB_BYTE_ROTATE_H_UP 0x00
96 #define C10X10RGB_BYTE_ROTATE_H_DOWN 0x01
97 #define C10X10RGB_BYTE_ROTATE_V_RIGHT 0x11
98 #define C10X10RGB_BYTE_ROTATE_V_LEFT 0x10
100 #define C10X10RGB_SCROLL_ROTATE_H 0x00
101 #define C10X10RGB_SCROLL_ROTATE_V 0x11
103 #define C10X10RGB_CTRL_PIN_LOW 0x00
104 #define C10X10RGB_CTRL_PIN_HIGH 0x01
111 #define C10X10RGB_COLOR_WHITE_100 0x002F2F2F
112 #define C10X10RGB_COLOR_WHITE_75 0x00232323
113 #define C10X10RGB_COLOR_WHITE_50 0x00181818
114 #define C10X10RGB_COLOR_WHITE_25 0x000C0C0C
116 #define C10X10RGB_COLOR_RED_100 0x00002F00
117 #define C10X10RGB_COLOR_RED_75 0x00002300
118 #define C10X10RGB_COLOR_RED_50 0x00001800
119 #define C10X10RGB_COLOR_RED_25 0x00000C00
121 #define C10X10RGB_COLOR_GREEN_100 0x002F0000
122 #define C10X10RGB_COLOR_GREEN_75 0x00230000
123 #define C10X10RGB_COLOR_GREEN_50 0x00180000
124 #define C10X10RGB_COLOR_GREEN_25 0x000C0000
126 #define C10X10RGB_COLOR_BLUE_100 0x0000002F
127 #define C10X10RGB_COLOR_BLUE_75 0x00000023
128 #define C10X10RGB_COLOR_BLUE_50 0x00000018
129 #define C10X10RGB_COLOR_BLUE_25 0x0000000C
131 #define C10X10RGB_COLOR_LIGHT_BLUE_100 0x002F002F
132 #define C10X10RGB_COLOR_LIGHT_BLUE_75 0x00230023
133 #define C10X10RGB_COLOR_LIGHT_BLUE_50 0x00180018
134 #define C10X10RGB_COLOR_LIGHT_BLUE_25 0x000C000C
136 #define C10X10RGB_COLOR_YELLOW_100 0x002F2F00
137 #define C10X10RGB_COLOR_YELLOW_75 0x00232300
138 #define C10X10RGB_COLOR_YELLOW_50 0x00181800
139 #define C10X10RGB_COLOR_YELLOW_25 0x000C0C00
141 #define C10X10RGB_COLOR_PURPLE_100 0x00002F2F
142 #define C10X10RGB_COLOR_PURPLE_75 0x00002323
143 #define C10X10RGB_COLOR_PURPLE_50 0x00001818
144 #define C10X10RGB_COLOR_PURPLE_25 0x00000C0C
146 #define C10X10RGB_COLOR_OFF 0x00000000
322 uint8_t len, uint16_t speed_ms );
338 #endif // _C10X10RGB_H_
Update line object definition.
Definition: c10x10rgb.h:174
uint32_t bg_color
Definition: c10x10rgb.h:165
pin_name_t do_pin
Definition: c10x10rgb.h:219
digital_out_t di_pin
Definition: c10x10rgb.h:199
#define NUM_MATRIX_BYTE
Definition: c10x10rgb.h:88
digital_in_t do_pin
Definition: c10x10rgb.h:202
pin_name_t di_pin
Definition: c10x10rgb.h:218
void(* drv_logic_t)(void)
Definition: c10x10rgb.h:156
void c10x10rgb_display_image(c10x10rgb_t *ctx, const uint32_t *demo_image)
Display image function.
void c10x10rgb_fill_screen(c10x10rgb_t *ctx, uint32_t screen_color)
Fill screen function.
void c10x10rgb_demo_rainbow(c10x10rgb_t *ctx, uint8_t brightness, uint16_t speed_ms)
Demo rainbow function.
drv_logic_t logic_one
Definition: c10x10rgb.h:223
uint8_t new_data
Definition: c10x10rgb.h:175
void c10x10rgb_display_byte(c10x10rgb_t *ctx, c10x10rgb_byte_t *data_obj)
Display byte function.
#define C10X10RGB_RETVAL
Definition: c10x10rgb.h:74
Click configuration structure definition.
Definition: c10x10rgb.h:216
C10X10RGB_RETVAL c10x10rgb_init(c10x10rgb_t *ctx, c10x10rgb_cfg_t *cfg)
Initialization function.
void c10x10rgb_cfg_setup(c10x10rgb_cfg_t *cfg, drv_logic_t logic_zero, drv_logic_t logic_one)
Config Object Initialization function.
uint8_t line_pos
Definition: c10x10rgb.h:177
Byte object definition.
Definition: c10x10rgb.h:162
void c10x10rgb_write_data(c10x10rgb_t *ctx, uint32_t w_data)
Write data function.
drv_logic_t logic_one
Definition: c10x10rgb.h:206
Click ctx object definition.
Definition: c10x10rgb.h:197
uint8_t rotate
Definition: c10x10rgb.h:166
uint32_t color
Definition: c10x10rgb.h:178
drv_logic_t logic_zero
Definition: c10x10rgb.h:222
uint32_t bg_color
Definition: c10x10rgb.h:179
void c10x10rgb_display_string(c10x10rgb_t *ctx, c10x10rgb_byte_t *data_obj, uint8_t len, uint16_t speed_ms)
Display string function.
drv_logic_t logic_zero
Definition: c10x10rgb.h:205
char data_byte
Definition: c10x10rgb.h:163
uint32_t c10x10rgb_make_color(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness)
Make color function.
uint8_t rotate
Definition: c10x10rgb.h:176
uint32_t color
Definition: c10x10rgb.h:164