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_spi_master.h"
67#define C7SEG_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
69 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
70 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
71 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
72 cfg.mr = MIKROBUS( mikrobus, MIKROBUS_RST ); \
73 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
80#define C7SEG_RETVAL uint8_t
83#define C7SEG_INIT_ERROR 0xFF
90#define C7SEG_DISPLAY_OFF 0
91#define C7SEG_DISPLAY_ON 1
#define C7SEG_RETVAL
Definition c7seg.h:80
void c7seg_write_data(c7seg_t *ctx, uint8_t write_left, uint8_t write_right)
Generic write data function.
C7SEG_RETVAL c7seg_init(c7seg_t *ctx, c7seg_cfg_t *cfg)
Initialization function.
void c7seg_write_data_character(c7seg_t *ctx, char left_char, char right_char)
void c7seg_reset(c7seg_t *ctx)
Click Reset function.
void c7seg_display_mode(c7seg_t *ctx, uint8_t display_mode)
Display mode function.
void c7seg_default_cfg(c7seg_t *ctx)
Click Default Configuration function.
void c7seg_cfg_setup(c7seg_cfg_t *cfg)
Config Object Initialization function.
void c7seg_generic_transfer(c7seg_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
void c7seg_write_data_number(c7seg_t *ctx, uint8_t left_number, uint8_t right_number)
Click configuration structure definition.
Definition c7seg.h:124
spi_master_chip_select_polarity_t cs_polarity
Definition c7seg.h:141
pin_name_t mr
Definition c7seg.h:134
pin_name_t sck
Definition c7seg.h:129
spi_master_mode_t spi_mode
Definition c7seg.h:140
pin_name_t mosi
Definition c7seg.h:128
uint32_t spi_speed
Definition c7seg.h:139
pin_name_t pwm
Definition c7seg.h:135
pin_name_t miso
Definition c7seg.h:127
pin_name_t cs
Definition c7seg.h:130
Click ctx object definition.
Definition c7seg.h:106
digital_out_t cs
Definition c7seg.h:107
spi_master_t spi
Definition c7seg.h:115
digital_out_t pwm
Definition c7seg.h:111
digital_out_t mr
Definition c7seg.h:110
pin_name_t chip_select
Definition c7seg.h:116