/**************************************************************************//** * @file adc.h * @version V1.00 * $Revision: 6 $ * $Date: 15/10/05 7:00p $ * @brief NUC980 ADC driver header file * * @note * SPDX-License-Identifier: Apache-2.0 * Copyright (C) 2018 Nuvoton Technology Corp. All rights reserved. *****************************************************************************/ #ifndef __NU_ADC_H__ #define __NU_ADC_H__ #ifdef __cplusplus extern "C" { #endif /** @addtogroup Standard_Driver Standard Driver @{ */ /** @addtogroup ADC_Driver ADC Driver @{ */ /** @addtogroup ADC_EXPORTED_CONSTANTS ADC Exported Constants @{ */ #define ADC_ERR_ARGS 1 /*!< The arguments is wrong */ #define ADC_ERR_CMD 2 /*!< The command is wrong */ /// @cond HIDDEN_SYMBOLS typedef INT32(*ADC_CALLBACK)(UINT32 status, UINT32 userData); /// @endcond HIDDEN_SYMBOLS /*---------------------------------------------------------------------------------------------------------*/ /* ADC_CTL constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define ADC_CTL_ADEN 0x00000001 /*!< ADC Power Control */ #define ADC_CTL_VBGEN 0x00000002 /*!< ADC Internal Bandgap Power Control */ #define ADC_CTL_MST 0x00000100 /*!< Menu Start Conversion */ /*---------------------------------------------------------------------------------------------------------*/ /* ADC_CONF constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define ADC_CONF_NACEN 0x00000004 /*!< Normal AD Conversion Enable */ #define ADC_CONF_SELFTEN 0x00000400 /*!< Selft Test Enable */ #define ADC_CONF_HSPEED (1<<22) /*!< High Speed Enable */ #define ADC_CONF_CHSEL_Pos 12 /*!< Channel Selection Position */ #define ADC_CONF_CHSEL_Msk (0xF<