bargraph5
2.1.0.0
|
API for configuring and manipulating BarGraph 5 Click driver. More...
Modules | |
BarGraph 5 Registers Settings | |
Settings for registers of BarGraph 5 Click driver. | |
BarGraph 5 MikroBUS Map | |
MikroBUS pin mapping of BarGraph 5 Click driver. | |
Functions | |
void | bargraph5_cfg_setup (bargraph5_cfg_t *cfg) |
BarGraph 5 configuration object setup function. More... | |
err_t | bargraph5_init (bargraph5_t *ctx, bargraph5_cfg_t *cfg) |
BarGraph 5 initialization function. More... | |
err_t | bargraph5_default_cfg (bargraph5_t *ctx) |
BarGraph 5 default configuration function. More... | |
err_t | bargraph5_write_channels (bargraph5_t *ctx) |
BarGraph 5 write channels function. More... | |
err_t | bargraph5_read_channels (bargraph5_t *ctx) |
BarGraph 5 read channels function. More... | |
void | bargraph5_output_enable (bargraph5_t *ctx) |
BarGraph 5 output enable function. More... | |
void | bargraph5_output_disable (bargraph5_t *ctx) |
BarGraph 5 output disable function. More... | |
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. More... | |
API for configuring and manipulating BarGraph 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void bargraph5_cfg_setup | ( | bargraph5_cfg_t * | cfg | ) |
BarGraph 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See bargraph5_cfg_t object definition for detailed explanation. |
err_t bargraph5_default_cfg | ( | bargraph5_t * | ctx | ) |
BarGraph 5 default configuration function.
This function executes a default configuration of BarGraph 5 click board.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t bargraph5_init | ( | bargraph5_t * | ctx, |
bargraph5_cfg_t * | cfg | ||
) |
BarGraph 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See bargraph5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void bargraph5_output_disable | ( | bargraph5_t * | ctx | ) |
BarGraph 5 output disable function.
This function disables the BarGraph LEDs output by setting the BLANK pin to high logic state.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void bargraph5_output_enable | ( | bargraph5_t * | ctx | ) |
BarGraph 5 output enable function.
This function enables the BarGraph LEDs output by setting the BLANK pin to low logic state.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t bargraph5_read_channels | ( | bargraph5_t * | ctx | ) |
BarGraph 5 read channels function.
This function reads all 24 output channels by using SPI serial interface and stores the results in the ctx->channels array.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
This function sets the level of a selected BarGraph channel at the selected brightness.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
[in] | bar_num | : Bar channel selection [0-5]. See bargraph5_bar_sel_t enum definition for detailed explanation. |
[in] | level | : Bar level selection [0-4]. See bargraph5_level_t enum definition for detailed explanation. |
[in] | brightness | : Bar level brightness [0-4095]. |
0
- Success, -1
- Error.err_t bargraph5_write_channels | ( | bargraph5_t * | ctx | ) |
BarGraph 5 write channels function.
This function writes all 24 output channels from the ctx->channels array by using SPI serial interface.
[in] | ctx | : Click context object. See bargraph5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.