Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_spi_master.h"
68 #define C8X8G_DECODE_MODE_REG 0x09
69 #define C8X8G_INTENSITY_REG 0x0A
70 #define C8X8G_SCAN_LIMIT_REG 0x0B
71 #define C8X8G_SHUTDOWN_REG 0x0C
72 #define C8X8G_DISPLAY_TEST_REG 0x0F
78 #define C8X8G_NO_DECODE 0x00
79 #define C8X8G_DECODE_DIGIT_0 0x01
80 #define C8X8G_DECODE_DIGIT_3_0 0x0F
81 #define C8X8G_DECODE_DIGIT_7 0xFF
87 #define C8X8G_INTENSITY_1 0x00
88 #define C8X8G_INTENSITY_3 0x01
89 #define C8X8G_INTENSITY_5 0x02
90 #define C8X8G_INTENSITY_7 0x03
91 #define C8X8G_INTENSITY_9 0x04
92 #define C8X8G_INTENSITY_11 0x05
93 #define C8X8G_INTENSITY_13 0x06
94 #define C8X8G_INTENSITY_15 0x07
95 #define C8X8G_INTENSITY_17 0x08
96 #define C8X8G_INTENSITY_19 0x09
97 #define C8X8G_INTENSITY_21 0x0A
98 #define C8X8G_INTENSITY_23 0x0B
99 #define C8X8G_INTENSITY_25 0x0C
100 #define C8X8G_INTENSITY_27 0x0D
101 #define C8X8G_INTENSITY_29 0x0E
102 #define C8X8G_INTENSITY_31 0x0F
108 #define C8X8G_DISPLAY_DIGIT_0 0x00
109 #define C8X8G_DISPLAY_DIGIT_0_1 0x01
110 #define C8X8G_DISPLAY_DIGIT_0_2 0x02
111 #define C8X8G_DISPLAY_DIGIT_0_3 0x03
112 #define C8X8G_DISPLAY_DIGIT_0_4 0x04
113 #define C8X8G_DISPLAY_DIGIT_0_5 0x05
114 #define C8X8G_DISPLAY_DIGIT_0_6 0x06
115 #define C8X8G_DISPLAY_DIGIT_0_7 0x07
121 #define C8X8G_SHUTDOWN_MODE 0x00
122 #define C8X8G_NORMAL_OPERATION 0x01
125 #define C8X8G_DISPLAY_NORMAL_OPERATION 0x00
126 #define C8X8G_DISPLAY_TEST_MODE 0X01
155 #define C8X8G_SPEED_FAST 3
156 #define C8X8G_SPEED_MEDIUM 2
157 #define C8X8G_SPEED_SLOW 1
175 #define C8X8G_MAP_MIKROBUS( cfg, mikrobus ) \
176 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
177 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
178 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
179 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
uint8_t speed_scroll
Definition: c8x8g.h:195
void c8x8g_display_image(c8x8g_t *ctx, uint8_t *p_image)
8x8 G function for displaying image.
8x8 G Click configuration object.
Definition: c8x8g.h:204
@ C8X8G_OK
Definition: c8x8g.h:226
void c8x8g_cfg_setup(c8x8g_cfg_t *cfg)
8x8 G configuration object setup function.
@ C8X8G_ERROR
Definition: c8x8g.h:227
pin_name_t miso
Definition: c8x8g.h:207
spi_master_t spi
Definition: c8x8g.h:191
void c8x8g_display_refresh(c8x8g_t *ctx)
8x8 G function for refresh display.
void c8x8g_write_cmd(c8x8g_t *ctx, uint8_t cmd, uint8_t tx_data)
8x8 G data writing function.
void c8x8g_set_speed_scroll(c8x8g_t *ctx, uint8_t speed)
8x8 G scroll setting function.
void c8x8g_display_byte(c8x8g_t *ctx, char tx_byte)
8x8 G function for displaying one character.
uint32_t spi_speed
Definition: c8x8g.h:214
8x8 G Click context object.
Definition: c8x8g.h:189
spi_master_mode_t spi_mode
Definition: c8x8g.h:215
pin_name_t sck
Definition: c8x8g.h:209
void c8x8g_display_string(c8x8g_t *ctx, char *p_array)
8x8 G function for displaying scrolling string.
void c8x8g_default_cfg(c8x8g_t *ctx)
8x8 G default configuration function.
pin_name_t cs
Definition: c8x8g.h:210
err_t c8x8g_init(c8x8g_t *ctx, c8x8g_cfg_t *cfg)
8x8 G initialization function.
pin_name_t chip_select
Definition: c8x8g.h:193
c8x8g_return_value_t
8x8 G Click return value data.
Definition: c8x8g.h:225
pin_name_t mosi
Definition: c8x8g.h:208
spi_master_chip_select_polarity_t cs_polarity
Definition: c8x8g.h:216