analogmux3 2.0.0.0
|
API for configuring and manipulating Analog MUX 3 Click driver. More...
Topics | |
Analog MUX 3 Registers Settings | |
Settings for registers of Analog MUX 3 Click driver. | |
Analog MUX 3 MikroBUS Map | |
MikroBUS pin mapping of Analog MUX 3 Click driver. | |
Functions | |
void | analogmux3_cfg_setup (analogmux3_cfg_t *cfg) |
Analog MUX 3 configuration object setup function. | |
err_t | analogmux3_init (analogmux3_t *ctx, analogmux3_cfg_t *cfg) |
Analog MUX 3 initialization function. | |
err_t | analogmux3_default_cfg (analogmux3_t *ctx) |
Analog MUX 3 default configuration function. | |
err_t | analogmux3_generic_write (analogmux3_t *ctx, uint8_t data_in) |
Analog MUX 3 data writing function. | |
void | analogmux3_hw_reset (analogmux3_t *ctx) |
Analog MUX 3 reset the device function. | |
err_t | analogmux3_set_channel (analogmux3_t *ctx, uint8_t mux_ch) |
Analog MUX 3 set channel function. | |
err_t | analogmux3_read_an_pin_value (analogmux3_t *ctx, uint16_t *data_out) |
Analog MUX 3 read AN pin value function. | |
err_t | analogmux3_read_an_pin_voltage (analogmux3_t *ctx, float *data_out) |
Analog MUX 3 read AN pin voltage level function. | |
API for configuring and manipulating Analog MUX 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void analogmux3_cfg_setup | ( | analogmux3_cfg_t * | cfg | ) |
Analog MUX 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See analogmux3_cfg_t object definition for detailed explanation. |
err_t analogmux3_default_cfg | ( | analogmux3_t * | ctx | ) |
Analog MUX 3 default configuration function.
This function executes a default configuration of Analog MUX 3 click board.
[in] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t analogmux3_generic_write | ( | analogmux3_t * | ctx, |
uint8_t | data_in ) |
Analog MUX 3 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.void analogmux3_hw_reset | ( | analogmux3_t * | ctx | ) |
Analog MUX 3 reset the device function.
This function executes a hardware reset of Analog MUX 3 click board.
[in] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
err_t analogmux3_init | ( | analogmux3_t * | ctx, |
analogmux3_cfg_t * | cfg ) |
Analog MUX 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See analogmux3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t analogmux3_read_an_pin_value | ( | analogmux3_t * | ctx, |
uint16_t * | data_out ) |
Analog MUX 3 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t analogmux3_read_an_pin_voltage | ( | analogmux3_t * | ctx, |
float * | data_out ) |
Analog MUX 3 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 analogmux3_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t analogmux3_set_channel | ( | analogmux3_t * | ctx, |
uint8_t | mux_ch ) |
Analog MUX 3 set channel function.
This function sets the active channel by using SPI serial interface.
[in] | ctx | : Click context object. See analogmux3_t object definition for detailed explanation. |
[in] | mux_ch | :
|
0
- Success, -1
- Error.