63 #define AFEC_MR_SETTLING_Pos 20 64 #define AFEC_MR_SETTLING_Msk (0x3u << AFEC_MR_SETTLING_Pos) 66 #define AFEC_MR_SETTLING_AST3 (0x0u << 20) 68 #define AFEC_MR_SETTLING_AST5 (0x1u << 20) 70 #define AFEC_MR_SETTLING_AST9 (0x2u << 20) 72 #define AFEC_MR_SETTLING_AST17 (0x3u << 20) 76 #define AFEC_EMR_STM_Pos 25 77 #define AFEC_EMR_STM_Msk (0x1u << AFEC_EMR_STM_Pos) 79 #define AFEC_EMR_STM_MULTI_TRIG (0x0u << 25) 82 #define AFEC_EMR_STM_SINGLE_TRIG (0x1u << 25) 87 #define AFEC_EMR_TAG_Pos 24 88 #define AFEC_EMR_TAG_Msk (0x1u << AFEC_EMR_TAG_Pos) 90 #define AFEC_EMR_TAG_CHNB_ZERO (0x0u << 24) 93 #define AFEC_EMR_TAG_APPENDS (0x1u << 24) 98 #define AFEC_EMR_CMPALL_Pos 9 99 #define AFEC_EMR_CMPALL_Msk (0x1u << AFEC_EMR_TAG_Pos) 101 #define AFEC_EMR_CMPALL_ONE_CHANNEL_COMP (0x0u << 9) 104 #define AFEC_EMR_CMPALL_ALL_CHANNELS_COMP (0x1u << 9) 107 #define AFEC_ACR_PGA0_ON (0x1u << 2) 108 #define AFEC_ACR_PGA1_ON (0x1u << 3) 118 #define AFEC_GetModeReg(pAFEC) ((pAFEC)->AFEC_MR) 119 #define AFEC_SetModeReg(pAFEC, mode) ((pAFEC)->AFEC_MR = mode) 121 #define AFEC_GetExtModeReg(pAFEC) ((pAFEC)->AFEC_EMR) 122 #define AFEC_SetExtModeReg(pAFEC, mode) ((pAFEC)->AFEC_EMR = mode) 124 #define AFEC_StartConversion(pAFEC) ((pAFEC)->AFEC_CR = AFEC_CR_START) 126 #define AFEC_EnableChannel(pAFEC, dwChannel) {\ 127 (pAFEC)->AFEC_CHER = (1 << (dwChannel));\ 130 #define AFEC_DisableChannel(pAFEC, dwChannel) {\ 131 (pAFEC)->AFEC_CHDR = (1 << (dwChannel));\ 134 #define AFEC_EnableIt(pAFEC, dwMode) {\ 135 (pAFEC)->AFEC_IER = (dwMode);\ 138 #define AFEC_DisableIt(pAFEC, dwMode) {\ 139 (pAFEC)->AFEC_IDR = (dwMode);\ 142 #define AFEC_SetChannelGain(pAFEC,dwMode) {\ 143 (pAFEC)->AFEC_CGR = dwMode;\ 146 #define AFEC_EnableDataReadyIt(pAFEC) ((pAFEC)->AFEC_IER = AFEC_IER_DRDY) 148 #define AFEC_GetStatus(pAFEC) ((pAFEC)->AFEC_ISR) 150 #define AFEC_GetCompareMode(pAFEC) (((pAFEC)->AFEC_EMR)& (AFEC_EMR_CMPMODE_Msk)) 152 #define AFEC_GetChannelStatus(pAFEC) ((pAFEC)->AFEC_CHSR) 154 #define AFEC_GetInterruptMaskStatus(pAFEC) ((pAFEC)->AFEC_IMR) 156 #define AFEC_GetLastConvertedData(pAFEC) ((pAFEC)->AFEC_LCDR) 165 uint32_t dwSettling);
178 extern uint8_t AFEC_CheckConfiguration(
Afec *pAFEC, uint32_t dwMcK);
void AFEC_SetAnalogControl(Afec *pAFE, uint32_t control)
Set analog offset to be used for channel CSEL.
Definition: afec.c:453
uint32_t AFEC_GetConvertedData(Afec *pAFEC, uint32_t dwChannel)
Return the Channel Converted Data.
Definition: afec.c:345
void AFEC_SetSequenceMode(Afec *pAFEC, uint8_t bEnDis)
Enable/Disable sequence mode.
Definition: afec.c:211
void AFEC_SetTiming(Afec *pAFEC, uint32_t dwStartup, uint32_t dwTracking, uint32_t dwSettling)
Set AFE timing.
Definition: afec.c:141
void AFEC_SetAnalogOffset(Afec *pAFE, uint32_t dwChannel, uint32_t aoffset)
Set analog offset to be used for channel CSEL.
Definition: afec.c:440
void AFEC_SetFastWakeup(Afec *pAFEC, uint8_t bEnDis)
Enable/Disable fast wake up.
Definition: afec.c:197
Information for the Assert Handler.
void AFEC_SetSequence(Afec *pAFEC, uint32_t dwSEQ1, uint32_t dwSEQ2)
Set channel sequence.
Definition: afec.c:231
void AFEC_SetSleepMode(Afec *pAFEC, uint8_t bEnDis)
Enable/Disable sleep mode.
Definition: afec.c:183
void AFEC_SetSequenceByList(Afec *pAFEC, uint8_t ucChList[], uint8_t ucNumCh)
Set channel sequence by given channel list.
Definition: afec.c:244
void AFEC_SetComparisonWindow(Afec *pAFEC, uint32_t dwHi_Lo)
Set comparison window.
Definition: afec.c:334
Definition: intercom.c:74
void AFEC_SetTagEnable(Afec *pAFEC, uint8_t bEnDis)
Set "TAG" mode, show channel number in last data or not.
Definition: afec.c:290
Afec hardware registers.
Definition: component_afec.h:41
void AFEC_SetCompareMode(Afec *pAFEC, uint32_t dwMode)
Set compare mode.
Definition: afec.c:322
void AFEC_SetCompareChannel(Afec *pAFEC, uint32_t dwChannel)
Set compare channel.
Definition: afec.c:304
void AFEC_SetTrackingTime(Afec *pAFEC, uint32_t dwNs)
Definition: afec.c:408
void AFEC_SetStartupTime(Afec *pAFEC, uint32_t dwUs)
Definition: afec.c:361
void AFEC_Initialize(Afec *pAFEC, uint32_t dwId)
Initialize the AFE controller.
Definition: afec.c:94
void AFEC_SetAnalogChange(Afec *pAFE, uint8_t bEnDis)
Set analog change. IF enabled, it allows different analog settings for each channel,...
Definition: afec.c:276
uint32_t AFEC_SetClock(Afec *pAFEC, uint32_t dwPres, uint32_t dwMck)
Set AFE clock.
Definition: afec.c:116
void AFEC_SetTrigger(Afec *pAFEC, uint32_t dwTrgSel)
Set AFE trigger.
Definition: afec.c:166