Header file containing functions prototypes of ADC HAL library. More...
Go to the source code of this file.
Classes | |
struct | _adc_handle |
ADC handle Structure definition. More... | |
struct | _hal_adc_callback |
HAL ADC Callback function definition. More... | |
Typedefs | |
typedef ll_adc_init_t | adc_init_t |
ADC init structure definition. More... | |
typedef struct _adc_handle | adc_handle_t |
ADC handle Structure definition. More... | |
typedef struct _hal_adc_callback | hal_adc_callback_t |
HAL ADC Callback function definition. More... | |
Enumerations | |
enum | hal_adc_state_t { HAL_ADC_STATE_RESET = 0x00, HAL_ADC_STATE_READY = 0x01, HAL_ADC_STATE_BUSY = 0x02, HAL_ADC_STATE_ERROR = 0x04 } |
HAL ADC State Enumerations definition. More... | |
Functions | |
hal_status_t | hal_adc_init (adc_handle_t *p_adc) |
Initialize the ADC according to the specified parameters in the adc_init_t and initialize the associated handle. More... | |
hal_status_t | hal_adc_deinit (adc_handle_t *p_adc) |
De-initialize the ADC peripheral. More... | |
void | hal_adc_msp_init (adc_handle_t *p_adc) |
Initialize the ADC MSP. More... | |
void | hal_adc_msp_deinit (adc_handle_t *p_adc) |
De-initialize the ADC MSP. More... | |
hal_status_t | hal_adc_set_dma_threshold (adc_handle_t *p_adc, uint32_t threshold) |
Set the FIFO threshold for DMA trigger. More... | |
uint32_t | hal_adc_get_dma_threshold (adc_handle_t *p_adc) |
Get the FIFO threshold for DMA trigger. More... | |
hal_status_t | hal_adc_poll_for_conversion (adc_handle_t *p_adc, uint16_t *p_data, uint32_t length) |
Polling for conversion. More... | |
hal_status_t | hal_adc_start_dma (adc_handle_t *p_adc, uint16_t *p_data, uint32_t length) |
DMA for conversion. More... | |
hal_status_t | hal_adc_stop_dma (adc_handle_t *p_adc) |
Abort ongoing conversion (blocking mode). More... | |
void | hal_adc_conv_cplt_callback (adc_handle_t *p_adc) |
Conversion completed callback. More... | |
hal_adc_state_t | hal_adc_get_state (adc_handle_t *p_adc) |
Return the ADC handle state. More... | |
uint32_t | hal_adc_get_error (adc_handle_t *p_adc) |
Return the ADC error code. More... | |
void | hal_adc_suspend_reg (adc_handle_t *p_adc) |
Suspend some registers related to ADC configuration before sleep. More... | |
void | hal_adc_resume_reg (adc_handle_t *p_adc) |
Restore some registers related to ADC configuration after sleep. This function must be used in conjunction with the hal_adc_suspend_reg(). More... | |
hal_pm_status_t | hal_pm_adc_suspend (adc_handle_t *p_adc) |
Suspend the specified ADC. More... | |
void | hal_pm_adc_resume (adc_handle_t *p_adc) |
Resume the specified ADC. More... | |
void | hal_adc_voltage_intern (adc_handle_t *p_adc, uint16_t *p_inbuf, double *p_outbuf, uint32_t buflen) |
Convert the ADC conversion results to a voltage value(internal reference). More... | |
void | hal_adc_voltage_extern (adc_handle_t *p_adc, double vref, uint16_t *p_inbuf, double *p_outbuf, uint32_t buflen) |
Convert the ADC conversion results to a voltage value(external reference). More... | |
void | hal_adc_temperature_conv (adc_handle_t *p_adc, uint16_t *p_inbuf, double *p_outbuf, uint32_t buflen) |
Convert the ADC conversion results to temperature value. More... | |
void | hal_adc_vbat_conv (adc_handle_t *p_adc, uint16_t *p_inbuf, double *p_outbuf, uint32_t buflen) |
Convert the ADC conversion results to battery value. More... | |
Header file containing functions prototypes of ADC HAL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file hal_adc.h.