RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Enumerator | Variables
Adc_etc

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.
 

Detailed Description

Macro Definition Documentation

◆ FSL_ADC_ETC_DRIVER_VERSION

#define FSL_ADC_ETC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))

ADC_ETC driver version.

Version 2.2.1.

Function Documentation

◆ ADC_ETC_ClearInterruptStatusFlags()

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.

Parameters
baseADC_ETC peripheral base address.
sourceIndextrigger source index.
maskStatus 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".

◆ ADC_ETC_Deinit()

void ADC_ETC_Deinit ( ADC_ETC_Type base)

De-Initialize the ADC_ETC module.

Parameters
baseADC_ETC peripheral base address.

brief De-Initialize the ADC_ETC module.

param base ADC_ETC peripheral base address.

◆ ADC_ETC_GetADCConversionValue()

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.

Parameters
baseADC_ETC peripheral base address.
triggerGroupTrigger group index. Available number is 0~7.
chainGroupTrigger chain group index. Available number is 0~7.
Returns
ADC conversion result value.

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.

◆ ADC_ETC_GetDefaultConfig()

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->enableTSCBypass = true;
config->enableTSC0Trigger = false;
config->enableTSC1Trigger = false;
config->TSC0triggerPriority = 0U;
config->TSC1triggerPriority = 0U;
config->clockPreDivider = 0U;
config->XBARtriggerMask = 0U;
Definition: deflate.c:114
Parameters
configPointer 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.

◆ ADC_ETC_GetInterruptStatusFlags()

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.

Parameters
baseADC_ETC peripheral base address.
sourceIndextrigger source index.
Returns
Status flags mask of trigger. Refer to "_adc_etc_status_flag_mask".

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".

◆ ADC_ETC_Init()

void ADC_ETC_Init ( ADC_ETC_Type base,
const adc_etc_config_t config 
)

Initialize the ADC_ETC module.

Parameters
baseADC_ETC peripheral base address.
configPointer 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.

◆ ADC_ETC_SetTriggerChainConfig()

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.

Parameters
baseADC_ETC peripheral base address.
triggerGroupTrigger group index. Available number is 0~7.
chainGroupTrigger chain group index. Available number is 0~7.
configPointer 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.

◆ ADC_ETC_SetTriggerConfig()

void ADC_ETC_SetTriggerConfig ( ADC_ETC_Type base,
uint32_t  triggerGroup,
const adc_etc_trigger_config_t config 
)

Set the external XBAR trigger configuration.

Parameters
baseADC_ETC peripheral base address.
triggerGroupTrigger group index.
configPointer 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.