M480 BSP V3.05.006
The Board Support Package for M480 Series
Macros | Functions | Variables
eadc.h File Reference

M480 series EADC driver header file. More...

Go to the source code of this file.

Macros

#define EADC_CTL_DIFFEN_SINGLE_END
 
#define EADC_CTL_DIFFEN_DIFFERENTIAL
 
#define EADC_CTL_DMOF_STRAIGHT_BINARY
 
#define EADC_CTL_DMOF_TWOS_COMPLEMENT
 
#define EADC_SCTL_CHSEL(x)
 
#define EADC_SCTL_TRGDLYDIV(x)
 
#define EADC_SCTL_TRGDLYCNT(x)
 
#define EADC_SOFTWARE_TRIGGER
 
#define EADC_FALLING_EDGE_TRIGGER
 
#define EADC_RISING_EDGE_TRIGGER
 
#define EADC_FALLING_RISING_EDGE_TRIGGER
 
#define EADC_ADINT0_TRIGGER
 
#define EADC_ADINT1_TRIGGER
 
#define EADC_TIMER0_TRIGGER
 
#define EADC_TIMER1_TRIGGER
 
#define EADC_TIMER2_TRIGGER
 
#define EADC_TIMER3_TRIGGER
 
#define EADC_EPWM0TG0_TRIGGER
 
#define EADC_EPWM0TG1_TRIGGER
 
#define EADC_EPWM0TG2_TRIGGER
 
#define EADC_EPWM0TG3_TRIGGER
 
#define EADC_EPWM0TG4_TRIGGER
 
#define EADC_EPWM0TG5_TRIGGER
 
#define EADC_EPWM1TG0_TRIGGER
 
#define EADC_EPWM1TG1_TRIGGER
 
#define EADC_EPWM1TG2_TRIGGER
 
#define EADC_EPWM1TG3_TRIGGER
 
#define EADC_EPWM1TG4_TRIGGER
 
#define EADC_EPWM1TG5_TRIGGER
 
#define EADC_BPWM0TG_TRIGGER
 
#define EADC_BPWM1TG_TRIGGER
 
#define EADC_SCTL_TRGDLYDIV_DIVIDER_1
 
#define EADC_SCTL_TRGDLYDIV_DIVIDER_2
 
#define EADC_SCTL_TRGDLYDIV_DIVIDER_4
 
#define EADC_SCTL_TRGDLYDIV_DIVIDER_16
 
#define EADC_CMP_CMPCOND_LESS_THAN
 
#define EADC_CMP_CMPCOND_GREATER_OR_EQUAL
 
#define EADC_CMP_CMPWEN_ENABLE
 
#define EADC_CMP_CMPWEN_DISABLE
 
#define EADC_CMP_ADCMPIE_ENABLE
 
#define EADC_CMP_ADCMPIE_DISABLE
 
#define EADC_TIMEOUT_ERR
 
#define EADC_CONV_RESET(eadc)
 A/D Converter Control Circuits Reset. More...
 
#define EADC_ENABLE_PDMA(eadc)
 Enable PDMA transfer. More...
 
#define EADC_DISABLE_PDMA(eadc)
 Disable PDMA transfer. More...
 
#define EADC_ENABLE_SAMPLE_MODULE_PDMA(eadc, u32ModuleMask)
 Enable Sample Module PDMA transfer. More...
 
#define EADC_DISABLE_SAMPLE_MODULE_PDMA(eadc, u32ModuleMask)
 Disable Sample Module PDMA transfer. More...
 
#define EADC_ENABLE_DOUBLE_BUFFER(eadc, u32ModuleNum)
 Enable double buffer mode. More...
 
#define EADC_DISABLE_DOUBLE_BUFFER(eadc, u32ModuleNum)
 Disable double buffer mode. More...
 
#define EADC_ENABLE_INT_POSITION(eadc, u32ModuleNum)
 Set ADIFn at A/D end of conversion. More...
 
#define EADC_DISABLE_INT_POSITION(eadc, u32ModuleNum)
 Set ADIFn at A/D start of conversion. More...
 
#define EADC_ENABLE_INT(eadc, u32Mask)
 Enable the interrupt. More...
 
#define EADC_DISABLE_INT(eadc, u32Mask)
 Disable the interrupt. More...
 
#define EADC_ENABLE_SAMPLE_MODULE_INT(eadc, u32IntSel, u32ModuleMask)
 Enable the sample module interrupt. More...
 
#define EADC_DISABLE_SAMPLE_MODULE_INT(eadc, u32IntSel, u32ModuleMask)
 Disable the sample module interrupt. More...
 
#define EADC_SET_DMOF(eadc, u32Format)
 Set the input mode output format. More...
 
#define EADC_START_CONV(eadc, u32ModuleMask)
 Start the A/D conversion. More...
 
#define EADC_STOP_CONV(eadc, u32ModuleMask)
 Cancel the conversion for sample module. More...
 
#define EADC_GET_PENDING_CONV(eadc)
 Get the conversion pending flag. More...
 
#define EADC_GET_CONV_DATA(eadc, u32ModuleNum)
 Get the conversion data of the user-specified sample module. More...
 
#define EADC_GET_DATA_OVERRUN_FLAG(eadc, u32ModuleMask)
 Get the data overrun flag of the user-specified sample module. More...
 
#define EADC_GET_DATA_VALID_FLAG(eadc, u32ModuleMask)
 Get the data valid flag of the user-specified sample module. More...
 
#define EADC_GET_DOUBLE_DATA(eadc, u32ModuleNum)
 Get the double data of the user-specified sample module. More...
 
#define EADC_GET_INT_FLAG(eadc, u32Mask)
 Get the user-specified interrupt flags. More...
 
#define EADC_GET_SAMPLE_MODULE_OV_FLAG(eadc, u32ModuleMask)
 Get the user-specified sample module overrun flags. More...
 
#define EADC_CLR_INT_FLAG(eadc, u32Mask)
 Clear the selected interrupt status bits. More...
 
#define EADC_CLR_SAMPLE_MODULE_OV_FLAG(eadc, u32ModuleMask)
 Clear the selected sample module overrun status bits. More...
 
#define EADC_IS_DATA_OV(eadc)
 Check all sample module A/D result data register overrun flags. More...
 
#define EADC_IS_DATA_VALID(eadc)
 Check all sample module A/D result data register valid flags. More...
 
#define EADC_IS_SAMPLE_MODULE_OV(eadc)
 Check all A/D sample module start of conversion overrun flags. More...
 
#define EADC_IS_INT_FLAG_OV(eadc)
 Check all A/D interrupt flag overrun bits. More...
 
#define EADC_IS_BUSY(eadc)
 Get the busy state of EADC. More...
 
#define EADC_ENABLE_CMP0(eadc, u32ModuleNum, u32Condition, u16CMPData, u32MatchCount)
 Configure the comparator 0 and enable it. More...
 
#define EADC_ENABLE_CMP1(eadc, u32ModuleNum, u32Condition, u16CMPData, u32MatchCount)
 Configure the comparator 1 and enable it. More...
 
#define EADC_ENABLE_CMP2(eadc, u32ModuleNum, u32Condition, u16CMPData, u32MatchCount)
 Configure the comparator 2 and enable it. More...
 
#define EADC_ENABLE_CMP3(eadc, u32ModuleNum, u32Condition, u16CMPData, u32MatchCount)
 Configure the comparator 3 and enable it. More...
 
#define EADC_ENABLE_CMP_WINDOW_MODE(eadc, u32CMP)
 Enable the compare window mode. More...
 
#define EADC_DISABLE_CMP_WINDOW_MODE(eadc, u32CMP)
 Disable the compare window mode. More...
 
#define EADC_ENABLE_CMP_INT(eadc, u32CMP)
 Enable the compare interrupt. More...
 
#define EADC_DISABLE_CMP_INT(eadc, u32CMP)
 Disable the compare interrupt. More...
 
#define EADC_DISABLE_CMP0(eadc)
 Disable comparator 0. More...
 
#define EADC_DISABLE_CMP1(eadc)
 Disable comparator 1. More...
 
#define EADC_DISABLE_CMP2(eadc)
 Disable comparator 2. More...
 
#define EADC_DISABLE_CMP3(eadc)
 Disable comparator 3. More...
 

Functions

void EADC_Open (EADC_T *eadc, uint32_t u32InputMode)
 This function make EADC_module be ready to convert. More...
 
void EADC_Close (EADC_T *eadc)
 Disable EADC_module. More...
 
void EADC_ConfigSampleModule (EADC_T *eadc, uint32_t u32ModuleNum, uint32_t u32TriggerSrc, uint32_t u32Channel)
 Configure the sample control logic module. More...
 
void EADC_SetTriggerDelayTime (EADC_T *eadc, uint32_t u32ModuleNum, uint32_t u32TriggerDelayTime, uint32_t u32DelayClockDivider)
 Set trigger delay time. More...
 
void EADC_SetExtendSampleTime (EADC_T *eadc, uint32_t u32ModuleNum, uint32_t u32ExtendSampleTime)
 Set ADC extend sample time. More...
 

Variables

int32_t g_EADC_i32ErrCode
 

Detailed Description

M480 series EADC driver header file.

Version
V0.10

SPDX-License-Identifier: Apache-2.0

Definition in file eadc.h.