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 BIG7SEG_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 BIG7SEG_RETVAL uint8_t
82#define BIG7SEG_OK 0x00
83#define BIG7SEG_INIT_ERROR 0xFF
#define BIG7SEG_RETVAL
Definition big7seg.h:80
void big7seg_set7seg(big7seg_t *ctx)
BIG7SEG_RETVAL big7seg_init(big7seg_t *ctx, big7seg_cfg_t *cfg)
Initialization function.
void big7seg_cfg_setup(big7seg_cfg_t *cfg)
Config Object Initialization function.
void big7seg_write_data_character(big7seg_t *ctx, char display_char)
void big7seg_display_off(big7seg_t *ctx)
void big7seg_write_data_number(big7seg_t *ctx, uint8_t display_number)
void big7seg_generic_transfer(big7seg_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
Generic transfer function.
void big7seg_write_data(big7seg_t *ctx, uint8_t write_data)
void big7seg_display_on(big7seg_t *ctx)
void big7seg_reset7seg(big7seg_t *ctx)
Click configuration structure definition.
Definition big7seg.h:115
uint8_t spi_mode
Definition big7seg.h:131
spi_master_chip_select_polarity_t cs_polarity
Definition big7seg.h:132
pin_name_t mr
Definition big7seg.h:125
pin_name_t sck
Definition big7seg.h:120
pin_name_t mosi
Definition big7seg.h:119
uint32_t spi_speed
Definition big7seg.h:130
pin_name_t pwm
Definition big7seg.h:126
pin_name_t miso
Definition big7seg.h:118
pin_name_t cs
Definition big7seg.h:121
Click ctx object definition.
Definition big7seg.h:97
digital_out_t cs
Definition big7seg.h:102
spi_master_t spi
Definition big7seg.h:106
digital_out_t pwm
Definition big7seg.h:101
digital_out_t mr
Definition big7seg.h:100
pin_name_t chip_select
Definition big7seg.h:107