bargraph4 2.0.0.0
|
API for configuring and manipulating BarGraph 4 Click driver. More...
Topics | |
BarGraph 4 Settings | |
Settings of BarGraph 4 Click driver. | |
BarGraph 4 MikroBUS Map | |
MikroBUS pin mapping of BarGraph 4 Click driver. | |
Functions | |
void | bargraph4_cfg_setup (bargraph4_cfg_t *cfg) |
BarGraph 4 configuration object setup function. | |
err_t | bargraph4_init (bargraph4_t *ctx, bargraph4_cfg_t *cfg) |
BarGraph 4 initialization function. | |
err_t | bargraph4_set_output (bargraph4_t *ctx, uint16_t ch_mask) |
BarGraph 4 set output function. | |
err_t | bargraph4_read_output (bargraph4_t *ctx, uint16_t *ch_mask) |
BarGraph 4 read output function. | |
void | bargraph4_disable_output (bargraph4_t *ctx) |
BarGraph 4 disable output function. | |
void | bargraph4_enable_output (bargraph4_t *ctx) |
BarGraph 4 enable output function. | |
err_t | bargraph4_set_channel_level (bargraph4_t *ctx, bargraph4_sel_ch_t channel, bargraph4_level_t level) |
BarGraph 4 set channel level function. | |
API for configuring and manipulating BarGraph 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void bargraph4_cfg_setup | ( | bargraph4_cfg_t * | cfg | ) |
BarGraph 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See bargraph4_cfg_t object definition for detailed explanation. |
void bargraph4_disable_output | ( | bargraph4_t * | ctx | ) |
BarGraph 4 disable output function.
This function disables all outputs.
[in] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
void bargraph4_enable_output | ( | bargraph4_t * | ctx | ) |
BarGraph 4 enable output function.
This function enables all outputs.
[in] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
err_t bargraph4_init | ( | bargraph4_t * | ctx, |
bargraph4_cfg_t * | cfg ) |
BarGraph 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See bargraph4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t bargraph4_read_output | ( | bargraph4_t * | ctx, |
uint16_t * | ch_mask ) |
BarGraph 4 read output function.
This function reads the current state of all output by using SPI serial interface.
[in] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
[out] | ch_mask | : Output read bit mask. |
0
- Success, -1
- Error.err_t bargraph4_set_channel_level | ( | bargraph4_t * | ctx, |
bargraph4_sel_ch_t | channel, | ||
bargraph4_level_t | level ) |
BarGraph 4 set channel level function.
This function sets the level of a desired bar graph channel.
[in] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
[in] | channel | : Channel selection. See bargraph4_sel_ch_t enum definition for detailed explanation. |
[in] | level | : Level selection. See bargraph4_level_t enum definition for detailed explanation. |
0
- Success, -1
- Error.err_t bargraph4_set_output | ( | bargraph4_t * | ctx, |
uint16_t | ch_mask ) |
BarGraph 4 set output function.
This function sets all outputs to desired value by using SPI serial interface.
[in] | ctx | : Click context object. See bargraph4_t object definition for detailed explanation. |
[in] | ch_mask | : Output write bit mask. |
0
- Success, -1
- Error.