![]() |
![]() |
MSPM0C110X Driver Library
2.05.00.05
|
![]() |
Data Structures | |
struct | DL_ADC12_ClockConfig |
Configuration struct for DL_ADC12_setClockConfig. More... | |
Macros | |
#define | DL_ADC12_SVT_OFFSET ((uint32_t)0x555000 >> (uint32_t)2) |
This is an internal macro is used to resolve the offset to ADC12 SVT. More... | |
Enumerations | |
enum | DL_ADC12_MEM_IDX { DL_ADC12_MEM_IDX_0 = 0, DL_ADC12_MEM_IDX_1 = 1, DL_ADC12_MEM_IDX_2 = 2, DL_ADC12_MEM_IDX_3 = 3, DL_ADC12_MEM_IDX_4 = 4, DL_ADC12_MEM_IDX_5 = 5, DL_ADC12_MEM_IDX_6 = 6, DL_ADC12_MEM_IDX_7 = 7, DL_ADC12_MEM_IDX_8 = 8, DL_ADC12_MEM_IDX_9 = 9, DL_ADC12_MEM_IDX_10 = 10, DL_ADC12_MEM_IDX_11 = 11 } |
enum | DL_ADC12_REPEAT_MODE { DL_ADC12_REPEAT_MODE_ENABLED = ADC12_CTL1_CONSEQ_REPEATSINGLE, DL_ADC12_REPEAT_MODE_DISABLED = ADC12_CTL1_CONSEQ_SINGLE } |
enum | DL_ADC12_SAMPLING_SOURCE { DL_ADC12_SAMPLING_SOURCE_AUTO = ADC12_CTL1_SAMPMODE_AUTO, DL_ADC12_SAMPLING_SOURCE_MANUAL = ADC12_CTL1_SAMPMODE_MANUAL } |
enum | DL_ADC12_TRIG_SRC { DL_ADC12_TRIG_SRC_SOFTWARE = ADC12_CTL1_TRIGSRC_SOFTWARE, DL_ADC12_TRIG_SRC_EVENT = ADC12_CTL1_TRIGSRC_EVENT } |
enum | DL_ADC12_SAMP_CONV_RES { DL_ADC12_SAMP_CONV_RES_12_BIT = ADC12_CTL2_RES_BIT_12, DL_ADC12_SAMP_CONV_RES_10_BIT = ADC12_CTL2_RES_BIT_10, DL_ADC12_SAMP_CONV_RES_8_BIT = ADC12_CTL2_RES_BIT_8 } |
enum | DL_ADC12_SAMP_CONV_DATA_FORMAT { DL_ADC12_SAMP_CONV_DATA_FORMAT_UNSIGNED = ADC12_CTL2_DF_UNSIGNED, DL_ADC12_SAMP_CONV_DATA_FORMAT_SIGNED = ADC12_CTL2_DF_SIGNED } |
enum | DL_ADC12_IIDX { DL_ADC12_IIDX_OVERFLOW = ADC12_CPU_INT_IIDX_STAT_OVIFG, DL_ADC12_IIDX_TRIG_OVERFLOW = ADC12_CPU_INT_IIDX_STAT_TOVIFG, DL_ADC12_IIDX_WINDOW_COMP_HIGH = ADC12_CPU_INT_IIDX_STAT_HIGHIFG, DL_ADC12_IIDX_WINDOW_COMP_LOW = ADC12_CPU_INT_IIDX_STAT_LOWIFG, DL_ADC12_IIDX_INIFG = ADC12_CPU_INT_IIDX_STAT_INIFG, DL_ADC12_IIDX_DMA_DONE = ADC12_CPU_INT_IIDX_STAT_DMADONE, DL_ADC12_IIDX_UNDERFLOW = ADC12_CPU_INT_IIDX_STAT_UVIFG, DL_ADC12_IIDX_MEM0_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG0, DL_ADC12_IIDX_MEM1_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG1, DL_ADC12_IIDX_MEM2_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG2, DL_ADC12_IIDX_MEM3_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG3, DL_ADC12_IIDX_MEM4_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG4, DL_ADC12_IIDX_MEM5_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG5, DL_ADC12_IIDX_MEM6_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG6, DL_ADC12_IIDX_MEM7_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG7, DL_ADC12_IIDX_MEM8_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG8, DL_ADC12_IIDX_MEM9_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG9, DL_ADC12_IIDX_MEM10_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG10, DL_ADC12_IIDX_MEM11_RESULT_LOADED = ADC12_CPU_INT_IIDX_STAT_MEMRESIFG11 } |
enum | DL_ADC12_CLOCK { DL_ADC12_CLOCK_SYSOSC = ADC12_CLKCFG_SAMPCLK_SYSOSC, DL_ADC12_CLOCK_ULPCLK = ADC12_CLKCFG_SAMPCLK_ULPCLK, DL_ADC12_CLOCK_HFCLK = ADC12_CLKCFG_SAMPCLK_HFCLK } |
enum | DL_ADC12_CLOCK_DIVIDE { DL_ADC12_CLOCK_DIVIDE_1 = ADC12_CTL0_SCLKDIV_DIV_BY_1, DL_ADC12_CLOCK_DIVIDE_2 = ADC12_CTL0_SCLKDIV_DIV_BY_2, DL_ADC12_CLOCK_DIVIDE_4 = ADC12_CTL0_SCLKDIV_DIV_BY_4, DL_ADC12_CLOCK_DIVIDE_8 = ADC12_CTL0_SCLKDIV_DIV_BY_8, DL_ADC12_CLOCK_DIVIDE_16 = ADC12_CTL0_SCLKDIV_DIV_BY_16, DL_ADC12_CLOCK_DIVIDE_24 = ADC12_CTL0_SCLKDIV_DIV_BY_24, DL_ADC12_CLOCK_DIVIDE_32 = ADC12_CTL0_SCLKDIV_DIV_BY_32, DL_ADC12_CLOCK_DIVIDE_48 = ADC12_CTL0_SCLKDIV_DIV_BY_48 } |
enum | DL_ADC12_CLOCK_FREQ_RANGE { DL_ADC12_CLOCK_FREQ_RANGE_1_TO_4 = ADC12_CLKFREQ_FRANGE_RANGE1TO4, DL_ADC12_CLOCK_FREQ_RANGE_4_TO_8 = ADC12_CLKFREQ_FRANGE_RANGE4TO8, DL_ADC12_CLOCK_FREQ_RANGE_8_TO_16 = ADC12_CLKFREQ_FRANGE_RANGE8TO16, DL_ADC12_CLOCK_FREQ_RANGE_16_TO_20 = ADC12_CLKFREQ_FRANGE_RANGE16TO20, DL_ADC12_CLOCK_FREQ_RANGE_20_TO_24 = ADC12_CLKFREQ_FRANGE_RANGE20TO24, DL_ADC12_CLOCK_FREQ_RANGE_24_TO_32 = ADC12_CLKFREQ_FRANGE_RANGE24TO32, DL_ADC12_CLOCK_FREQ_RANGE_32_TO_40 = ADC12_CLKFREQ_FRANGE_RANGE32TO40, DL_ADC12_CLOCK_FREQ_RANGE_40_TO_48 = ADC12_CLKFREQ_FRANGE_RANGE40TO48 } |
Functions | |
__STATIC_INLINE void | DL_ADC12_enablePower (ADC12_Regs *adc12) |
Enables the Peripheral Write Enable (PWREN) register for the ADC12. More... | |
__STATIC_INLINE void | DL_ADC12_disablePower (ADC12_Regs *adc12) |
Disables the Peripheral Write Enable (PWREN) register for the ADC12. More... | |
__STATIC_INLINE bool | DL_ADC12_isPowerEnabled (const ADC12_Regs *adc12) |
Returns if the Peripheral Write Enable (PWREN) register for the ADC12 is enabled. More... | |
__STATIC_INLINE void | DL_ADC12_reset (ADC12_Regs *adc12) |
Resets adc12 peripheral. More... | |
__STATIC_INLINE bool | DL_ADC12_isReset (const ADC12_Regs *adc12) |
Returns if adc12 peripheral was reset. More... | |
__STATIC_INLINE void | DL_ADC12_initSingleSample (ADC12_Regs *adc12, uint32_t repeatMode, uint32_t sampleMode, uint32_t trigSrc, uint32_t resolution, uint32_t dataFormat) |
Initializes ADC12 for single sampling mode operation. This initialization configures MEMCTL0 as the default memory control register for the conversion. If the conversion needs use a different memory control register the user can call DL_ADC12_setStartAddress to specify a different control register. More... | |
__STATIC_INLINE void | DL_ADC12_setStartAddress (ADC12_Regs *adc12, uint32_t startAdd) |
Sets the start address for ADC conversion. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getStartAddress (const ADC12_Regs *adc12) |
Gets start address for ADC conversion. More... | |
__STATIC_INLINE void | DL_ADC12_setEndAddress (ADC12_Regs *adc12, uint32_t endAdd) |
Sets the end address for ADC conversion. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEndAddress (const ADC12_Regs *adc12) |
Gets end address for ADC conversion. More... | |
__STATIC_INLINE void | DL_ADC12_initSeqSample (ADC12_Regs *adc12, uint32_t repeatMode, uint32_t sampleMode, uint32_t trigSrc, uint32_t startAdd, uint32_t endAdd, uint32_t resolution, uint32_t dataFormat) |
Initializes ADC12 for sequence sampling mode operation. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getResolution (const ADC12_Regs *adc12) |
Returns ADC12 resolution. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getDataFormat (const ADC12_Regs *adc12) |
Returns ADC12 data format. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getSamplingSource (const ADC12_Regs *adc12) |
Returns ADC12 sampling source. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getSampleMode (const ADC12_Regs *adc12) |
Returns ADC12 sampling mode. More... | |
__STATIC_INLINE DL_ADC12_TRIG_SRC | DL_ADC12_getTriggerSource (const ADC12_Regs *adc12) |
Returns ADC12 trigger mode. More... | |
__STATIC_INLINE void | DL_ADC12_startConversion (ADC12_Regs *adc12) |
Start ADC12 conversion. More... | |
__STATIC_INLINE void | DL_ADC12_stopConversion (ADC12_Regs *adc12) |
Stop ADC12 conversion. More... | |
__STATIC_INLINE bool | DL_ADC12_isConversionStarted (const ADC12_Regs *adc12) |
Check if ADC12 conversion is started. More... | |
__STATIC_INLINE void | DL_ADC12_enableDMA (ADC12_Regs *adc12) |
Enables DMA for data transfer. More... | |
__STATIC_INLINE void | DL_ADC12_disableDMA (ADC12_Regs *adc12) |
Disables DMA for data transfer. More... | |
__STATIC_INLINE bool | DL_ADC12_isDMAEnabled (const ADC12_Regs *adc12) |
Check if DMA is enabled. More... | |
__STATIC_INLINE void | DL_ADC12_setDMASamplesCnt (ADC12_Regs *adc12, uint8_t sampCnt) |
Set number of ADC results to be transfer on a DMA trigger. More... | |
__STATIC_INLINE uint8_t | DL_ADC12_getDMASampleCnt (const ADC12_Regs *adc12) |
Get number of ADC results to be transfer on a DMA trigger. More... | |
__STATIC_INLINE void | DL_ADC12_enableFIFO (ADC12_Regs *adc12) |
Enables FIFO mode. More... | |
__STATIC_INLINE void | DL_ADC12_disableFIFO (ADC12_Regs *adc12) |
Disables FIFO mode. More... | |
__STATIC_INLINE bool | DL_ADC12_isFIFOEnabled (const ADC12_Regs *adc12) |
Checks if FIFO mode is enabled. More... | |
void | DL_ADC12_setClockConfig (ADC12_Regs *adc12, const DL_ADC12_ClockConfig *config) |
Configures ADC12 sample clock divider and sample clock frequency range. More... | |
void | DL_ADC12_getClockConfig (const ADC12_Regs *adc12, DL_ADC12_ClockConfig *config) |
Returns ADC12 sample clock configuration. More... | |
__STATIC_INLINE void | DL_ADC12_setPowerDownMode (ADC12_Regs *adc12, uint32_t powerDownMode) |
Configures ADC12 power down mode. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getPowerDownMode (const ADC12_Regs *adc12) |
Returns ADC power down mode. More... | |
__STATIC_INLINE void | DL_ADC12_enableConversions (ADC12_Regs *adc12) |
Enable ADC12 conversion. More... | |
__STATIC_INLINE void | DL_ADC12_disableConversions (ADC12_Regs *adc12) |
Disable ADC12 conversion. More... | |
__STATIC_INLINE bool | DL_ADC12_isConversionsEnabled (const ADC12_Regs *adc12) |
Check if ADC12 conversion is enabled. More... | |
__STATIC_INLINE void | DL_ADC12_configHwAverage (ADC12_Regs *adc12, uint32_t numerator, uint32_t denominator) |
Configure ADC12 hardware average. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getHwAverageConfig (const ADC12_Regs *adc12) |
Return the hardware average configuration. More... | |
__STATIC_INLINE void | DL_ADC12_setSampleTime0 (ADC12_Regs *adc12, uint16_t adcclks) |
Set sample time 0. More... | |
__STATIC_INLINE uint16_t | DL_ADC12_getSampleTime0 (const ADC12_Regs *adc12) |
Get sample time 0. More... | |
__STATIC_INLINE void | DL_ADC12_setSampleTime1 (ADC12_Regs *adc12, uint16_t adcclks) |
Set sample time 1. More... | |
__STATIC_INLINE uint16_t | DL_ADC12_getSampleTime1 (const ADC12_Regs *adc12) |
Get sample time 1. More... | |
__STATIC_INLINE void | DL_ADC12_configWinCompLowThld (ADC12_Regs *adc12, uint16_t threshold) |
Configures window comparator low threshold. More... | |
__STATIC_INLINE void | DL_ADC12_configWinCompHighThld (ADC12_Regs *adc12, uint16_t threshold) |
Configures window comparator high threshold. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getFIFOData (const ADC12_Regs *adc12) |
Returns the data from the top of FIFO. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getFIFOAddress (const ADC12_Regs *adc12) |
Returns the address of FIFO data register. More... | |
__STATIC_INLINE void | DL_ADC12_configConversionMem (ADC12_Regs *adc12, DL_ADC12_MEM_IDX idx, uint32_t chansel, uint32_t vref, uint32_t stime, uint32_t avgen, uint32_t bcsen, uint32_t trig, uint32_t wincomp) |
Configures conversion memory. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getConversionMemConfig (const ADC12_Regs *adc12, DL_ADC12_MEM_IDX idx) |
Returns conversion memory configuration. More... | |
__STATIC_INLINE uint16_t | DL_ADC12_getMemResult (const ADC12_Regs *adc12, DL_ADC12_MEM_IDX idx) |
Returns the conversion result for the selected memory index. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getMemResultAddress (const ADC12_Regs *adc12, DL_ADC12_MEM_IDX idx) |
Returns the conversion result memory address. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getStatus (const ADC12_Regs *adc12) |
Returns ADC12 status. More... | |
__STATIC_INLINE void | DL_ADC12_disableForcingSYSOSCOnInRunMode (ADC12_Regs *adc12) |
Allows SYSOSC to not run at base frequency when device is in RUN mode. More... | |
__STATIC_INLINE void | DL_ADC12_forceSYSOSCOnInRunMode (ADC12_Regs *adc12) |
Forces SYSOSC to run at base frequency when device is in RUN mode. More... | |
__STATIC_INLINE void | DL_ADC12_disableForcingSYSOSCOnInStopMode (ADC12_Regs *adc12) |
Allows SYSOSC to not run at base frequency when device is in STOP mode. More... | |
__STATIC_INLINE void | DL_ADC12_forceSYSOSCOnInStopMode (ADC12_Regs *adc12) |
Forces SYSOSC to run at base frequency when device is in STOP mode. More... | |
__STATIC_INLINE void | DL_ADC12_enableInterrupt (ADC12_Regs *adc12, uint32_t interruptMask) |
Enable ADC12 interrupt. More... | |
__STATIC_INLINE void | DL_ADC12_disableInterrupt (ADC12_Regs *adc12, uint32_t interruptMask) |
Disable ADC12 interrupt. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledInterrupts (const ADC12_Regs *adc12, uint32_t interruptMask) |
Check which ADC12 interrupts are enabled. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledInterruptStatus (const ADC12_Regs *adc12, uint32_t interruptMask) |
Check interrupt flag of enabled ADC12 interrupt. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getRawInterruptStatus (const ADC12_Regs *adc12, uint32_t interruptMask) |
Check interrupt flag of any ADC12 interrupt. More... | |
__STATIC_INLINE DL_ADC12_IIDX | DL_ADC12_getPendingInterrupt (const ADC12_Regs *adc12) |
Get highest priority pending ADC12 interrupt. More... | |
__STATIC_INLINE void | DL_ADC12_clearInterruptStatus (ADC12_Regs *adc12, uint32_t interruptMask) |
Clear pending ADC12 interrupt. More... | |
__STATIC_INLINE void | DL_ADC12_setPublisherChanID (ADC12_Regs *adc12, uint8_t chanID) |
Sets the event publisher channel id. More... | |
__STATIC_INLINE uint8_t | DL_ADC12_getPublisherChanID (const ADC12_Regs *adc12) |
Gets the event publisher channel id. More... | |
__STATIC_INLINE void | DL_ADC12_setSubscriberChanID (ADC12_Regs *adc12, uint8_t chanID) |
Sets the event subscriber channel id. More... | |
__STATIC_INLINE uint8_t | DL_ADC12_getSubscriberChanID (const ADC12_Regs *adc12) |
Gets the event subscriber channel id. More... | |
__STATIC_INLINE void | DL_ADC12_enableEvent (ADC12_Regs *adc12, uint32_t eventMask) |
Enable ADC12 event. More... | |
__STATIC_INLINE void | DL_ADC12_disableEvent (ADC12_Regs *adc12, uint32_t eventMask) |
Disable ADC12 event. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledEvents (const ADC12_Regs *adc12, uint32_t eventMask) |
Check which adc12 dma triggers are enabled. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledEventStatus (const ADC12_Regs *adc12, uint32_t eventMask) |
Check event flag of enabled adc12 event. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getRawEventsStatus (const ADC12_Regs *adc12, uint32_t eventMask) |
Check event flag of any adc12 event. More... | |
__STATIC_INLINE void | DL_ADC12_clearEventsStatus (ADC12_Regs *adc12, uint32_t eventMask) |
Clear pending adc12 events. More... | |
__STATIC_INLINE void | DL_ADC12_enableDMATrigger (ADC12_Regs *adc12, uint32_t dmaMask) |
Enable ADC12 DMA triggers. More... | |
__STATIC_INLINE void | DL_ADC12_disableDMATrigger (ADC12_Regs *adc12, uint32_t dmaMask) |
Disable ADC12 DMA triggers. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledDMATrigger (const ADC12_Regs *adc12, uint32_t dmaMask) |
Check which adc12 DMA triggers are enabled. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getEnabledDMATriggerStatus (const ADC12_Regs *adc12, uint32_t dmaMask) |
Check event flag of enabled adc12 DMA triggers. More... | |
__STATIC_INLINE uint32_t | DL_ADC12_getRawDMATriggerStatus (const ADC12_Regs *adc12, uint32_t dmaMask) |
Check DMA triggers flag of any adc12 dma trigger. More... | |
__STATIC_INLINE void | DL_ADC12_clearDMATriggerStatus (ADC12_Regs *adc12, uint32_t dmaMask) |
Clear pending adc12 DMA triggers. More... | |
__STATIC_INLINE int16_t | DL_ADC12_getADCOffsetCalibration (float userRef) |
Get calibration ADC offset value. More... | |
The Analog to Digital Converter Driver Library allows full configuration of the MSPM0 ADC module. The ADC is a high-performance successive-approximation-register (SAR) analog-to-digital converter.
#define DL_ADC12_SVT_OFFSET ((uint32_t)0x555000 >> (uint32_t)2) |
This is an internal macro is used to resolve the offset to ADC12 SVT.
The offset from ADC12 base to ADC12 SVT is 0x556000. However the FIFODATA and MEMRES registers within SVT are offset by an additional 0x1000. For example, the FIFODATA register from ADC12 base has offset 0x1160. The same register in ADC12 SVT has offset 0x0160.
This 0x1000 difference is taken in to consideration by DL_ADC12_SVT_OFFSET. Formula: (ADC12 SVT - ADC12 BASE) - 0x1000
Used by the following APIs: DL_ADC12_getFIFOData DL_ADC12_getFIFOAddress DL_ADC12_getMemResult DL_ADC12_getMemResultAddress
Referenced by DL_ADC12_getFIFOAddress(), DL_ADC12_getFIFOData(), DL_ADC12_getMemResult(), and DL_ADC12_getMemResultAddress().
enum DL_ADC12_MEM_IDX |
enum DL_ADC12_REPEAT_MODE |
enum DL_ADC12_TRIG_SRC |
enum DL_ADC12_IIDX |
enum DL_ADC12_CLOCK |
__STATIC_INLINE void DL_ADC12_enablePower | ( | ADC12_Regs * | adc12 | ) |
Enables the Peripheral Write Enable (PWREN) register for the ADC12.
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral's PWREN register.
adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disablePower | ( | ADC12_Regs * | adc12 | ) |
Disables the Peripheral Write Enable (PWREN) register for the ADC12.
When the PWREN.ENABLE bit is cleared, the peripheral's registers are not accessible for read/write operations.
adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_ADC12_isPowerEnabled | ( | const ADC12_Regs * | adc12 | ) |
Returns if the Peripheral Write Enable (PWREN) register for the ADC12 is enabled.
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral's PWREN register.
When the PWREN.ENABLE bit is cleared, the peripheral's registers are not accessible for read/write operations.
adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_reset | ( | ADC12_Regs * | adc12 | ) |
Resets adc12 peripheral.
adc12 | Pointer to the register overlay for the ADC12 peripheral |
__STATIC_INLINE bool DL_ADC12_isReset | ( | const ADC12_Regs * | adc12 | ) |
Returns if adc12 peripheral was reset.
adc12 | Pointer to the register overlay for the ADC12 peripheral |
__STATIC_INLINE void DL_ADC12_initSingleSample | ( | ADC12_Regs * | adc12, |
uint32_t | repeatMode, | ||
uint32_t | sampleMode, | ||
uint32_t | trigSrc, | ||
uint32_t | resolution, | ||
uint32_t | dataFormat | ||
) |
Initializes ADC12 for single sampling mode operation. This initialization configures MEMCTL0 as the default memory control register for the conversion. If the conversion needs use a different memory control register the user can call DL_ADC12_setStartAddress to specify a different control register.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | repeatMode | Specifies repeat configuration. One of DL_ADC12_REPEAT_MODE |
[in] | sampleMode | Specifies source of the sampling signal. One of DL_ADC12_SAMPLING_SOURCE |
[in] | trigSrc | Specifies sampling trigger source. One of DL_ADC12_TRIG_SRC |
[in] | resolution | Specifies sample conversion resolution. One of DL_ADC12_SAMP_CONV_RES |
[in] | dataFormat | Specifies sample conversion data format. One of DL_ADC12_SAMP_CONV_DATA_FORMAT |
References DL_Common_updateReg().
__STATIC_INLINE void DL_ADC12_setStartAddress | ( | ADC12_Regs * | adc12, |
uint32_t | startAdd | ||
) |
Sets the start address for ADC conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | startAdd | If ADC has been initialized in Single Sample mode, startAdd specifies the memory control register to be used during conversion. If ADC is initialized in sequence sampling mode, it specifies the first memory control register in the sequence. One of DL_ADC12_SEQ_START_ADDR |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_ADC12_getStartAddress | ( | const ADC12_Regs * | adc12 | ) |
Gets start address for ADC conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_setEndAddress | ( | ADC12_Regs * | adc12, |
uint32_t | endAdd | ||
) |
Sets the end address for ADC conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | endAdd | When ADC is initialized in sequence sampling mode it specifies the last memory control register in the sequence. One of DL_ADC12_SEQ_END_ADDR |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_ADC12_getEndAddress | ( | const ADC12_Regs * | adc12 | ) |
Gets end address for ADC conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_initSeqSample | ( | ADC12_Regs * | adc12, |
uint32_t | repeatMode, | ||
uint32_t | sampleMode, | ||
uint32_t | trigSrc, | ||
uint32_t | startAdd, | ||
uint32_t | endAdd, | ||
uint32_t | resolution, | ||
uint32_t | dataFormat | ||
) |
Initializes ADC12 for sequence sampling mode operation.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | repeatMode | Specifies repeat configuration. One of DL_ADC12_REPEAT_MODE |
[in] | sampleMode | Specifies source of the sampling signal. One of DL_ADC12_SAMPLING_SOURCE |
[in] | trigSrc | Specifies sampling trigger source. One of DL_ADC12_TRIG_SRC |
[in] | startAdd | Specifies the starting address to sequence conversion. One of DL_ADC12_SEQ_START_ADDR |
[in] | endAdd | Specifies the ending address to sequence conversion. One of DL_ADC12_SEQ_END_ADDR |
[in] | resolution | Specifies sample conversion resolution. One of DL_ADC12_SAMP_CONV_RES |
[in] | dataFormat | Specifies sample conversion data format. One of DL_ADC12_SAMP_CONV_DATA_FORMAT |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_ADC12_getResolution | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 resolution.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE uint32_t DL_ADC12_getDataFormat | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 data format.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE uint32_t DL_ADC12_getSamplingSource | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 sampling source.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE uint32_t DL_ADC12_getSampleMode | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 sampling mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_ADC12_TRIG_SRC DL_ADC12_getTriggerSource | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 trigger mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_startConversion | ( | ADC12_Regs * | adc12 | ) |
Start ADC12 conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_stopConversion | ( | ADC12_Regs * | adc12 | ) |
Stop ADC12 conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_ADC12_isConversionStarted | ( | const ADC12_Regs * | adc12 | ) |
Check if ADC12 conversion is started.
[in] | adc12 | Pointer to the register overlay for the peripheral |
true | ADC12 conversion is started |
false | ADC12 conversion is stopped |
__STATIC_INLINE void DL_ADC12_enableDMA | ( | ADC12_Regs * | adc12 | ) |
Enables DMA for data transfer.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disableDMA | ( | ADC12_Regs * | adc12 | ) |
Disables DMA for data transfer.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_ADC12_isDMAEnabled | ( | const ADC12_Regs * | adc12 | ) |
Check if DMA is enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
true | DMA is enabled |
false | DMA is disabled |
__STATIC_INLINE void DL_ADC12_setDMASamplesCnt | ( | ADC12_Regs * | adc12, |
uint8_t | sampCnt | ||
) |
Set number of ADC results to be transfer on a DMA trigger.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | sampCnt | Number of ADC results to be transfer on a DMA trigger. Valid range 0 - 24. |
References DL_Common_updateReg().
__STATIC_INLINE uint8_t DL_ADC12_getDMASampleCnt | ( | const ADC12_Regs * | adc12 | ) |
Get number of ADC results to be transfer on a DMA trigger.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_enableFIFO | ( | ADC12_Regs * | adc12 | ) |
Enables FIFO mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disableFIFO | ( | ADC12_Regs * | adc12 | ) |
Disables FIFO mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_ADC12_isFIFOEnabled | ( | const ADC12_Regs * | adc12 | ) |
Checks if FIFO mode is enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
true | FIFO mode is enabled |
false | FIFO mode is disabled |
References DL_ADC12_getClockConfig(), and DL_ADC12_setClockConfig().
void DL_ADC12_setClockConfig | ( | ADC12_Regs * | adc12, |
const DL_ADC12_ClockConfig * | config | ||
) |
Configures ADC12 sample clock divider and sample clock frequency range.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the clock configuration struct DL_ADC12_ClockConfig. |
Referenced by DL_ADC12_isFIFOEnabled().
void DL_ADC12_getClockConfig | ( | const ADC12_Regs * | adc12, |
DL_ADC12_ClockConfig * | config | ||
) |
Returns ADC12 sample clock configuration.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the clock configuration struct DL_ADC12_ClockConfig. |
Referenced by DL_ADC12_isFIFOEnabled().
__STATIC_INLINE void DL_ADC12_setPowerDownMode | ( | ADC12_Regs * | adc12, |
uint32_t | powerDownMode | ||
) |
Configures ADC12 power down mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | powerDownMode | Specifies the power down mode. One of DL_ADC12_POWER_DOWN_MODE. |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_ADC12_getPowerDownMode | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC power down mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
One | of DL_ADC12_POWER_DOWN_MODE |
__STATIC_INLINE void DL_ADC12_enableConversions | ( | ADC12_Regs * | adc12 | ) |
Enable ADC12 conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disableConversions | ( | ADC12_Regs * | adc12 | ) |
Disable ADC12 conversion.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_ADC12_isConversionsEnabled | ( | const ADC12_Regs * | adc12 | ) |
Check if ADC12 conversion is enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
true | The ADC12 conversion is enabled |
false | The ADC12 conversion is disabled |
__STATIC_INLINE void DL_ADC12_configHwAverage | ( | ADC12_Regs * | adc12, |
uint32_t | numerator, | ||
uint32_t | denominator | ||
) |
Configure ADC12 hardware average.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | numerator | Specifies the number of conversion to accumulate. One of DL_ADC12_HW_AVG_NUM |
[in] | denominator | Specifies the number to divide the accumulated value by. One of DL_ADC12_HW_AVG_DEN |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_ADC12_getHwAverageConfig | ( | const ADC12_Regs * | adc12 | ) |
Return the hardware average configuration.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_setSampleTime0 | ( | ADC12_Regs * | adc12, |
uint16_t | adcclks | ||
) |
Set sample time 0.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | adcclks | Specifies the sample time in number of ADCCLK cycles. Actual sample time is (adcclks + 1) |
__STATIC_INLINE uint16_t DL_ADC12_getSampleTime0 | ( | const ADC12_Regs * | adc12 | ) |
Get sample time 0.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_setSampleTime1 | ( | ADC12_Regs * | adc12, |
uint16_t | adcclks | ||
) |
Set sample time 1.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | adcclks | Specifies the sample time in number of ADCCLK cycles. Actual sample time is (adcclks + 1) |
__STATIC_INLINE uint16_t DL_ADC12_getSampleTime1 | ( | const ADC12_Regs * | adc12 | ) |
Get sample time 1.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_configWinCompLowThld | ( | ADC12_Regs * | adc12, |
uint16_t | threshold | ||
) |
Configures window comparator low threshold.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | threshold | Window comparator low threshold value. Threshold value must take into account result data format and and resolution confugred via DL_ADC12_initSingleSample or DL_ADC12_initSeqSample |
__STATIC_INLINE void DL_ADC12_configWinCompHighThld | ( | ADC12_Regs * | adc12, |
uint16_t | threshold | ||
) |
Configures window comparator high threshold.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | threshold | Window comparator high threshold value. Threshold value must take into account result data format and and resolution confugred via DL_ADC12_initSingleSample or DL_ADC12_initSeqSample |
__STATIC_INLINE uint32_t DL_ADC12_getFIFOData | ( | const ADC12_Regs * | adc12 | ) |
Returns the data from the top of FIFO.
[in] | adc12 | Pointer to the register overlay for the peripheral |
References DL_ADC12_SVT_OFFSET.
__STATIC_INLINE uint32_t DL_ADC12_getFIFOAddress | ( | const ADC12_Regs * | adc12 | ) |
Returns the address of FIFO data register.
[in] | adc12 | Pointer to the register overlay for the peripheral |
References DL_ADC12_SVT_OFFSET.
__STATIC_INLINE void DL_ADC12_configConversionMem | ( | ADC12_Regs * | adc12, |
DL_ADC12_MEM_IDX | idx, | ||
uint32_t | chansel, | ||
uint32_t | vref, | ||
uint32_t | stime, | ||
uint32_t | avgen, | ||
uint32_t | bcsen, | ||
uint32_t | trig, | ||
uint32_t | wincomp | ||
) |
Configures conversion memory.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | idx | Memory conversion index. DL_ADC12_MEM_IDX. |
[in] | chansel | Selects input channel. One of DL_ADC12_INPUT_CHAN |
[in] | vref | Selects reference voltage. One of DL_ADC12_REFERENCE_VOLTAGE |
[in] | stime | Selects source of sample adc12 period. One of DL_ADC12_SAMPLE_TIMER_SOURCE |
[in] | avgen | Selects averaging mode. One of DL_ADC12_AVERAGING_MODE |
[in] | bcsen | Selects burn out current source selection. One of DL_ADC12_BURN_OUT_SOURCE |
[in] | trig | Selects trigger mode. One of DL_ADC12_TRIGGER_MODE |
[in] | wincomp | Selects window comparator mode. One of DL_ADC12_WINDOWS_COMP_MODE |
__STATIC_INLINE uint32_t DL_ADC12_getConversionMemConfig | ( | const ADC12_Regs * | adc12, |
DL_ADC12_MEM_IDX | idx | ||
) |
Returns conversion memory configuration.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | idx | Memory conversion index. DL_ADC12_MEM_IDX. |
__STATIC_INLINE uint16_t DL_ADC12_getMemResult | ( | const ADC12_Regs * | adc12, |
DL_ADC12_MEM_IDX | idx | ||
) |
Returns the conversion result for the selected memory index.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | idx | Memory conversion index. DL_ADC12_MEM_IDX. |
References DL_ADC12_SVT_OFFSET.
__STATIC_INLINE uint32_t DL_ADC12_getMemResultAddress | ( | const ADC12_Regs * | adc12, |
DL_ADC12_MEM_IDX | idx | ||
) |
Returns the conversion result memory address.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | idx | Memory conversion index. DL_ADC12_MEM_IDX. |
References DL_ADC12_SVT_OFFSET.
__STATIC_INLINE uint32_t DL_ADC12_getStatus | ( | const ADC12_Regs * | adc12 | ) |
Returns ADC12 status.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disableForcingSYSOSCOnInRunMode | ( | ADC12_Regs * | adc12 | ) |
Allows SYSOSC to not run at base frequency when device is in RUN mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
References DL_Common_updateReg().
__STATIC_INLINE void DL_ADC12_forceSYSOSCOnInRunMode | ( | ADC12_Regs * | adc12 | ) |
Forces SYSOSC to run at base frequency when device is in RUN mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_disableForcingSYSOSCOnInStopMode | ( | ADC12_Regs * | adc12 | ) |
Allows SYSOSC to not run at base frequency when device is in STOP mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
References DL_Common_updateReg().
__STATIC_INLINE void DL_ADC12_forceSYSOSCOnInStopMode | ( | ADC12_Regs * | adc12 | ) |
Forces SYSOSC to run at base frequency when device is in STOP mode.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_enableInterrupt | ( | ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Enable ADC12 interrupt.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
__STATIC_INLINE void DL_ADC12_disableInterrupt | ( | ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Disable ADC12 interrupt.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledInterrupts | ( | const ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Check which ADC12 interrupts are enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
Bitwise | OR of DL_ADC12_INTERRUPTS values |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledInterruptStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Check interrupt flag of enabled ADC12 interrupt.
Checks if the ADC12 interrupt that was previously enabled is pending.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
__STATIC_INLINE uint32_t DL_ADC12_getRawInterruptStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Check interrupt flag of any ADC12 interrupt.
Checks if the ADC12 interrupt is pending. Interrupt does not have to be previously enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
__STATIC_INLINE DL_ADC12_IIDX DL_ADC12_getPendingInterrupt | ( | const ADC12_Regs * | adc12 | ) |
Get highest priority pending ADC12 interrupt.
Checks if any of the ADC12 interrupts are pending. Interrupts do not have to be previously enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
One | of DL_ADC12_IIDX |
__STATIC_INLINE void DL_ADC12_clearInterruptStatus | ( | ADC12_Regs * | adc12, |
uint32_t | interruptMask | ||
) |
Clear pending ADC12 interrupt.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_ADC12_INTERRUPTS. |
__STATIC_INLINE void DL_ADC12_setPublisherChanID | ( | ADC12_Regs * | adc12, |
uint8_t | chanID | ||
) |
Sets the event publisher channel id.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | chanID | Channel ID number. Valid range 0-15. If ChanID == 0 publisher is disconnected. |
__STATIC_INLINE uint8_t DL_ADC12_getPublisherChanID | ( | const ADC12_Regs * | adc12 | ) |
Gets the event publisher channel id.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_setSubscriberChanID | ( | ADC12_Regs * | adc12, |
uint8_t | chanID | ||
) |
Sets the event subscriber channel id.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | chanID | Channel ID number. Valid range 0-15. If ChanID == 0 subscriber is disconnected. |
__STATIC_INLINE uint8_t DL_ADC12_getSubscriberChanID | ( | const ADC12_Regs * | adc12 | ) |
Gets the event subscriber channel id.
[in] | adc12 | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_ADC12_enableEvent | ( | ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Enable ADC12 event.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of events to enable. Bitwise OR of DL_ADC12_EVENT. |
__STATIC_INLINE void DL_ADC12_disableEvent | ( | ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Disable ADC12 event.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of events to enable. Bitwise OR of DL_ADC12_EVENT. |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledEvents | ( | const ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Check which adc12 dma triggers are enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of events to check. Bitwise OR of DL_ADC12_EVENT. |
Bitwise | OR of DL_ADC12_EVENT values |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledEventStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Check event flag of enabled adc12 event.
Checks if any of the adc12 events that were previously enabled are pending.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of events to check. Bitwise OR of DL_ADC12_EVENT. |
Bitwise | OR of DL_ADC12_EVENT values |
__STATIC_INLINE uint32_t DL_ADC12_getRawEventsStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Check event flag of any adc12 event.
Checks if any events are pending. Events do not have to be previously enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of event to check. Bitwise OR of DL_ADC12_EVENT. |
Bitwise | OR of DL_ADC12_EVENT values |
__STATIC_INLINE void DL_ADC12_clearEventsStatus | ( | ADC12_Regs * | adc12, |
uint32_t | eventMask | ||
) |
Clear pending adc12 events.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | eventMask | Bit mask of events to clear. Bitwise OR of DL_ADC12_EVENT. |
__STATIC_INLINE void DL_ADC12_enableDMATrigger | ( | ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Enable ADC12 DMA triggers.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to enable. Bitwise OR of DL_ADC12_DMA. |
__STATIC_INLINE void DL_ADC12_disableDMATrigger | ( | ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Disable ADC12 DMA triggers.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to enable. Bitwise OR of DL_ADC12_DMA. |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledDMATrigger | ( | const ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Check which adc12 DMA triggers are enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to check. Bitwise OR of DL_ADC12_DMA. |
Bitwise | OR of DL_ADC12_DMA values |
__STATIC_INLINE uint32_t DL_ADC12_getEnabledDMATriggerStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Check event flag of enabled adc12 DMA triggers.
Checks if any of the adc12 DMA triggers that were previously enabled are pending.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to check. Bitwise OR of DL_ADC12_DMA. |
Bitwise | OR of DL_ADC12_DMA values |
__STATIC_INLINE uint32_t DL_ADC12_getRawDMATriggerStatus | ( | const ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Check DMA triggers flag of any adc12 dma trigger.
Checks if any dma trigger are pending. DMA triggers do not have to be previously enabled.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to check. Bitwise OR of DL_ADC12_DMA. |
Bitwise | OR of DL_ADC12_DMA values |
__STATIC_INLINE void DL_ADC12_clearDMATriggerStatus | ( | ADC12_Regs * | adc12, |
uint32_t | dmaMask | ||
) |
Clear pending adc12 DMA triggers.
[in] | adc12 | Pointer to the register overlay for the peripheral |
[in] | dmaMask | Bit mask of DMA triggers to clear. Bitwise OR of DL_ADC12_DMA. |
__STATIC_INLINE int16_t DL_ADC12_getADCOffsetCalibration | ( | float | userRef | ) |
Get calibration ADC offset value.
Workaround for errata on MSPM0C110x devices: ADC_ERR_06
Offset needs to be calibrated each time DL_ADC12_configConversionMem is configured with a new voltage reference.
User needs to add calibrated offset to the result of DL_ADC12_getMemResult to get correct ADC value.
[in] | userRef | Reference voltage |
References DL_FactoryRegion_getADCOffset().