Functions | |
| cy_rslt_t | cyhal_adc_init (cyhal_adc_t *obj, cyhal_gpio_t pin, const cyhal_clock_divider_t *clk) |
| void | cyhal_adc_free (cyhal_adc_t *obj) |
| cy_rslt_t cyhal_adc_init | ( | cyhal_adc_t * | obj, |
| cyhal_gpio_t | pin, | ||
| const cyhal_clock_divider_t * | clk | ||
| ) |
Initialize ADC peripheral
| [out] | obj | The adc object to initialize |
| [in] | pin | A pin corresponding to the ADC block to initialize Note: This pin is not reserved, it is just used to identify which ADC block to allocate. If multiple channels will be allocated for a single ADC instance, only one pin should be passed here; it does not matter which one. After calling this function once, call cyhal_adc_channel_init once for each pin whose value should be measured. |
| [in] | clk | The clock to use can be shared, if not provided a new clock will be allocated |
| void cyhal_adc_free | ( | cyhal_adc_t * | obj | ) |
Uninitialize the ADC peripheral and cyhal_adc_t object
| [in,out] | obj | The ADC object |