mtkernel_3/device/adc/sysdepend/rx231/adc_rx231.h | bare source | permlink (0.00 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * Device Driver for micro T-Kernel for μT-Kernel 3.0 4: * 5: * Copyright (C) 2020 by Ken Sakamura. 6: * This software is distributed under the T-License 2.2. 7: *---------------------------------------------------------------------- 8: * 9: * Released by TRON Forum(http://www.tron.org) at 2020/10/21. 10: * 11: *---------------------------------------------------------------------- 12: */ 13: 14: 15: /* 16: * dev_adc_rx231.h 17: * A/D converter device driver 18: * System-dependent definition for TX03_RX231 19: */ 20: 21: #ifndef __DEV_ADC_RX231_H__ 22: #define __DEV_ADC_RX231_H__ 23: 24: #define DEV_ADC_UNITNM (1) /* Number of devive units */ 25: #define DEV_ADC_UNIT0 (0) 26: 27: #define ADC_CH_NUM (24) /* Number of A/DC chanels */ 28: 29: /* 30: * ADC registers 31: */ 32: #define ADCSR (0x00089000) /* A/D control reg. */ 33: #define ADCSR_ADST (1<<15) 34: #define ADCSR_ADIE (1<<12) 35: 36: #define ADCER (0x0008900E) /* A/D Control extension reg. */ 37: #define ADCER_INI (1<<5) /* register initial value */ 38: 39: 40: #define ADANSA0 (0x00089004) /* A/D chanel select reg. A0*/ 41: #define ADANSA1 (0x00089006) /* A/D chanel select reg. A1*/ 42: #define ADANSB0 (0x00089014) /* A/D chanel select reg. B0*/ 43: #define ADANSB1 (0x00089016) /* A/D chanel select reg. B1*/ 44: 45: #define ADDR(c) (0x00089020 + 2*c) /* A/D Data reg. */ 46: 47: /* A/D Sampling state reg. */ 48: #define ADSSTRL (0x000890DD) 49: #define ADSSTRT (0x000890DE) 50: #define ADSSTRO (0x000890DF) 51: #define ADSSTR(c) (0x000890E0 + c) 52: 53: 54: /* 55: * A/D converter interrupt number 56: */ 57: #define INTNO_S10ADI0 102 58: 59: 60: #endif /* __DEV_ADC_RX231_H__ */