analogmux4 2.0.0.0
|
API for configuring and manipulating Analog MUX 4 Click driver. More...
Topics | |
Analog MUX 4 Registers Settings | |
Settings for registers of Analog MUX 4 Click driver. | |
Analog MUX 4 MikroBUS Map | |
MikroBUS pin mapping of Analog MUX 4 Click driver. | |
Functions | |
void | analogmux4_cfg_setup (analogmux4_cfg_t *cfg) |
Analog MUX 4 configuration object setup function. | |
err_t | analogmux4_init (analogmux4_t *ctx, analogmux4_cfg_t *cfg) |
Analog MUX 4 initialization function. | |
err_t | analogmux4_read_an_pin_value (analogmux4_t *ctx, uint16_t *data_out) |
Analog MUX 4 read AN pin value function. | |
err_t | analogmux4_read_an_pin_voltage (analogmux4_t *ctx, float *data_out) |
Analog MUX 4 read AN pin voltage level function. | |
void | analogmux4_enable_input (analogmux4_t *ctx) |
Analog MUX 4 enable input function. | |
void | analogmux4_disable_input (analogmux4_t *ctx) |
Analog MUX 4 disable input function. | |
void | analogmux4_set_input_channel (analogmux4_t *ctx, uint8_t channel) |
Analog MUX 4 set input channel function. | |
API for configuring and manipulating Analog MUX 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 analogmux4_cfg_setup | ( | analogmux4_cfg_t * | cfg | ) |
Analog MUX 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See analogmux4_cfg_t object definition for detailed explanation. |
void analogmux4_disable_input | ( | analogmux4_t * | ctx | ) |
Analog MUX 4 disable input function.
This function disables analog inputs.
[in] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
void analogmux4_enable_input | ( | analogmux4_t * | ctx | ) |
Analog MUX 4 enable input function.
This function enables analog inputs.
[in] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
err_t analogmux4_init | ( | analogmux4_t * | ctx, |
analogmux4_cfg_t * | cfg ) |
Analog MUX 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See analogmux4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t analogmux4_read_an_pin_value | ( | analogmux4_t * | ctx, |
uint16_t * | data_out ) |
Analog MUX 4 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t analogmux4_read_an_pin_voltage | ( | analogmux4_t * | ctx, |
float * | data_out ) |
Analog MUX 4 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.void analogmux4_set_input_channel | ( | analogmux4_t * | ctx, |
uint8_t | channel ) |
Analog MUX 4 set input channel function.
This function sets the analog input channel.
[in] | ctx | : Click context object. See analogmux4_t object definition for detailed explanation. |
[in] | channel | : Channel selection [0-7]. |