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 UTL7SEGR_DOT_LEFT 0x02
73#define UTL7SEGR_DOT_RIGHT 0x01
74#define UTL7SEGR_DOT_LEFT_RIGHT 0x03
75#define UTL7SEGR_NO_DOT 0x00
77#define UTL7SEGR_DISPLAY_ON 0x01
78#define UTL7SEGR_DISPLAY_OFF 0x00
96#define UTL7SEGR_MAP_MIKROBUS( cfg, mikrobus ) \
97 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
98 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
99 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
100 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
101 cfg.oe = MIKROBUS( mikrobus, MIKROBUS_PWM )
err_t utl7segr_init(utl7segr_t *ctx, utl7segr_cfg_t *cfg)
UT-L 7-SEG R initialization function.
void utl7segr_cfg_setup(utl7segr_cfg_t *cfg)
UT-L 7-SEG R configuration object setup function.
err_t utl7segr_display_number(utl7segr_t *ctx, uint8_t number, uint8_t dot_pos)
UT-L 7-SEG R display number function.
void utl7segr_display_state(utl7segr_t *ctx, uint8_t state)
UT-L 7-SEG R display state function.
err_t utl7segr_generic_write(utl7segr_t *ctx, uint8_t *data_in)
UT-L 7-SEG R data writing function.
void utl7segr_default_cfg(utl7segr_t *ctx)
UT-L 7-SEG R default configuration function.
UT-L 7-SEG R Click configuration object.
Definition utl7segr.h:131
spi_master_chip_select_polarity_t cs_polarity
Definition utl7segr.h:147
pin_name_t sck
Definition utl7segr.h:136
pin_name_t oe
Definition utl7segr.h:141
spi_master_mode_t spi_mode
Definition utl7segr.h:146
pin_name_t mosi
Definition utl7segr.h:135
uint32_t spi_speed
Definition utl7segr.h:145
pin_name_t miso
Definition utl7segr.h:134
pin_name_t cs
Definition utl7segr.h:137
UT-L 7-SEG R Click context object.
Definition utl7segr.h:113
spi_master_t spi
Definition utl7segr.h:120
digital_out_t oe
Definition utl7segr.h:116
pin_name_t chip_select
Definition utl7segr.h:122
utl7segr_return_value_t
UT-L 7-SEG R Click return value data.
Definition utl7segr.h:156
@ UTL7SEGR_ERROR
Definition utl7segr.h:158
@ UTL7SEGR_OK
Definition utl7segr.h:157