|
microwave4 2.2.0
|
API for configuring and manipulating Microwave 4 Click driver. More...
Topics | |
| Microwave 4 Registers Settings | |
| Settings for registers of Microwave 4 Click driver. | |
| Microwave 4 MikroBUS Map | |
| MikroBUS pin mapping of Microwave 4 Click driver. | |
Functions | |
| void | microwave4_cfg_setup (microwave4_cfg_t *cfg) |
| Microwave 4 configuration object setup function. | |
| void | microwave4_drv_interface_sel (microwave4_cfg_t *cfg, microwave4_drv_t drv_sel) |
| Microwave 4 driver interface setup function. | |
| err_t | microwave4_init (microwave4_t *ctx, microwave4_cfg_t *cfg) |
| Microwave 4 initialization function. | |
| err_t | microwave4_read_raw_adc (microwave4_t *ctx, uint16_t *raw_adc) |
| Microwave 4 read raw ADC value function. | |
| err_t | microwave4_read_voltage (microwave4_t *ctx, float *voltage) |
| Microwave 4 read voltage level function. | |
| err_t | microwave4_set_vref (microwave4_t *ctx, float vref) |
| Microwave 4 set vref function. | |
API for configuring and manipulating Microwave 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 microwave4_cfg_setup | ( | microwave4_cfg_t * | cfg | ) |
Microwave 4 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See microwave4_cfg_t object definition for detailed explanation. |
| void microwave4_drv_interface_sel | ( | microwave4_cfg_t * | cfg, |
| microwave4_drv_t | drv_sel ) |
Microwave 4 driver interface setup function.
This function sets a serial driver interface which will be used further in the Click driver.
| [out] | cfg | : Click configuration structure. See microwave4_cfg_t object definition for detailed explanation. |
| [in] | drv_sel | : Driver interface selection. See microwave4_drv_t object definition for detailed explanation. |
| err_t microwave4_init | ( | microwave4_t * | ctx, |
| microwave4_cfg_t * | cfg ) |
Microwave 4 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See microwave4_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See microwave4_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t microwave4_read_raw_adc | ( | microwave4_t * | ctx, |
| uint16_t * | raw_adc ) |
Microwave 4 read raw ADC value function.
This function reads raw ADC value.
| [in] | ctx | : Click context object. See microwave4_t object definition for detailed explanation. |
| [out] | raw_adc | : Output ADC result. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t microwave4_read_voltage | ( | microwave4_t * | ctx, |
| float * | voltage ) |
Microwave 4 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
| [in] | ctx | : Click context object. See microwave4_t object definition for detailed explanation. |
| [out] | voltage | : Output voltage level [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t microwave4_set_vref | ( | microwave4_t * | ctx, |
| float | vref ) |
Microwave 4 set vref function.
This function sets the voltage reference for Microwave 4 Click driver.
| [in] | ctx | : Click context object. See microwave4_t object definition for detailed explanation. |
| [in] | vref | : Reference voltage (volts). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.