Go to the documentation of this file.
39 #ifdef PREINIT_SUPPORTED
43 #ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
51 #include "drv_spi_master.h"
74 #define BARGRAPH5_CHANNELS_NUM 24
80 #define BARGRAPH5_BRIGHTNESS_MIN 0
81 #define BARGRAPH5_BRIGHTNESS_DEFAULT 3000
82 #define BARGRAPH5_BRIGHTNESS_MAX 4095
92 #define BARGRAPH5_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
93 #define BARGRAPH5_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
111 #define BARGRAPH5_MAP_MIKROBUS( cfg, mikrobus ) \
112 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
113 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
114 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
115 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
116 cfg.blank = MIKROBUS( mikrobus, MIKROBUS_PWM );
319 #endif // BARGRAPH5_H
@ BARGRAPH5_BAR_5
Definition: bargraph5.h:172
@ BARGRAPH5_BAR_2
Definition: bargraph5.h:169
pin_name_t mosi
Definition: bargraph5.h:147
bargraph5_bar_sel_t
BarGraph 5 Click select bar channel.
Definition: bargraph5.h:166
pin_name_t sck
Definition: bargraph5.h:148
spi_master_t spi
Definition: bargraph5.h:131
This file contains SPI specific macros, functions, etc.
void bargraph5_output_disable(bargraph5_t *ctx)
BarGraph 5 output disable function.
@ BARGRAPH5_ERROR
Definition: bargraph5.h:197
@ BARGRAPH5_LEVEL_2
Definition: bargraph5.h:184
err_t bargraph5_read_channels(bargraph5_t *ctx)
BarGraph 5 read channels function.
@ BARGRAPH5_BAR_4
Definition: bargraph5.h:171
digital_out_t blank
Definition: bargraph5.h:128
pin_name_t blank
Definition: bargraph5.h:152
pin_name_t chip_select
Definition: bargraph5.h:133
@ BARGRAPH5_LEVEL_4
Definition: bargraph5.h:186
err_t bargraph5_init(bargraph5_t *ctx, bargraph5_cfg_t *cfg)
BarGraph 5 initialization function.
@ BARGRAPH5_OK
Definition: bargraph5.h:196
uint32_t spi_speed
Definition: bargraph5.h:155
@ BARGRAPH5_LEVEL_3
Definition: bargraph5.h:185
@ BARGRAPH5_BAR_3
Definition: bargraph5.h:170
spi_master_chip_select_polarity_t cs_polarity
Definition: bargraph5.h:157
bargraph5_level_t
BarGraph 5 Click bar level.
Definition: bargraph5.h:181
@ BARGRAPH5_BAR_0
Definition: bargraph5.h:167
err_t bargraph5_default_cfg(bargraph5_t *ctx)
BarGraph 5 default configuration function.
@ BARGRAPH5_LEVEL_0
Definition: bargraph5.h:182
err_t bargraph5_set_bar_level(bargraph5_t *ctx, bargraph5_bar_sel_t bar_num, bargraph5_level_t level, uint16_t brightness)
BarGraph 5 set bar level function.
@ BARGRAPH5_BAR_1
Definition: bargraph5.h:168
bargraph5_return_value_t
BarGraph 5 Click return value data.
Definition: bargraph5.h:195
@ BARGRAPH5_LEVEL_1
Definition: bargraph5.h:183
#define BARGRAPH5_CHANNELS_NUM
BarGraph 5 number of output channels.
Definition: bargraph5.h:74
void bargraph5_cfg_setup(bargraph5_cfg_t *cfg)
BarGraph 5 configuration object setup function.
BarGraph 5 Click context object.
Definition: bargraph5.h:126
BarGraph 5 Click configuration object.
Definition: bargraph5.h:144
spi_master_mode_t spi_mode
Definition: bargraph5.h:156
void bargraph5_output_enable(bargraph5_t *ctx)
BarGraph 5 output enable function.
pin_name_t cs
Definition: bargraph5.h:149
err_t bargraph5_write_channels(bargraph5_t *ctx)
BarGraph 5 write channels function.
pin_name_t miso
Definition: bargraph5.h:146