39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_spi_master.h"
71#define UTS7SEGR_DISPLAY_ON 0x01
72#define UTS7SEGR_DISPLAY_OFF 0x00
74#define UTS7SEGR_DOT_LEFT 0x02
75#define UTS7SEGR_DOT_RIGHT 0x01
76#define UTS7SEGR_DOT_LEFT_RIGHT 0x03
77#define UTS7SEGR_NO_DOT 0x00
95#define UTS7SEGR_MAP_MIKROBUS( cfg, mikrobus ) \
96 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
97 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
98 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
99 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
100 cfg.oe = MIKROBUS( mikrobus, MIKROBUS_PWM );
void uts7segr_cfg_setup(uts7segr_cfg_t *cfg)
UT-S 7-SEG R configuration object setup function.
err_t uts7segr_display_number(uts7segr_t *ctx, uint8_t number, uint8_t dot_pos)
UT-S 7-SEG R display number function.
err_t uts7segr_generic_write(uts7segr_t *ctx, uint8_t *data_in)
UT-S 7-SEG R data writing function.
void uts7segr_display_state(uts7segr_t *ctx, uint8_t state)
UT-S 7-SEG R display state function.
err_t uts7segr_init(uts7segr_t *ctx, uts7segr_cfg_t *cfg)
UT-S 7-SEG R initialization function.
void uts7segr_default_cfg(uts7segr_t *ctx)
UT-S 7-SEG R default configuration function.
UT-S 7-SEG R Click configuration object.
Definition uts7segr.h:128
spi_master_chip_select_polarity_t cs_polarity
Definition uts7segr.h:142
pin_name_t sck
Definition uts7segr.h:133
pin_name_t oe
Definition uts7segr.h:136
spi_master_mode_t spi_mode
Definition uts7segr.h:141
pin_name_t mosi
Definition uts7segr.h:132
uint32_t spi_speed
Definition uts7segr.h:140
pin_name_t miso
Definition uts7segr.h:131
pin_name_t cs
Definition uts7segr.h:134
UT-S 7-SEG R Click context object.
Definition uts7segr.h:110
spi_master_t spi
Definition uts7segr.h:117
digital_out_t oe
Definition uts7segr.h:113
pin_name_t chip_select
Definition uts7segr.h:119
uts7segr_return_value_t
UT-S 7-SEG R Click return value data.
Definition uts7segr.h:151
@ UTS7SEGR_OK
Definition uts7segr.h:152
@ UTS7SEGR_ERROR
Definition uts7segr.h:153