RTEMS 6.1-rc6
|
Data Structures | |
struct | _adc_etc_config |
ADC_ETC configuration. More... | |
struct | _adc_etc_trigger_chain_config |
ADC_ETC trigger chain configuration. More... | |
struct | _adc_etc_trigger_config |
ADC_ETC trigger configuration. More... | |
Macros | |
#define | FSL_ADC_ETC_DRIVER_VERSION (MAKE_VERSION(2, 2, 1)) |
ADC_ETC driver version. | |
#define | ADC_ETC_DMA_CTRL_TRGn_REQ_MASK 0xFF0000U |
The mask of status flags cleared by writing 1. | |
Typedefs | |
typedef enum _adc_etc_external_trigger_source | adc_etc_external_trigger_source_t |
External triggers sources. | |
typedef enum _adc_etc_interrupt_enable | adc_etc_interrupt_enable_t |
Interrupt enable/disable mask. | |
typedef struct _adc_etc_config | adc_etc_config_t |
ADC_ETC configuration. | |
typedef struct _adc_etc_trigger_chain_config | adc_etc_trigger_chain_config_t |
ADC_ETC trigger chain configuration. | |
typedef struct _adc_etc_trigger_config | adc_etc_trigger_config_t |
ADC_ETC trigger configuration. | |
Enumerations | |
enum | _adc_etc_status_flag_mask { kADC_ETC_Done0StatusFlagMask = 1U << 0U , kADC_ETC_Done1StatusFlagMask = 1U << 1U , kADC_ETC_Done2StatusFlagMask = 1U << 2U , kADC_ETC_ErrorStatusFlagMask = 1U << 3U } |
ADC_ETC customized status flags mask. | |
enum | _adc_etc_external_trigger_source { kADC_ETC_Trg0TriggerSource = 0U , kADC_ETC_Trg1TriggerSource = 1U , kADC_ETC_Trg2TriggerSource = 2U , kADC_ETC_Trg3TriggerSource = 3U , kADC_ETC_Trg4TriggerSource = 4U , kADC_ETC_Trg5TriggerSource = 5U , kADC_ETC_Trg6TriggerSource = 6U , kADC_ETC_Trg7TriggerSource = 7U , kADC_ETC_TSC0TriggerSource = 8U , kADC_ETC_TSC1TriggerSource = 9U } |
External triggers sources. | |
enum | _adc_etc_interrupt_enable { kADC_ETC_InterruptDisable = 0U , kADC_ETC_Done0InterruptEnable = 1U , kADC_ETC_Done1InterruptEnable = 2U , kADC_ETC_Done2InterruptEnable = 3U } |
Interrupt enable/disable mask. | |
Variables | |
bool | _adc_etc_config::enableTSCBypass |
bool | _adc_etc_config::enableTSC0Trigger |
bool | _adc_etc_config::enableTSC1Trigger |
uint32_t | _adc_etc_config::TSC0triggerPriority |
uint32_t | _adc_etc_config::TSC1triggerPriority |
uint32_t | _adc_etc_config::clockPreDivider |
uint32_t | _adc_etc_config::XBARtriggerMask |
bool | _adc_etc_trigger_chain_config::enableB2BMode |
uint32_t | _adc_etc_trigger_chain_config::ADCHCRegisterSelect |
uint32_t | _adc_etc_trigger_chain_config::ADCChannelSelect |
adc_etc_interrupt_enable_t | _adc_etc_trigger_chain_config::InterruptEnable |
bool | _adc_etc_trigger_config::enableSyncMode |
bool | _adc_etc_trigger_config::enableSWTriggerMode |
uint32_t | _adc_etc_trigger_config::triggerChainLength |
uint32_t | _adc_etc_trigger_config::triggerPriority |
uint32_t | _adc_etc_trigger_config::sampleIntervalDelay |
uint32_t | _adc_etc_trigger_config::initialDelay |
Initialization | |
void | ADC_ETC_Init (ADC_ETC_Type *base, const adc_etc_config_t *config) |
Initialize the ADC_ETC module. | |
void | ADC_ETC_Deinit (ADC_ETC_Type *base) |
De-Initialize the ADC_ETC module. | |
void | ADC_ETC_GetDefaultConfig (adc_etc_config_t *config) |
Gets an available pre-defined settings for the ADC_ETC's configuration. This function initializes the ADC_ETC's configuration structure with available settings. The default values are: | |
void | ADC_ETC_SetTriggerConfig (ADC_ETC_Type *base, uint32_t triggerGroup, const adc_etc_trigger_config_t *config) |
Set the external XBAR trigger configuration. | |
void | ADC_ETC_SetTriggerChainConfig (ADC_ETC_Type *base, uint32_t triggerGroup, uint32_t chainGroup, const adc_etc_trigger_chain_config_t *config) |
Set the external XBAR trigger chain configuration. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means Trigger0 source's chain1 would be configurated. | |
uint32_t | ADC_ETC_GetInterruptStatusFlags (ADC_ETC_Type *base, adc_etc_external_trigger_source_t sourceIndex) |
Gets the interrupt status flags of external XBAR and TSC triggers. | |
void | ADC_ETC_ClearInterruptStatusFlags (ADC_ETC_Type *base, adc_etc_external_trigger_source_t sourceIndex, uint32_t mask) |
Clears the ADC_ETC's interrupt status falgs. | |
uint32_t | ADC_ETC_GetADCConversionValue (ADC_ETC_Type *base, uint32_t triggerGroup, uint32_t chainGroup) |
Get ADC conversion result from external XBAR sources. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means the API would return Trigger0 source's chain1 conversion result. | |
#define FSL_ADC_ETC_DRIVER_VERSION (MAKE_VERSION(2, 2, 1)) |
ADC_ETC driver version.
Version 2.2.1.
void ADC_ETC_ClearInterruptStatusFlags | ( | ADC_ETC_Type * | base, |
adc_etc_external_trigger_source_t | sourceIndex, | ||
uint32_t | mask | ||
) |
Clears the ADC_ETC's interrupt status falgs.
base | ADC_ETC peripheral base address. |
sourceIndex | trigger source index. |
mask | Status flags mask of trigger. Refer to "_adc_etc_status_flag_mask". |
brief Clears the ADC_ETC's interrupt status falgs.
param base ADC_ETC peripheral base address. param sourceIndex trigger source index. param mask Status flags mask of trigger. Refer to "_adc_etc_status_flag_mask".
void ADC_ETC_Deinit | ( | ADC_ETC_Type * | base | ) |
De-Initialize the ADC_ETC module.
base | ADC_ETC peripheral base address. |
brief De-Initialize the ADC_ETC module.
param base ADC_ETC peripheral base address.
uint32_t ADC_ETC_GetADCConversionValue | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
uint32_t | chainGroup | ||
) |
Get ADC conversion result from external XBAR sources. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means the API would return Trigger0 source's chain1 conversion result.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
chainGroup | Trigger chain group index. Available number is 0~7. |
brief Get ADC conversion result from external XBAR sources. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means the API would return Trigger0 source's chain1 conversion result.
param base ADC_ETC peripheral base address. param triggerGroup Trigger group index. Available number is 0~7. param chainGroup Trigger chain group index. Available number is 0~7. return ADC conversion result value.
void ADC_ETC_GetDefaultConfig | ( | adc_etc_config_t * | config | ) |
Gets an available pre-defined settings for the ADC_ETC's configuration. This function initializes the ADC_ETC's configuration structure with available settings. The default values are:
config | Pointer to "adc_etc_config_t" structure. |
brief Gets an available pre-defined settings for the ADC_ETC's configuration. This function initializes the ADC_ETC's configuration structure with available settings. The default values are: code config->enableTSCBypass = true; config->enableTSC0Trigger = false; config->enableTSC1Trigger = false; config->TSC0triggerPriority = 0U; config->TSC1triggerPriority = 0U; config->clockPreDivider = 0U; config->XBARtriggerMask = 0U; endCode
param config Pointer to "adc_etc_config_t" structure.
uint32_t ADC_ETC_GetInterruptStatusFlags | ( | ADC_ETC_Type * | base, |
adc_etc_external_trigger_source_t | sourceIndex | ||
) |
Gets the interrupt status flags of external XBAR and TSC triggers.
base | ADC_ETC peripheral base address. |
sourceIndex | trigger source index. |
brief Gets the interrupt status flags of external XBAR and TSC triggers.
param base ADC_ETC peripheral base address. param sourceIndex trigger source index.
return Status flags mask of trigger. Refer to "_adc_etc_status_flag_mask".
void ADC_ETC_Init | ( | ADC_ETC_Type * | base, |
const adc_etc_config_t * | config | ||
) |
Initialize the ADC_ETC module.
base | ADC_ETC peripheral base address. |
config | Pointer to "adc_etc_config_t" structure. |
brief Initialize the ADC_ETC module.
param base ADC_ETC peripheral base address. param config Pointer to "adc_etc_config_t" structure.
void ADC_ETC_SetTriggerChainConfig | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
uint32_t | chainGroup, | ||
const adc_etc_trigger_chain_config_t * | config | ||
) |
Set the external XBAR trigger chain configuration. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means Trigger0 source's chain1 would be configurated.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
chainGroup | Trigger chain group index. Available number is 0~7. |
config | Pointer to "adc_etc_trigger_chain_config_t" structure. |
brief Set the external XBAR trigger chain configuration. For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means Trigger0 source's chain1 would be configurated.
param base ADC_ETC peripheral base address. param triggerGroup Trigger group index. Available number is 0~7. param chainGroup Trigger chain group index. Available number is 0~7. param config Pointer to "adc_etc_trigger_chain_config_t" structure.
void ADC_ETC_SetTriggerConfig | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
const adc_etc_trigger_config_t * | config | ||
) |
Set the external XBAR trigger configuration.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. |
config | Pointer to "adc_etc_trigger_config_t" structure. |
brief Set the external XBAR trigger configuration.
param base ADC_ETC peripheral base address. param triggerGroup Trigger group index. param config Pointer to "adc_etc_trigger_config_t" structure.