TMPM4G(1) Group Peripheral Driver User Manual
V1.0.0.0
|
This file provides all the functions prototypes for ADC driver. More...
Go to the source code of this file.
Data Structures | |
struct | adc_clock_t |
Clock information structure definition. More... | |
struct | adc_cmpx_t |
Clock information structure definition. More... | |
struct | adc_initial_setting_t |
Initial setting structure definition. More... | |
struct | adc_channel_setting_t |
Channel Setting. . More... | |
struct | adc_internal_info_t |
Driver internal information structure definition. More... | |
struct | adc_t |
ADC handle structure definition. More... | |
Macros | |
#define | ADC_NUM_MAX ((uint32_t)24) |
Enumerations | |
enum | adc_sampling_period0_t { ADC_SAMPLING_PERIOD0_XN = 0x00, ADC_SAMPLING_PERIOD0_X2N = 0x08, ADC_SAMPLING_PERIOD0_X3N = 0x10, ADC_SAMPLING_PERIOD0_X4N = 0x18, ADC_SAMPLING_PERIOD0_X16N = 0x28, ADC_SAMPLING_PERIOD0_X64N = 0x38 } |
Outside AIN sampling period. More... | |
enum | adc_sampling_period1_t { ADC_SAMPLING_PERIOD1_XN = 0x000, ADC_SAMPLING_PERIOD1_X2N = 0x100, ADC_SAMPLING_PERIOD1_X3N = 0x200, ADC_SAMPLING_PERIOD1_X4N = 0x300, ADC_SAMPLING_PERIOD1_X16N = 0x500, ADC_SAMPLING_PERIOD1_X64N = 0x700 } |
Outside AIN sampling period. More... | |
enum | adc_sclk_t { ADC_SCLK_1 = (0x00000000U), ADC_SCLK_2 = (0x00000001U), ADC_SCLK_4 = (0x00000002U), ADC_SCLK_8 = (0x00000003U), ADC_SCLK_16 = (0x00000004U) } |
Select AD prescaler output (SCLK). More... | |
enum | adc_mod1_t { ADC_MOD1_SCLK_1 = (0x00001000U), ADC_MOD1_SCLK_2 = (0x00003000U), ADC_MOD1_SCLK_3 = (0x00004000U), ADC_MOD1_SCLK_4 = (0x00106011U) } |
Select SCLK Frequency Band (MOD1). More... | |
enum | adc_mod2_t { ADC_MOD2_TMPM4G9 = (0x00000000U), ADC_MOD2_CLEAR = (0x00000000U) } |
Select ADC Product Setting Value (MOD2). More... | |
enum | adc_int_t { ADC_INT_DISABLE = (0x00000000U), ADC_INT_ENABLE = (0x00000080U) } |
Select Interrupt Enable/Disable. More... | |
enum | adc_conversion_t { ADC_CONVERSION_DISABLE = (0x00000000U), ADC_CONVERSION_CNT = (0x00000100U), ADC_CONVERSION_SGL = (0x00000200U), ADC_CONVERSION_TRG = (0x00000300U), ADC_CONVERSION_HPTG = (0x00000400U) } |
Select conversion method. More... | |
enum | adc_dma_int_t { ADC_DMA_INT_SGL_DISABLE = (0x00000000U), ADC_DMA_INT_SGL_ENABLE = (0x00000020U), ADC_DMA_INT_CNT_DISABLE = (0x00000000U), ADC_DMA_INT_CNT_ENABLE = (0x00000040U), ADC_DMA_INT_TRG_DISABLE = (0x00000000U), ADC_DMA_INT_TRG_ENABLE = (0x00000010U), ADC_TRG_DISABLE = (0x00000000U), ADC_TRG_ENABLE = (0x00000001U), ADC_HPTG_DISABLE = (0x00000000U), ADC_HPTG_ENABLE = (0x00000002U) } |
Select DMA interrupt method. More... | |
enum | adc_ain_range_t { ADC_AIN_RANGE_MIN = (0x00000000U), ADC_AIN_RANGE_MAX = (0x00000017U) } |
Range of AIN Macro Definition. Range of AIN be set "(ADC_AIN_RANGE_MIN <= Value <= ADC_AIN_RANGE_MAX)". More... | |
enum | adc_status_t { ADC_STATUS_MASK = (0x00000080U), ADC_STATUS_SLEEP = (0x00000000U), ADC_STATUS_RUNNING = (0x00000080U) } |
AD Running Status. More... | |
enum | adc_cnt_status_t { ADC_CNT_STATUS_MASK = (0x00000008U), ADC_CNT_STATUS_SLEEP = (0x00000000U), ADC_CNT_STATUS_RUNNING = (0x00000008U) } |
Continuity Conversion Running Status. More... | |
enum | adc_sgl_status_t { ADC_SGL_STATUS_MASK = (0x00000004U), ADC_SGL_STATUS_SLEEP = (0x00000000U), ADC_SGL_STATUS_RUNNING = (0x00000004U) } |
Single Conversion Running Status. More... | |
enum | adc_trg_status_t { ADC_TRG_STATUS_MASK = (0x00000002U), ADC_TRG_STATUS_SLEEP = (0x00000000U), ADC_TRG_STATUS_RUNNING = (0x00000002U) } |
Trigger Conversion Running Status. More... | |
enum | adc_hpri_status_t { ADC_HPTG_STATUS_MASK = (0x00000001U), ADC_HPTG_STATUS_SLEEP = (0x00000000U), ADC_HPTG_STATUS_RUNNING = (0x00000001U) } |
Trigger Conversion Running Status. More... | |
enum | adcmpxen_t { ADCMP3EN_DISABLE = (0x00000000U), ADCMP3EN_ENABLE = (0x00000008U), ADCMP2EN_DISABLE = (0x00000000U), ADCMP2EN_ENABLE = (0x00000004U), ADCMP1EN_DISABLE = (0x00000000U), ADCMP1EN_ENABLE = (0x00000002U), ADCMP0EN_DISABLE = (0x00000000U), ADCMP0EN_ENABLE = (0x00000001U) } |
Select Enable, Disable setting(ADxCMPEN). More... | |
enum | adcmpcnt_t { ADCMPCNT_1 = (0x00000000U), ADCMPCNT_2 = (0x00000100U), ADCMPCNT_3 = (0x00000200U), ADCMPCNT_4 = (0x00000300U), ADCMPCNT_5 = (0x00000400U), ADCMPCNT_6 = (0x00000500U), ADCMPCNT_7 = (0x00000600U), ADCMPCNT_8 = (0x00000700U), ADCMPCNT_9 = (0x00000800U), ADCMPCNT_10 = (0x00000900U), ADCMPCNT_11 = (0x00000a00U), ADCMPCNT_12 = (0x00000b00U), ADCMPCNT_13 = (0x00000c00U), ADCMPCNT_14 = (0x00000d00U), ADCMPCNT_15 = (0x00000e00U), ADCMPCNT_16 = (0x00000f00U) } |
Select Compare count num. More... | |
enum | adcmpcond_t { ADCMPCond_CNT = (0x00000000U), ADCMPCond_ACC = (0x00000040U) } |
Compare condition. More... | |
enum | adcmpbigsml_t { ADCMPBigSml_Big = (0x00000000U), ADCMPBigSml_Sml = (0x00000020U) } |
Compare Big, Small condition. More... | |
enum | adcmpstr_t { ADCMPStr_Reg0 = (0x00000000U), ADCMPStr_Reg1 = (0x00000001U), ADCMPStr_Reg2 = (0x00000002U), ADCMPStr_Reg3 = (0x00000003U), ADCMPStr_Reg4 = (0x00000004U), ADCMPStr_Reg5 = (0x00000005U), ADCMPStr_Reg6 = (0x00000006U), ADCMPStr_Reg7 = (0x00000007U), ADCMPStr_Reg8 = (0x00000008U), ADCMPStr_Reg9 = (0x00000009U), ADCMPStr_Reg10 = (0x0000000aU), ADCMPStr_Reg11 = (0x0000000bU), ADCMPStr_Reg12 = (0x0000000cU), ADCMPStr_Reg13 = (0x0000000dU), ADCMPStr_Reg14 = (0x0000000eU), ADCMPStr_Reg15 = (0x0000000fU), ADCMPStr_Reg16 = (0x00000010U), ADCMPStr_Reg17 = (0x00000011U), ADCMPStr_Reg18 = (0x00000012U), ADCMPStr_Reg19 = (0x00000013U), ADCMPStr_Reg20 = (0x00000014U), ADCMPStr_Reg21 = (0x00000015U), ADCMPStr_Reg22 = (0x00000016U), ADCMPStr_Reg23 = (0x00000017U) } |
Select Compare Store register. More... | |
enum | adcexazain_t { ADCEXAZSEL_AIN0 = 0, ADCEXAZSEL_AIN1, ADCEXAZSEL_AIN2, ADCEXAZSEL_AIN3, ADCEXAZSEL_AIN4, ADCEXAZSEL_AIN5, ADCEXAZSEL_AIN6, ADCEXAZSEL_AIN7, ADCEXAZSEL_AIN8, ADCEXAZSEL_AIN9, ADCEXAZSEL_AIN10, ADCEXAZSEL_AIN11, ADCEXAZSEL_AIN12, ADCEXAZSEL_AIN13, ADCEXAZSEL_AIN14, ADCEXAZSEL_AIN15, ADCEXAZSEL_AIN16, ADCEXAZSEL_AIN17, ADCEXAZSEL_AIN18, ADCEXAZSEL_AIN19, ADCEXAZSEL_AIN20, ADCEXAZSEL_AIN21, ADCEXAZSEL_AIN22, ADCEXAZSEL_AIN23 } |
Select AIN no. More... | |
enum | adcexazsel_t { ADCEXAZSEL_EXAZ0 = (0x00000000), ADCEXAZSEL_EXAZ1 = (0x00000001) } |
Select sampling period, EXAS0 or EXAS1. More... | |
Functions | |
TXZ_Result | adc_init (adc_t *p_obj) |
TXZ_Result | adc_deinit (adc_t *p_obj) |
TXZ_Result | adc_mode1_setting (void) |
TXZ_Result | adc_channel_setting (adc_t *p_obj, uint32_t ch, adc_channel_setting_t *p_setting) |
TXZ_Result | adc_channel_clear (adc_t *p_obj, uint32_t ch) |
TXZ_Result | adc_cmp_init (adc_t *p_obj, adc_cmpx_t *p_cmpx_t) |
TXZ_Result | adc_cmp_deinit (adc_t *p_obj, adc_cmpx_t *p_cmpx_t) |
TXZ_Result | adc_channel_get_value (adc_t *p_obj, uint32_t ch, uint32_t *p_value) |
TXZ_Result | adc_start (adc_t *p_obj) |
TXZ_Result | adc_stop (adc_t *p_obj) |
TXZ_Result | adc_get_status (adc_t *p_obj, uint32_t *p_status) |
TXZ_WorkState | adc_poll_conversion (adc_t *p_obj, uint32_t timeout) |
void | adc_compa_irq_handler (void) |
void | adc_compb_irq_handler (void) |
void | adc_single_irq_handler (void) |
void | adc_continuity_irq_handler (void) |
void | adc_trigger_irq_handler (void) |
This file provides all the functions prototypes for ADC driver.
DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT.
Copyright(C) Toshiba Electronic Device Solutions Corporation 2019