Go to the documentation of this file.
39 #ifdef PREINIT_SUPPORTED
43 #ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
51 #include "drv_i2c_master.h"
73 #define C8800RETRO_REG_DIGIT_0 0x01
74 #define C8800RETRO_REG_DIGIT_1 0x02
75 #define C8800RETRO_REG_DIGIT_2 0x03
76 #define C8800RETRO_REG_DIGIT_3 0x04
77 #define C8800RETRO_REG_DIGIT_4 0x05
78 #define C8800RETRO_REG_DIGIT_5 0x06
79 #define C8800RETRO_REG_DIGIT_6 0x07
80 #define C8800RETRO_REG_DIGIT_7 0x08
81 #define C8800RETRO_REG_DECODE_MODE 0x09
82 #define C8800RETRO_REG_GLOBAL_INTENSITY 0x0A
83 #define C8800RETRO_REG_SCAN_LIMIT 0x0B
84 #define C8800RETRO_REG_SHUTDOWN 0x0C
85 #define C8800RETRO_REG_SELF_ADDRESSING 0x2D
86 #define C8800RETRO_REG_FEATURE 0x0E
87 #define C8800RETRO_REG_DISPLAY_TEST_MODE 0x0F
88 #define C8800RETRO_REG_DIG0_DIG1_INTENSITY 0x10
89 #define C8800RETRO_REG_DIG2_DIG3_INTENSITY 0x11
90 #define C8800RETRO_REG_DIG4_DIG5_INTENSITY 0x12
91 #define C8800RETRO_REG_DIG6_DIG7_INTENSITY 0x13
92 #define C8800RETRO_REG_DIAG_DIGIT_0 0x14
93 #define C8800RETRO_REG_DIAG_DIGIT_1 0x15
94 #define C8800RETRO_REG_DIAG_DIGIT_2 0x16
95 #define C8800RETRO_REG_DIAG_DIGIT_3 0x17
96 #define C8800RETRO_REG_DIAG_DIGIT_4 0x18
97 #define C8800RETRO_REG_DIAG_DIGIT_5 0x19
98 #define C8800RETRO_REG_DIAG_DIGIT_6 0x1A
99 #define C8800RETRO_REG_DIAG_DIGIT_7 0x1B
100 #define C8800RETRO_REG_KEYA 0x1C
101 #define C8800RETRO_REG_KEYB 0x1D
119 #define C8800RETRO_SHUTDOWN_RESET 0x00
120 #define C8800RETRO_SHUTDOWN 0x80
121 #define C8800RETRO_NORMAL_OPERATION_RESET 0x01
122 #define C8800RETRO_NORMAL_OPERATION 0x81
128 #define C8800RETRO_NO_DECODE 0x00
129 #define C8800RETRO_DECODE_0 0x01
130 #define C8800RETRO_DECODE_0_2 0x07
131 #define C8800RETRO_DECODE_0_5 0x3F
132 #define C8800RETRO_DECODE_0_2_5 0x25
138 #define C8800RETRO_FACTORY_SET_ADDRESS 0x00
139 #define C8800RETRO_USER_SET_ADDRESS 0x01
145 #define C8800RETRO_INTENSITY_1 0x00
146 #define C8800RETRO_INTENSITY_2 0x01
147 #define C8800RETRO_INTENSITY_3 0x02
148 #define C8800RETRO_INTENSITY_4 0x03
149 #define C8800RETRO_INTENSITY_5 0x04
150 #define C8800RETRO_INTENSITY_6 0x05
151 #define C8800RETRO_INTENSITY_7 0x06
152 #define C8800RETRO_INTENSITY_8 0x07
153 #define C8800RETRO_INTENSITY_9 0x08
154 #define C8800RETRO_INTENSITY_10 0x09
155 #define C8800RETRO_INTENSITY_11 0x0A
156 #define C8800RETRO_INTENSITY_12 0x0B
157 #define C8800RETRO_INTENSITY_13 0x0C
158 #define C8800RETRO_INTENSITY_14 0x0D
159 #define C8800RETRO_INTENSITY_15 0x0E
160 #define C8800RETRO_INTENSITY_16 0x0F
166 #define C8800RETRO_SCAN_LIMIT_0 0x00
167 #define C8800RETRO_SCAN_LIMIT_0_1 0x01
168 #define C8800RETRO_SCAN_LIMIT_0_2 0x02
169 #define C8800RETRO_SCAN_LIMIT_0_3 0x03
170 #define C8800RETRO_SCAN_LIMIT_0_4 0x04
171 #define C8800RETRO_SCAN_LIMIT_0_5 0x05
172 #define C8800RETRO_SCAN_LIMIT_0_6 0x06
173 #define C8800RETRO_SCAN_LIMIT_0_7 0x07
179 #define C8800RETRO_KEY_NONE 0x0000
180 #define C8800RETRO_KEY_A1 0x8000
181 #define C8800RETRO_KEY_A2 0x4000
182 #define C8800RETRO_KEY_A3 0x2000
183 #define C8800RETRO_KEY_A4 0x1000
184 #define C8800RETRO_KEY_B1 0x0800
185 #define C8800RETRO_KEY_B2 0x0400
186 #define C8800RETRO_KEY_B3 0x0200
187 #define C8800RETRO_KEY_B4 0x0100
188 #define C8800RETRO_KEY_C1 0x0080
189 #define C8800RETRO_KEY_C2 0x0040
190 #define C8800RETRO_KEY_C3 0x0020
191 #define C8800RETRO_KEY_C4 0x0010
192 #define C8800RETRO_KEY_D1 0x0008
193 #define C8800RETRO_KEY_D2 0x0004
194 #define C8800RETRO_KEY_D3 0x0002
195 #define C8800RETRO_KEY_D4 0x0001
201 #define C8800RETRO_SCROLL_SPEED_SLOW 300
202 #define C8800RETRO_SCROLL_SPEED_MEDIUM 150
203 #define C8800RETRO_SCROLL_SPEED_FAST 50
204 #define C8800RETRO_SCROLL_HORIZONTAL_LEFT 0
205 #define C8800RETRO_SCROLL_HORIZONTAL_RIGHT 1
206 #define C8800RETRO_SCROLL_VERTICAL_UP 2
207 #define C8800RETRO_SCROLL_VERTICAL_DOWN 3
214 #define C8800RETRO_SET_DEV_ADDR 0x00
232 #define C8800RETRO_MAP_MIKROBUS( cfg, mikrobus ) \
233 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
234 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
235 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
467 #endif // C8800RETRO_H
uint8_t c8800retro_get_int_pin(c8800retro_t *ctx)
8800 Retro get int pin function.
i2c_master_t i2c
Definition: c8800retro.h:250
uint32_t i2c_speed
Definition: c8800retro.h:268
err_t c8800retro_read_reg(c8800retro_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
8800 Retro read register function.
c8800retro_return_value_t
8800 Retro Click return value data.
Definition: c8800retro.h:278
err_t c8800retro_clear_display(c8800retro_t *ctx)
8800 Retro clear display function.
@ C8800RETRO_ERROR
Definition: c8800retro.h:280
err_t c8800retro_display_image(c8800retro_t *ctx, uint8_t *p_image)
8800 Retro display image function.
err_t c8800retro_write_reg(c8800retro_t *ctx, uint8_t reg, uint8_t data_in)
8800 Retro write register function.
err_t c8800retro_init(c8800retro_t *ctx, c8800retro_cfg_t *cfg)
8800 Retro initialization function.
pin_name_t scl
Definition: c8800retro.h:263
err_t c8800retro_default_cfg(c8800retro_t *ctx)
8800 Retro default configuration function.
err_t c8800retro_display_char(c8800retro_t *ctx, uint8_t char_index)
8800 Retro display char function.
@ C8800RETRO_OK
Definition: c8800retro.h:279
err_t c8800retro_get_keypad(c8800retro_t *ctx, uint16_t *keypad)
8800 Retro get keypad function.
uint8_t i2c_address
Definition: c8800retro.h:269
err_t c8800retro_display_string(c8800retro_t *ctx, uint8_t scroll_mode, uint16_t scroll_speed_ms, uint8_t *text)
8800 Retro display string function.
pin_name_t sda
Definition: c8800retro.h:264
digital_in_t int_pin
Definition: c8800retro.h:247
err_t c8800retro_clear_interrupt(c8800retro_t *ctx)
8800 Retro clear interrupt function.
8800 Retro Click configuration object.
Definition: c8800retro.h:262
void c8800retro_cfg_setup(c8800retro_cfg_t *cfg)
8800 Retro configuration object setup function.
uint8_t slave_address
Definition: c8800retro.h:253
pin_name_t int_pin
Definition: c8800retro.h:266
8800 Retro Click context object.
Definition: c8800retro.h:245