mux5 2.1.0.0
|
API for configuring and manipulating MUX 5 Click driver. More...
Topics | |
MUX 5 Registers List | |
List of registers of MUX 5 Click driver. | |
MUX 5 Registers Settings | |
Settings for registers of MUX 5 Click driver. | |
MUX 5 MikroBUS Map | |
MikroBUS pin mapping of MUX 5 Click driver. | |
Functions | |
void | mux5_cfg_setup (mux5_cfg_t *cfg) |
MUX 5 configuration object setup function. | |
err_t | mux5_init (mux5_t *ctx, mux5_cfg_t *cfg) |
MUX 5 initialization function. | |
err_t | mux5_default_cfg (mux5_t *ctx) |
MUX 5 default configuration function. | |
err_t | mux5_i2c_write_register (mux5_t *ctx, uint8_t reg, uint8_t data_in) |
MUX 5 I2C write register function. | |
err_t | mux5_i2c_read_register (mux5_t *ctx, uint8_t reg, uint8_t *data_out) |
MUX 5 I2C read register function. | |
err_t | mux5_set_channels_state (mux5_t *ctx, uint16_t ch_mask, uint8_t ch_state) |
MUX 5 set channels state function. | |
void | mux5_enable_device (mux5_t *ctx) |
MUX 5 enable device function. | |
void | mux5_disable_device (mux5_t *ctx) |
MUX 5 disable device function. | |
uint8_t | mux5_get_com_a_pin (mux5_t *ctx) |
MUX 5 get com a pin function. | |
uint8_t | mux5_get_com_b_pin (mux5_t *ctx) |
MUX 5 get com b pin function. | |
API for configuring and manipulating MUX 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 mux5_cfg_setup | ( | mux5_cfg_t * | cfg | ) |
MUX 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See mux5_cfg_t object definition for detailed explanation. |
err_t mux5_default_cfg | ( | mux5_t * | ctx | ) |
MUX 5 default configuration function.
This function executes a default configuration of MUX 5 click board.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void mux5_disable_device | ( | mux5_t * | ctx | ) |
MUX 5 disable device function.
This function disables the device by setting the shutdown (SD) pin to low logic state.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
void mux5_enable_device | ( | mux5_t * | ctx | ) |
MUX 5 enable device function.
This function enables the device by setting the shutdown (SD) pin to high logic state.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
uint8_t mux5_get_com_a_pin | ( | mux5_t * | ctx | ) |
MUX 5 get com a pin function.
This function returns the COM A pin logic state.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
uint8_t mux5_get_com_b_pin | ( | mux5_t * | ctx | ) |
MUX 5 get com b pin function.
This function returns the COM B pin logic state.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
err_t mux5_i2c_read_register | ( | mux5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
MUX 5 I2C read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mux5_i2c_write_register | ( | mux5_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
MUX 5 I2C write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mux5_init | ( | mux5_t * | ctx, |
mux5_cfg_t * | cfg ) |
MUX 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See mux5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mux5_set_channels_state | ( | mux5_t * | ctx, |
uint16_t | ch_mask, | ||
uint8_t | ch_state ) |
MUX 5 set channels state function.
This function sets a desired ch_state of the channels selected with ch_mask.
[in] | ctx | : Click context object. See mux5_t object definition for detailed explanation. |
[in] | ch_mask | : Bit mask of channels to set. |
[in] | ch_state | : Channel state.
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.