1 /* 2 * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef __HI_ADC_HAL_H__ 20 #define __HI_ADC_HAL_H__ 21 22 #ifdef __cplusplus 23 #if __cplusplus 24 extern "C" { 25 #endif 26 #endif /* __cplusplus */ 27 28 #define LSADC_IRQ_ID 65 29 #define LSADC_BASE_ADDR 0x120e0000 30 31 #define LSADC_CRG_ADDR 0x120101BC 32 #define ADC_BIT 23 33 34 #define LSADC_MAX_CHN_NUM 2 35 #define LSADC_NUM_BITS 10 36 #define LSADC_CHN_MASK 0x3 37 38 #define GLITCH 0x30 39 #define TIME_SCAN 0x200 40 41 #ifdef __cplusplus 42 #if __cplusplus 43 } 44 #endif 45 #endif /* __cplusplus */ 46 47 #endif /* HI_ADC_HAL_H */ 48