RTEMS
5.0.0
|
#include "chip.h"
Functions | |
void | AFEC_Initialize (Afec *pAFE, uint32_t dwID) |
Initialize the AFE controller. More... | |
uint32_t | AFEC_SetClock (Afec *pAFE, uint32_t dwClk, uint32_t dwMck) |
Set AFE clock. More... | |
void | AFEC_SetTiming (Afec *pAFE, uint32_t dwStartup, uint32_t dwTracking, uint32_t dwSettling) |
Set AFE timing. More... | |
void | AFEC_SetTrigger (Afec *pAFE, uint32_t dwTrgSel) |
Set AFE trigger. More... | |
void | AFEC_SetSleepMode (Afec *pAFE, uint8_t bEnDis) |
Enable/Disable sleep mode. More... | |
void | AFEC_SetFastWakeup (Afec *pAFE, uint8_t bEnDis) |
Enable/Disable fast wake up. More... | |
void | AFEC_SetSequenceMode (Afec *pAFE, uint8_t bEnDis) |
Enable/Disable sequence mode. More... | |
void | AFEC_SetSequence (Afec *pAFE, uint32_t dwSEQ1, uint32_t dwSEQ2) |
Set channel sequence. More... | |
void | AFEC_SetSequenceByList (Afec *pAFE, uint8_t ucChList[], uint8_t ucNumCh) |
Set channel sequence by given channel list. More... | |
void | AFEC_SetAnalogChange (Afec *pAFE, uint8_t bEnDis) |
Set analog change. IF enabled, it allows different analog settings for each channel, otherwise, DIFF0, GAIN0 and OFF0 are used for all channels. More... | |
void | AFEC_SetTagEnable (Afec *pAFE, uint8_t bEnDis) |
Set "TAG" mode, show channel number in last data or not. More... | |
void | AFEC_SetCompareChannel (Afec *pAFE, uint32_t dwChannel) |
Set compare channel. More... | |
void | AFEC_SetCompareMode (Afec *pAFE, uint32_t dwMode) |
Set compare mode. More... | |
void | AFEC_SetComparisonWindow (Afec *pAFE, uint32_t dwHi_Lo) |
Set comparison window. More... | |
uint32_t | AFEC_GetConvertedData (Afec *pAFE, uint32_t dwChannel) |
Return the Channel Converted Data. More... | |
void | AFEC_SetStartupTime (Afec *pAFE, uint32_t dwUs) |
void | AFEC_SetTrackingTime (Afec *pAFE, uint32_t dwNs) |
void | AFEC_SetAnalogOffset (Afec *pAFE, uint32_t dwChannel, uint32_t aoffset) |
Set analog offset to be used for channel CSEL. More... | |
void | AFEC_SetAnalogControl (Afec *pAFE, uint32_t control) |
Set analog offset to be used for channel CSEL. More... | |
Implementation of Analog-to-Digital Converter (AFE).
uint32_t AFEC_GetConvertedData | ( | Afec * | pAFE, |
uint32_t | dwChannel | ||
) |
Return the Channel Converted Data.
pAFE | Pointer to an AFE instance. |
dwChannel | channel to get converted value |
void AFEC_Initialize | ( | Afec * | pAFE, |
uint32_t | dwID | ||
) |
Initialize the AFE controller.
pAFE | Pointer to an AFE instance. |
dwID | AFE Index |
void AFEC_SetAnalogChange | ( | Afec * | pAFE, |
uint8_t | bEnDis | ||
) |
Set analog change. IF enabled, it allows different analog settings for each channel, otherwise, DIFF0, GAIN0 and OFF0 are used for all channels.
pAFE | Pointer to an AFE instance. |
bEnDis | Enable/Disable. |
void AFEC_SetAnalogControl | ( | Afec * | pAFE, |
uint32_t | control | ||
) |
Set analog offset to be used for channel CSEL.
afec | Base address of the AFEC. |
control | Analog control value. |
void AFEC_SetAnalogOffset | ( | Afec * | pAFE, |
uint32_t | dwChannel, | ||
uint32_t | aoffset | ||
) |
Set analog offset to be used for channel CSEL.
afec | Base address of the AFEC. |
dwChannel | AFEC channel number. |
aoffset | Analog offset value. |
uint32_t AFEC_SetClock | ( | Afec * | pAFE, |
uint32_t | dwClk, | ||
uint32_t | dwMck | ||
) |
Set AFE clock.
pAFE | Pointer to an AFE instance. |
dwPres | prescale value |
dwMck | Board MCK (Hz) |
void AFEC_SetCompareChannel | ( | Afec * | pAFE, |
uint32_t | dwChannel | ||
) |
Set compare channel.
pAFE | Pointer to an AFE instance. |
dwChannel | channel number to be set,16 for all channels |
void AFEC_SetCompareMode | ( | Afec * | pAFE, |
uint32_t | dwMode | ||
) |
Set compare mode.
pAFE | Pointer to an AFE instance. |
dwMode | compare mode |
void AFEC_SetComparisonWindow | ( | Afec * | pAFE, |
uint32_t | dwHi_Lo | ||
) |
Set comparison window.
pAFE | Pointer to an AFE instance. |
dwHi_Lo | Comparison Window |
void AFEC_SetFastWakeup | ( | Afec * | pAFE, |
uint8_t | bEnDis | ||
) |
Enable/Disable fast wake up.
pAFE | Pointer to an AFE instance. |
bEnDis | Enable/Disable fast wake up in sleep mode. |
void AFEC_SetSequence | ( | Afec * | pAFE, |
uint32_t | dwSEQ1, | ||
uint32_t | dwSEQ2 | ||
) |
Set channel sequence.
pAFE | Pointer to an AFE instance. |
dwSEQ1 | Sequence 1 ~ 8 channel number. |
dwSEQ2 | Sequence 9 ~ 16 channel number. |
void AFEC_SetSequenceByList | ( | Afec * | pAFE, |
uint8_t | ucChList[], | ||
uint8_t | ucNumCh | ||
) |
Set channel sequence by given channel list.
pAFE | Pointer to an AFE instance. |
ucChList | Channel list. |
ucNumCh | Number of channels in list. |
void AFEC_SetSequenceMode | ( | Afec * | pAFE, |
uint8_t | bEnDis | ||
) |
Enable/Disable sequence mode.
pAFE | Pointer to an AFE instance. |
bEnDis | Enable/Disable sequence mode. |
void AFEC_SetSleepMode | ( | Afec * | pAFE, |
uint8_t | bEnDis | ||
) |
Enable/Disable sleep mode.
pAFE | Pointer to an AFE instance. |
bEnDis | Enable/Disable sleep mode. |
void AFEC_SetStartupTime | ( | Afec * | pAFE, |
uint32_t | dwUs | ||
) |
Sets the AFE startup time.
pAFE | Pointer to an AFE instance. |
dwUs | Startup time in uS. |
void AFEC_SetTagEnable | ( | Afec * | pAFE, |
uint8_t | bEnDis | ||
) |
Set "TAG" mode, show channel number in last data or not.
pAFE | Pointer to an AFE instance. |
bEnDis | Enable/Disable TAG value. |
void AFEC_SetTiming | ( | Afec * | pAFE, |
uint32_t | dwStartup, | ||
uint32_t | dwTracking, | ||
uint32_t | dwSettling | ||
) |
Set AFE timing.
pAFE | Pointer to an AFE instance. |
dwStartup | startup value |
dwTracking | tracking value |
dwSettling | settling value |
void AFEC_SetTrackingTime | ( | Afec * | pAFE, |
uint32_t | dwNs | ||
) |
Set AFE tracking time
pAFE | Pointer to an AFE instance. |
dwNs | Tracking time in nS. |
void AFEC_SetTrigger | ( | Afec * | pAFE, |
uint32_t | dwTrgSel | ||
) |
Set AFE trigger.
pAFE | Pointer to an AFE instance. |
dwTrgSel | Trigger selection |