39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_spi_master.h"
72#define C8X8Y_DECODE_MODE_REG 0x09
73#define C8X8Y_INTENSITY_REG 0x0A
74#define C8X8Y_SCAN_LIMIT_REG 0x0B
75#define C8X8Y_SHUTDOWN_REG 0x0C
76#define C8X8Y_DISPLAY_TEST_REG 0x0F
82#define C8X8Y_NO_DECODE 0x00
83#define C8X8Y_DECODE_DIGIT_0 0x01
84#define C8X8Y_DECODE_DIGIT_3_0 0x0F
85#define C8X8Y_DECODE_DIGIT_7 0xFF
91#define C8X8Y_INTENSITY_1 0x00
92#define C8X8Y_INTENSITY_3 0x01
93#define C8X8Y_INTENSITY_5 0x02
94#define C8X8Y_INTENSITY_7 0x03
95#define C8X8Y_INTENSITY_9 0x04
96#define C8X8Y_INTENSITY_11 0x05
97#define C8X8Y_INTENSITY_13 0x06
98#define C8X8Y_INTENSITY_15 0x07
99#define C8X8Y_INTENSITY_17 0x08
100#define C8X8Y_INTENSITY_19 0x09
101#define C8X8Y_INTENSITY_21 0x0A
102#define C8X8Y_INTENSITY_23 0x0B
103#define C8X8Y_INTENSITY_25 0x0C
104#define C8X8Y_INTENSITY_27 0x0D
105#define C8X8Y_INTENSITY_29 0x0E
106#define C8X8Y_INTENSITY_31 0x0F
112#define C8X8Y_DISPLAY_DIGIT_0 0x00
113#define C8X8Y_DISPLAY_DIGIT_0_1 0x01
114#define C8X8Y_DISPLAY_DIGIT_0_2 0x02
115#define C8X8Y_DISPLAY_DIGIT_0_3 0x03
116#define C8X8Y_DISPLAY_DIGIT_0_4 0x04
117#define C8X8Y_DISPLAY_DIGIT_0_5 0x05
118#define C8X8Y_DISPLAY_DIGIT_0_6 0x06
119#define C8X8Y_DISPLAY_DIGIT_0_7 0x07
125#define C8X8Y_SHUTDOWN_MODE 0x00
126#define C8X8Y_NORMAL_OPERATION 0x01
129#define C8X8Y_DISPLAY_NORMAL_OPERATION 0x00
130#define C8X8Y_DISPLAY_TEST_MODE 0X01
159#define C8X8Y_SPEED_FAST 3
160#define C8X8Y_SPEED_MEDIUM 2
161#define C8X8Y_SPEED_SLOW 1
179#define C8X8Y_MAP_MIKROBUS( cfg, mikrobus ) \
180 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
181 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
182 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
183 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
c8x8y_return_value_t
8x8 Y Click return value data.
Definition c8x8y.h:229
@ C8X8Y_OK
Definition c8x8y.h:230
@ C8X8Y_ERROR
Definition c8x8y.h:231
void c8x8y_display_string(c8x8y_t *ctx, char *p_array)
8x8 Y function for displaying scrolling string.
err_t c8x8y_init(c8x8y_t *ctx, c8x8y_cfg_t *cfg)
8x8 Y initialization function.
void c8x8y_cfg_setup(c8x8y_cfg_t *cfg)
8x8 Y configuration object setup function.
void c8x8y_write_cmd(c8x8y_t *ctx, uint8_t cmd, uint8_t tx_data)
8x8 Y data writing function.
void c8x8y_display_refresh(c8x8y_t *ctx)
8x8 Y function for refresh display.
void c8x8y_display_byte(c8x8y_t *ctx, char tx_byte)
8x8 Y function for displaying one character.
void c8x8y_display_image(c8x8y_t *ctx, uint8_t *p_image)
8x8 Y function for displaying image.
void c8x8y_default_cfg(c8x8y_t *ctx)
8x8 Y default configuration function.
void c8x8y_set_speed_scroll(c8x8y_t *ctx, uint8_t speed)
8x8 Y scroll setting function.
8x8 Y Click configuration object.
Definition c8x8y.h:208
spi_master_chip_select_polarity_t cs_polarity
Definition c8x8y.h:220
pin_name_t sck
Definition c8x8y.h:213
spi_master_mode_t spi_mode
Definition c8x8y.h:219
pin_name_t mosi
Definition c8x8y.h:212
uint32_t spi_speed
Definition c8x8y.h:218
pin_name_t miso
Definition c8x8y.h:211
pin_name_t cs
Definition c8x8y.h:214
8x8 Y Click context object.
Definition c8x8y.h:193
spi_master_t spi
Definition c8x8y.h:195
uint8_t speed_scroll
Definition c8x8y.h:199
pin_name_t chip_select
Definition c8x8y.h:197