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 UTM7SEGR_DOT_LEFT 0x02
73#define UTM7SEGR_DOT_RIGHT 0x01
74#define UTM7SEGR_DOT_LEFT_RIGHT 0x03
75#define UTM7SEGR_NO_DOT 0x00
77#define UTM7SEGR_DISPLAY_ON 0x01
78#define UTM7SEGR_DISPLAY_OFF 0x00
96#define UTM7SEGR_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 )
void utm7segr_cfg_setup(utm7segr_cfg_t *cfg)
UT-M 7-SEG R configuration object setup function.
err_t utm7segr_init(utm7segr_t *ctx, utm7segr_cfg_t *cfg)
UT-M 7-SEG R initialization function.
void utm7segr_display_state(utm7segr_t *ctx, uint8_t state)
UT-M 7-SEG R display state function.
err_t utm7segr_generic_write(utm7segr_t *ctx, uint8_t *data_in)
UT-M 7-SEG R data writing function.
void utm7segr_default_cfg(utm7segr_t *ctx)
UT-M 7-SEG R default configuration function.
err_t utm7segr_display_number(utm7segr_t *ctx, uint8_t number, uint8_t dot_pos)
UT-M 7-SEG R display number function.
UT-M 7-SEG R Click configuration object.
Definition utm7segr.h:131
spi_master_chip_select_polarity_t cs_polarity
Definition utm7segr.h:147
pin_name_t sck
Definition utm7segr.h:136
pin_name_t oe
Definition utm7segr.h:141
spi_master_mode_t spi_mode
Definition utm7segr.h:146
pin_name_t mosi
Definition utm7segr.h:135
uint32_t spi_speed
Definition utm7segr.h:145
pin_name_t miso
Definition utm7segr.h:134
pin_name_t cs
Definition utm7segr.h:137
UT-M 7-SEG R Click context object.
Definition utm7segr.h:113
spi_master_t spi
Definition utm7segr.h:120
digital_out_t oe
Definition utm7segr.h:116
pin_name_t chip_select
Definition utm7segr.h:122
utm7segr_return_value_t
UT-M 7-SEG R Click return value data.
Definition utm7segr.h:156
@ UTM7SEGR_OK
Definition utm7segr.h:157
@ UTM7SEGR_ERROR
Definition utm7segr.h:158