42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_i2c_master.h"
67#define C4DOTMATRIXR_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
69 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
70 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
71 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
72 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
80#define C4DOTMATRIXR_RETVAL uint8_t
82#define C4DOTMATRIXR_OK 0x00
83#define C4DOTMATRIXR_INIT_ERROR 0xFF
86#define C4DOT_IODIRA 0x00
87#define C4DOT_IODIRB 0x01
88#define C4DOT_IPOLA 0x02
89#define C4DOT_IPOLB 0x03
90#define C4DOT_GPINTENA 0x04
91#define C4DOT_GPINTENB 0x05
92#define C4DOT_DEFVALA 0x06
93#define C4DOT_DEFVALB 0x07
94#define C4DOT_INTCONA 0x08
95#define C4DOT_INTCONB 0x09
96#define C4DOT_IOCON 0x0A
97#define C4DOT_GPPUA 0x0C
98#define C4DOT_GPPUB 0x0D
99#define C4DOT_INTFA 0x0E
100#define C4DOT_INTFB 0x0F
101#define C4DOT_INTCAPA 0x10
102#define C4DOT_INTCAPB 0x11
103#define C4DOT_GPIOA 0x12
104#define C4DOT_GPIOB 0x13
105#define C4DOT_OLATA 0x14
106#define C4DOT_OLATB 0x15
#define C4DOTMATRIXR_RETVAL
Definition c4dotmatrixr.h:80
void c4dotmatrixr_generic_write(c4dotmatrixr_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
void c4dot_write_char2(c4dotmatrixr_t *ctx, uint8_t char_value)
4DotMatrix Char 2 Write.
void c4dot_write_char1(c4dotmatrixr_t *ctx, uint8_t char_value)
4DotMatrix Char 1 Write.
void c4dot_write_text(c4dotmatrixr_t *ctx, uint8_t *text_to_write)
4DotMatrix Text Write.
void c4dot_write_char3(c4dotmatrixr_t *ctx, uint8_t char_value)
4DotMatrix Char 3 Write.
void c4dot_write_int_dec(c4dotmatrixr_t *ctx, int16_t int_to_write)
4DotMatrix Decimal Int Write.
void c4dot_write_int_hex(c4dotmatrixr_t *ctx, int16_t int_to_write)
4DotMatrix Hexadecimal Int Write.
void c4dotmatrixr_default_cfg(c4dotmatrixr_t *ctx)
Click Default Configuration function.
void c4dot_write_int_bin(c4dotmatrixr_t *ctx, int16_t int_to_write)
4DotMatrix Binary Int Write.
void c4dot_write_char0(c4dotmatrixr_t *ctx, uint8_t char_value)
4DotMatrix Char 0 Write.
C4DOTMATRIXR_RETVAL c4dotmatrixr_init(c4dotmatrixr_t *ctx, c4dotmatrixr_cfg_t *cfg)
Initialization function.
void c4dot_write_int_oct(c4dotmatrixr_t *ctx, int16_t int_to_write)
4DotMatrix Octal Int Write.
void c4dotmatrixr_generic_read(c4dotmatrixr_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
void c4dot_write_char(c4dotmatrixr_t *ctx, uint8_t char_num, uint8_t char_value)
4DotMatrix Char Write.
void c4dot_write_int(c4dotmatrixr_t *ctx, int16_t int_to_write, uint8_t int_base)
4DotMatrix Int Write.
void c4dotmatrixr_cfg_setup(c4dotmatrixr_cfg_t *cfg)
Config Object Initialization function.
void c4dot_clear_display(c4dotmatrixr_t *ctx)
4DotMatrix Display Clear.
Click configuration structure definition.
Definition c4dotmatrixr.h:140
uint32_t i2c_speed
Definition c4dotmatrixr.h:154
pin_name_t scl
Definition c4dotmatrixr.h:143
pin_name_t pwm
Definition c4dotmatrixr.h:150
pin_name_t sda
Definition c4dotmatrixr.h:144
pin_name_t rst
Definition c4dotmatrixr.h:148
pin_name_t cs
Definition c4dotmatrixr.h:149
uint8_t i2c_address
Definition c4dotmatrixr.h:155
Click ctx object definition.
Definition c4dotmatrixr.h:119
digital_out_t cs
Definition c4dotmatrixr.h:123
digital_out_t pwm
Definition c4dotmatrixr.h:124
i2c_master_t i2c
Definition c4dotmatrixr.h:128
digital_out_t rst
Definition c4dotmatrixr.h:122
uint8_t slave_address
Definition c4dotmatrixr.h:132