volume2 2.0.0.0
|
API for configuring and manipulating Volume 2 Click driver. More...
Topics | |
Volume 2 Registers List | |
List of registers of Volume 2 Click driver. | |
Volume 2 Registers Settings | |
Settings for registers of Volume 2 Click driver. | |
Volume 2 option List | |
List of mute options of Volume 2 Click driver. | |
Volume 2 MikroBUS Map | |
MikroBUS pin mapping of Volume 2 Click driver. | |
Functions | |
void | volume2_cfg_setup (volume2_cfg_t *cfg) |
Volume 2 configuration object setup function. | |
err_t | volume2_init (volume2_t *ctx, volume2_cfg_t *cfg) |
Volume 2 initialization function. | |
err_t | volume2_default_cfg (volume2_t *ctx) |
Volume 2 default configuration function. | |
err_t | volume2_generic_write (volume2_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Volume 2 I2C writing function. | |
err_t | volume2_generic_read (volume2_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Volume 2 I2C reading function. | |
err_t | volume2_device_mute (volume2_t *ctx, uint8_t mte_state) |
Volume 2 device mute function. | |
err_t | volume2_update_vol_data (volume2_t *ctx, volume2_vol_data_t update_data) |
Volume 2 update volume data function. | |
API for configuring and manipulating Volume 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void volume2_cfg_setup | ( | volume2_cfg_t * | cfg | ) |
Volume 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See volume2_cfg_t object definition for detailed explanation. |
err_t volume2_default_cfg | ( | volume2_t * | ctx | ) |
Volume 2 default configuration function.
This function executes a default configuration of Volume 2 click board.
[in] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t volume2_device_mute | ( | volume2_t * | ctx, |
uint8_t | mte_state ) |
Volume 2 device mute function.
This function is used to set mute on or off by controlling the mte pin.
[in] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
[in] | mte_state | : Device mute state. |
0
- Success, -1
- Error.err_t volume2_generic_read | ( | volume2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Volume 2 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t volume2_generic_write | ( | volume2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Volume 2 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t volume2_init | ( | volume2_t * | ctx, |
volume2_cfg_t * | cfg ) |
Volume 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See volume2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t volume2_update_vol_data | ( | volume2_t * | ctx, |
volume2_vol_data_t | update_data ) |
Volume 2 update volume data function.
This function updates the volume by using direct defined structure options. When adjusting the structure data, it is mandatory to call this function so the changes can take place.
[in] | ctx | : Click context object. See volume2_t object definition for detailed explanation. |
[in] | update_data | : Volume data structure. |
0
- Success, -1
- Error.