![]() |
![]() |
MSPM0L111X Driver Library
2.05.00.05
|
![]() |
Data Structures | |
struct | DL_Timer_ClockConfig |
Configuration struct for DL_Timer_setClockConfig. More... | |
struct | DL_Timer_TimerConfig |
Configuration struct for DL_Timer_initTimerMode. More... | |
struct | DL_Timer_CaptureConfig |
Configuration struct for DL_Timer_initCaptureMode. More... | |
struct | DL_Timer_CaptureTriggerConfig |
Configuration struct for DL_Timer_initCaptureTriggerMode. More... | |
struct | DL_Timer_CaptureCombinedConfig |
Configuration struct for DL_Timer_initCaptureCombinedMode. More... | |
struct | DL_Timer_CompareConfig |
Configuration struct for DL_Timer_initCompareMode. More... | |
struct | DL_Timer_CompareTriggerConfig |
Configuration struct for DL_Timer_initCompareTriggerMode. More... | |
struct | DL_Timer_PWMConfig |
Configuration struct for DL_Timer_initPWMMode. More... | |
struct | DL_Timer_backupConfig |
Configuration structure to backup Timer peripheral state before entering STOP or STANDBY mode. Used by DL_Timer_saveConfiguration and DL_Timer_restoreConfiguration. More... | |
Macros | |
#define | DL_Timer_initPWMMode DL_Timer_initFourCCPWMMode |
Redirects to common DL_Timer_initFourCCPWMMode. | |
Functions | |
__STATIC_INLINE void | DL_Timer_enablePower (GPTIMER_Regs *gptimer) |
Enables the Peripheral Write Enable (PWREN) register for the timer. More... | |
__STATIC_INLINE void | DL_Timer_disablePower (GPTIMER_Regs *gptimer) |
Disables the Peripheral Write Enable (PWREN) register for the timer. More... | |
__STATIC_INLINE bool | DL_Timer_isPowerEnabled (const GPTIMER_Regs *gptimer) |
Returns if the Peripheral Write Enable (PWREN) register for the timer is enabled. More... | |
__STATIC_INLINE void | DL_Timer_reset (GPTIMER_Regs *gptimer) |
Resets timer peripheral. More... | |
__STATIC_INLINE bool | DL_Timer_isReset (const GPTIMER_Regs *gptimer) |
Returns if timer peripheral has been reset. More... | |
__STATIC_INLINE void | DL_Timer_setCCPDirection (GPTIMER_Regs *gptimer, uint32_t ccpConfig) |
Sets CCP Direction. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getCCPDirection (const GPTIMER_Regs *gptimer) |
Gets CCP Direction. More... | |
__STATIC_INLINE void | DL_Timer_setCCPOutputDisabled (GPTIMER_Regs *gptimer, DL_TIMER_CCP_DIS_OUT ccp0Config, DL_TIMER_CCP_DIS_OUT ccp1Config) |
Forces the output of the timer low via the ODIS register. This can be useful during shutdown or configuring the timer. The output pin still passes through the inversion (INV) bit. See figure "Output connection for TIMG" in Technical Reference Manual (TRM) for diagram. DL_Timer_overrideCCPOut() can be used for for similar functionality, where independent overrride settings for the output and complementary output channels can be configured. More... | |
__STATIC_INLINE void | DL_Timer_setCCPOutputDisabledAdv (GPTIMER_Regs *gptimer, uint32_t ccpOdisConfig) |
Sets CCP Output configuration for timer instances with more than two CCP channels via the ODIS register. The output pin still passes through the inversion (INV) bit. More... | |
void | DL_Timer_setClockConfig (GPTIMER_Regs *gptimer, const DL_Timer_ClockConfig *config) |
Configure timer source clock. More... | |
void | DL_Timer_getClockConfig (const GPTIMER_Regs *gptimer, DL_Timer_ClockConfig *config) |
Get timer source clock configuration. More... | |
__STATIC_INLINE void | DL_Timer_enableClock (GPTIMER_Regs *gptimer) |
Enable timer clock. More... | |
__STATIC_INLINE void | DL_Timer_disableClock (GPTIMER_Regs *gptimer) |
Disable timer clock. More... | |
__STATIC_INLINE bool | DL_Timer_isClockEnabled (const GPTIMER_Regs *gptimer) |
Returns if timer clock is disabled. More... | |
__STATIC_INLINE void | DL_Timer_configCrossTrigger (GPTIMER_Regs *gptimer, DL_TIMER_CROSS_TRIG_SRC ctSource, DL_TIMER_CROSS_TRIGGER_INPUT enInTrigCond, DL_TIMER_CROSS_TRIGGER_MODE enCrossTrig) |
Configure Cross Timer Trigger. More... | |
__STATIC_INLINE void | DL_Timer_configCrossTriggerSrc (GPTIMER_Regs *gptimer, DL_TIMER_CROSS_TRIG_SRC ctSource) |
Configure Cross Timer Trigger source. More... | |
__STATIC_INLINE void | DL_Timer_configCrossTriggerInputCond (GPTIMER_Regs *gptimer, DL_TIMER_CROSS_TRIGGER_INPUT enInTrigCond) |
Enables/DIsables Input Trigger condition for Cross Timer Trigger. More... | |
__STATIC_INLINE void | DL_Timer_configCrossTriggerEnable (GPTIMER_Regs *gptimer, DL_TIMER_CROSS_TRIGGER_MODE enCrossTrig) |
Enable/Disable Cross Timer Trigger. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getCrossTriggerConfig (const GPTIMER_Regs *gptimer) |
Get Cross Timer Trigger configuration. More... | |
__STATIC_INLINE DL_TIMER_CROSS_TRIG_SRC | DL_Timer_getCrossTriggerSrc (const GPTIMER_Regs *gptimer) |
Get Cross Timer Trigger source. More... | |
__STATIC_INLINE DL_TIMER_CROSS_TRIGGER_INPUT | DL_Timer_getCrossTriggerInputCond (const GPTIMER_Regs *gptimer) |
Get Input Trigger condition for Cross Timer Trigger. More... | |
__STATIC_INLINE DL_TIMER_CROSS_TRIGGER_MODE | DL_Timer_getCrossTriggerEnable (const GPTIMER_Regs *gptimer) |
Checks if Cross Timer Trigger is enabled or disabled. More... | |
__STATIC_INLINE void | DL_Timer_generateCrossTrigger (GPTIMER_Regs *gptimer) |
Generates a synchronized trigger condition across all trigger enabled Timer instances. More... | |
__STATIC_INLINE void | DL_Timer_enableShadowFeatures (GPTIMER_Regs *gptimer) |
Enable shadow to activate load of buffered registers and register fields. More... | |
__STATIC_INLINE void | DL_Timer_disableShadowFeatures (GPTIMER_Regs *gptimer) |
Disable shadow to activate load of buffered registers and register fields. More... | |
__STATIC_INLINE void | DL_Timer_setLoadValue (GPTIMER_Regs *gptimer, uint32_t value) |
Sets timer LOAD register value. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getLoadValue (const GPTIMER_Regs *gptimer) |
Gets the timer LOAD register value. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getTimerCount (const GPTIMER_Regs *gptimer) |
Gets the current counter value of the timer. More... | |
__STATIC_INLINE void | DL_Timer_setTimerCount (GPTIMER_Regs *gptimer, uint32_t value) |
Set timer counter value. More... | |
__STATIC_INLINE void | DL_Timer_enableLZEventSuppression (GPTIMER_Regs *gptimer) |
Enable suppression of load and zero events. More... | |
__STATIC_INLINE void | DL_Timer_disableLZEventSuppression (GPTIMER_Regs *gptimer) |
Disable suppression of load and zero events. More... | |
__STATIC_INLINE bool | DL_Timer_isLZEventSuppressionEnabled (const GPTIMER_Regs *gptimer) |
Checks if suppression of load and zero events is enabled. More... | |
__STATIC_INLINE void | DL_Timer_setDebugReleaseBehavior (GPTIMER_Regs *gptimer, DL_TIMER_DEBUG_RES debResB) |
Configures timer behavior during debug release/exit. More... | |
__STATIC_INLINE DL_TIMER_DEBUG_RES | DL_Timer_getDebugReleaseBehavior (const GPTIMER_Regs *gptimer) |
Get timer resume behavior after relase/exit of debug mode. More... | |
__STATIC_INLINE void | DL_Timer_setCounterControl (GPTIMER_Regs *gptimer, DL_TIMER_CZC zeroCtl, DL_TIMER_CAC advCtl, DL_TIMER_CLC loadCtl) |
Configure timer counter control operation. More... | |
__STATIC_INLINE DL_TIMER_CZC | DL_Timer_getCounterZeroControl (const GPTIMER_Regs *gptimer) |
Get timer counter zero control operation. More... | |
__STATIC_INLINE DL_TIMER_CAC | DL_Timer_getCounterAdvanceControl (const GPTIMER_Regs *gptimer) |
Get timer counter advance control operation. More... | |
__STATIC_INLINE DL_TIMER_CLC | DL_Timer_getCounterLoadControl (const GPTIMER_Regs *gptimer) |
Get timer counter load control operation. More... | |
__STATIC_INLINE void | DL_Timer_setCounterMode (GPTIMER_Regs *gptimer, DL_TIMER_COUNT_MODE countMode) |
Configure timer counter couting mode. More... | |
__STATIC_INLINE DL_TIMER_COUNT_MODE | DL_Timer_getCounterMode (const GPTIMER_Regs *gptimer) |
Get timer counter couting mode. More... | |
__STATIC_INLINE void | DL_Timer_setCounterValueAfterEnable (GPTIMER_Regs *gptimer, DL_TIMER_COUNT_AFTER_EN cvae) |
Configures counter value after enable. More... | |
__STATIC_INLINE DL_TIMER_COUNT_AFTER_EN | DL_Timer_getCounterValueAfterEnable (const GPTIMER_Regs *gptimer) |
Returns counter value after enable cofiguration. More... | |
__STATIC_INLINE void | DL_Timer_setCounterRepeatMode (GPTIMER_Regs *gptimer, DL_TIMER_REPEAT_MODE repeatMode) |
Configure timer repeat counter mode. More... | |
__STATIC_INLINE DL_TIMER_REPEAT_MODE | DL_Timer_getCounterRepeatMode (const GPTIMER_Regs *gptimer) |
Get timer repeat counter mode. More... | |
void | DL_Timer_initTimerMode (GPTIMER_Regs *gptimer, const DL_Timer_TimerConfig *config) |
Configure timer in one shot or periodic timer mode Initializes all the common configurable options for the TIMx peripheral when used in Timer mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initCaptureMode (GPTIMER_Regs *gptimer, const DL_Timer_CaptureConfig *config) |
Configure timer in edge count, period capture, edge time or pulse-width capture mode Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initCaptureTriggerMode (GPTIMER_Regs *gptimer, const DL_Timer_CaptureTriggerConfig *config) |
Configure timer in edge count, period capture, edge time or pulse-width capture mode using the trigger as input source Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initCaptureCombinedMode (GPTIMER_Regs *gptimer, const DL_Timer_CaptureCombinedConfig *config) |
Configure timer in combined pulse-width and period capture Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initCompareMode (GPTIMER_Regs *gptimer, const DL_Timer_CompareConfig *config) |
Configure timer in edge count compare mode Initializes all the common configurable options for the TIMx peripheral when used in Compare mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initCompareTriggerMode (GPTIMER_Regs *gptimer, const DL_Timer_CompareTriggerConfig *config) |
Configure timer in edge count compare mode using the trigger as input source Initializes all the common configurable options for the TIMx peripheral when used in Compare mode. Any other custom configuration can be done after calling this API. More... | |
void | DL_Timer_initFourCCPWMMode (GPTIMER_Regs *gptimer, const DL_Timer_PWMConfig *config) |
Configure timer in Pulse Width Modulation Mode Initializes all the common configurable options for the TIMx peripheral when used in PWM mode. Any other custom configuration can be done after calling this API. Configures the top two CC blocks and then configures the bottom two CC blocks. More... | |
__STATIC_INLINE void | DL_Timer_resetCounterMode (GPTIMER_Regs *gptimer) |
Reset register controlling counter operation. More... | |
void | DL_Timer_setCaptureCompareValue (GPTIMER_Regs *gptimer, uint32_t value, DL_TIMER_CC_INDEX ccIndex) |
Sets Timer Capture Compare Value. More... | |
uint32_t | DL_Timer_getCaptureCompareValue (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Get Timer Capture Compare value. More... | |
void | DL_Timer_setCaptureCompareCtl (GPTIMER_Regs *gptimer, uint32_t ccMode, uint32_t ccCondMask, DL_TIMER_CC_INDEX ccIndex) |
Sets Capture Compare Control configuration. More... | |
uint32_t | DL_Timer_getCaptureCompareCtl (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets Capture Compare Control configuration. More... | |
void | DL_Timer_setSecondCompSrcDn (GPTIMER_Regs *gptimer, DL_TIMER_SEC_COMP_DOWN_EVT secCompDn, DL_TIMER_CC_INDEX ccIndex) |
Configures source for second capture compare down event. More... | |
DL_TIMER_SEC_COMP_DOWN_EVT | DL_Timer_getSecondCompSrcDn (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets source for second capture compare down event. More... | |
void | DL_Timer_setSecondCompSrcUp (GPTIMER_Regs *gptimer, DL_TIMER_SEC_COMP_UP_EVT secCompUp, DL_TIMER_CC_INDEX ccIndex) |
Configures source for second capture compare up event. More... | |
DL_TIMER_SEC_COMP_UP_EVT | DL_Timer_getSecondCompSrcUp (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets source for second capture compare down event. More... | |
void | DL_Timer_enableSuppressionOfCompEvent (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Enables suppression of compare event if repeat counter is not equal to zero. More... | |
void | DL_Timer_disableSuppressionOfCompEvent (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Disables suppression of compare event if repeat counter is not equal to zero. More... | |
void | DL_Timer_setCaptCompUpdateMethod (GPTIMER_Regs *gptimer, DL_TIMER_CC_UPDATE_METHOD ccUpdtMode, DL_TIMER_CC_INDEX ccIndex) |
Configures capture compare shadow register update method. More... | |
DL_TIMER_CC_UPDATE_METHOD | DL_Timer_getCaptCompUpdateMethod (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets capture compare shadow register update method. More... | |
void | DL_Timer_setCaptCompActUpdateMethod (GPTIMER_Regs *gptimer, DL_TIMER_CCACT_UPDATE_METHOD ccUpdtMode, DL_TIMER_CC_INDEX ccIndex) |
Configures capture compare action shadow register update method. More... | |
DL_TIMER_CCACT_UPDATE_METHOD | DL_Timer_getCaptCompActUpdateMethod (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets capture compare action shadow register update method. More... | |
void | DL_Timer_setCaptureCompareOutCtl (GPTIMER_Regs *gptimer, uint32_t ccpIV, uint32_t ccpOInv, uint32_t ccpO, DL_TIMER_CC_INDEX ccIndex) |
Sets Capture Compare Output Control. More... | |
uint32_t | DL_Timer_getCaptureCompareOutCtl (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets Capture Compare Output Control. More... | |
void | DL_Timer_setCaptureCompareAction (GPTIMER_Regs *gptimer, uint32_t actionsMask, DL_TIMER_CC_INDEX ccIndex) |
Sets actions of the signal generator. More... | |
uint32_t | DL_Timer_getCaptureCompareAction (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets actions of the signal generator. More... | |
void | DL_Timer_setSecondCompActionDn (GPTIMER_Regs *gptimer, DL_TIMER_SEC_COMP_DOWN_ACT_SEL secCompDnAct, DL_TIMER_CC_INDEX ccIndex) |
Set second comparator down counting timer channel output action. More... | |
DL_TIMER_SEC_COMP_DOWN_ACT_SEL | DL_Timer_getSecondCompActionDn (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets second comparator down counting timer channel output action. More... | |
void | DL_Timer_setSecondCompActionUp (GPTIMER_Regs *gptimer, DL_TIMER_SEC_COMP_UP_ACT_SEL secCompUpAct, DL_TIMER_CC_INDEX ccIndex) |
Sets second comparator up counting timer channel output action. More... | |
DL_TIMER_SEC_COMP_UP_ACT_SEL | DL_Timer_getSecondCompActionUp (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets second comparator up counting timer channel output action. More... | |
void | DL_Timer_overrideCCPOut (GPTIMER_Regs *gptimer, DL_TIMER_FORCE_OUT out, DL_TIMER_FORCE_CMPL_OUT outComp, DL_TIMER_CC_INDEX ccIndex) |
Overrides the timer CCP output. More... | |
void | DL_Timer_setCaptureCompareInput (GPTIMER_Regs *gptimer, uint32_t inv, uint32_t isel, DL_TIMER_CC_INDEX ccIndex) |
Sets Capture Compare Input. More... | |
uint32_t | DL_Timer_getCaptureCompareInput (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets Capture Compare Input. More... | |
void | DL_Timer_setCaptureCompareInputFilter (GPTIMER_Regs *gptimer, uint32_t cpv, uint32_t fp, DL_TIMER_CC_INDEX ccIndex) |
Sets Capture Compare Input Filter. More... | |
uint32_t | DL_Timer_getCaptureCompareInputFilter (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Gets Capture Compare Input Filter. More... | |
void | DL_Timer_enableCaptureCompareInputFilter (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Enables the capture compare input filter. More... | |
void | DL_Timer_disableCaptureCompareInputFilter (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Disables the capture compare input filter. More... | |
bool | DL_Timer_isCaptureCompareInputFilterEnabled (GPTIMER_Regs *gptimer, DL_TIMER_CC_INDEX ccIndex) |
Checks if the capture compare input filter is enabled. More... | |
__STATIC_INLINE void | DL_Timer_setDeadBand (GPTIMER_Regs *gptimer, uint16_t falldelay, uint16_t risedelay, uint32_t mode) |
Sets dead band fall and raise delay. More... | |
__STATIC_INLINE uint16_t | DL_Timer_getDeadBandFallDelay (const GPTIMER_Regs *gptimer) |
Gets dead band fall delay. More... | |
__STATIC_INLINE uint16_t | DL_Timer_getDeadBandRiseDelay (const GPTIMER_Regs *gptimer) |
Gets dead band rise delay. More... | |
__STATIC_INLINE void | DL_Timer_setExternalTriggerEvent (GPTIMER_Regs *gptimer, DL_TIMER_EXT_TRIG_SEL trigSel) |
Set External Trigger Event. More... | |
__STATIC_INLINE DL_TIMER_EXT_TRIG_SEL | DL_Timer_getExternalTriggerEvent (const GPTIMER_Regs *gptimer) |
Gets External Trigger Event. More... | |
__STATIC_INLINE void | DL_Timer_enableExternalTrigger (GPTIMER_Regs *gptimer) |
Enables external trigger. More... | |
__STATIC_INLINE void | DL_Timer_disableExternalTrigger (GPTIMER_Regs *gptimer) |
Disables external trigger. More... | |
__STATIC_INLINE bool | DL_Timer_isExternalTriggerEnabled (const GPTIMER_Regs *gptimer) |
Checks if external trigger is enabled. More... | |
__STATIC_INLINE void | DL_Timer_setRepeatCounter (GPTIMER_Regs *gptimer, uint8_t repeatCount) |
Sets repeat counter value. Repeat counter feature is used to reduce interupt overhead. More... | |
__STATIC_INLINE uint8_t | DL_Timer_getRepeatCounter (const GPTIMER_Regs *gptimer) |
Gets repeat counter value. More... | |
__STATIC_INLINE void | DL_Timer_enablePhaseLoad (GPTIMER_Regs *gptimer) |
Enables phase load. More... | |
__STATIC_INLINE void | DL_Timer_disablePhaseLoad (GPTIMER_Regs *gptimer) |
Disables phase load. More... | |
__STATIC_INLINE bool | DL_Timer_isPhaseLoadEnabled (const GPTIMER_Regs *gptimer) |
Checks if phase load enabled. More... | |
__STATIC_INLINE void | DL_Timer_setPhaseLoadValue (GPTIMER_Regs *gptimer, uint32_t value) |
Sets phase load value. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getPhaseLoadValue (const GPTIMER_Regs *gptimer) |
Gets phase load value. More... | |
__STATIC_INLINE void | DL_Timer_startCounter (GPTIMER_Regs *gptimer) |
Starts Timer Counter. More... | |
__STATIC_INLINE void | DL_Timer_stopCounter (GPTIMER_Regs *gptimer) |
Stops Timer Counter. More... | |
__STATIC_INLINE bool | DL_Timer_isRunning (const GPTIMER_Regs *gptimer) |
Check if timer is actively running. More... | |
__STATIC_INLINE void | DL_Timer_configQEI (GPTIMER_Regs *gptimer, DL_TIMER_QEI_MODE mode, uint32_t invert, DL_TIMER_CC_INDEX ccIndex) |
Configure Quadrature Encoder Interface (QEI) More... | |
void | DL_Timer_configQEIHallInputMode (GPTIMER_Regs *gptimer) |
Configure Hall Input Mode. More... | |
__STATIC_INLINE DL_TIMER_QEI_DIRECTION | DL_Timer_getQEIDirection (const GPTIMER_Regs *gptimer) |
Get direction of Quadrature Encoder Interface (QEI) count. More... | |
__STATIC_INLINE void | DL_Timer_setFaultConfig (GPTIMER_Regs *gptimer, uint32_t faultConfMask) |
Sets Fault Configuration. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getFaultConfig (const GPTIMER_Regs *gptimer) |
Gets Fault Configuration. More... | |
__STATIC_INLINE void | DL_Timer_enableFaultInput (GPTIMER_Regs *gptimer) |
Enables fault input detection. More... | |
__STATIC_INLINE void | DL_Timer_disableFaultInput (GPTIMER_Regs *gptimer) |
Disables fault input detection. More... | |
__STATIC_INLINE bool | DL_Timer_isFaultInputEnabled (const GPTIMER_Regs *gptimer) |
Specifies if fault input is enabled. More... | |
__STATIC_INLINE void | DL_Timer_enableClockFaultDetection (GPTIMER_Regs *gptimer) |
Enables source clock fault detection. More... | |
__STATIC_INLINE void | DL_Timer_disableClockFaultDetection (GPTIMER_Regs *gptimer) |
Disables source clock fault detection. More... | |
__STATIC_INLINE bool | DL_Timer_isClockFaultDetectionEnabled (const GPTIMER_Regs *gptimer) |
Specifies if source clock fault detection is enabled. More... | |
void | DL_Timer_setFaultSourceConfig (GPTIMER_Regs *gptimer, uint32_t source) |
Configures the fault source and and fault input mode. More... | |
uint32_t | DL_Timer_getFaultSourceConfig (const GPTIMER_Regs *gptimer) |
__STATIC_INLINE void | DL_Timer_setFaultInputFilterConfig (GPTIMER_Regs *gptimer, uint32_t filten, uint32_t cpv, uint32_t fp) |
Set Fault Input Filtering Configuration. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getFaultInputFilterConfig (const GPTIMER_Regs *gptimer) |
Get Fault Input Filtering Configuration. More... | |
__STATIC_INLINE void | DL_Timer_configFaultOutputAction (GPTIMER_Regs *gptimer, DL_TIMER_FAULT_ENTRY_CCP faultEntry, DL_TIMER_FAULT_EXIT_CCP faultExit, DL_TIMER_CC_INDEX ccIndex) |
Configures output behavior upon fault entry and exit. More... | |
__STATIC_INLINE void | DL_Timer_configFaultCounter (GPTIMER_Regs *gptimer, DL_TIMER_FAULT_ENTRY_CTR faultEntry, DL_TIMER_FAULT_EXIT_CTR faultExit) |
Configures timer counter behavior upon fault entry and exit. More... | |
__STATIC_INLINE void | DL_Timer_enableInterrupt (GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Enable timer interrupts. More... | |
__STATIC_INLINE void | DL_Timer_disableInterrupt (GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Disable timer interrupts. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getEnabledInterrupts (const GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Check which timer interrupts are enabled. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getEnabledInterruptStatus (const GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Check interrupt flag of enabled timer interrupts. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getRawInterruptStatus (const GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Check interrupt flag of any timer interrupt. More... | |
__STATIC_INLINE DL_TIMER_IIDX | DL_Timer_getPendingInterrupt (const GPTIMER_Regs *gptimer) |
Get highest priority pending timer interrupt. More... | |
__STATIC_INLINE void | DL_Timer_clearInterruptStatus (GPTIMER_Regs *gptimer, uint32_t interruptMask) |
Clear pending timer interrupts. More... | |
__STATIC_INLINE void | DL_Timer_setPublisherChanID (GPTIMER_Regs *gptimer, DL_TIMER_PUBLISHER_INDEX index, uint8_t chanID) |
Sets the event publisher channel id. More... | |
__STATIC_INLINE uint8_t | DL_Timer_getPublisherChanID (GPTIMER_Regs *gptimer, DL_TIMER_PUBLISHER_INDEX index) |
Gets the event publisher channel id. More... | |
__STATIC_INLINE void | DL_Timer_setSubscriberChanID (GPTIMER_Regs *gptimer, DL_TIMER_SUBSCRIBER_INDEX index, uint8_t chanID) |
Sets the event subscriber channel id. More... | |
__STATIC_INLINE uint8_t | DL_Timer_getSubscriberChanID (GPTIMER_Regs *gptimer, DL_TIMER_SUBSCRIBER_INDEX index) |
Gets the event subscriber channel id. More... | |
__STATIC_INLINE void | DL_Timer_enableEvent (GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Enable timer event. More... | |
__STATIC_INLINE void | DL_Timer_disableEvent (GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Disable timer event. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getEnabledEvents (GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Check which timer events are enabled. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getEnabledEventStatus (const GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Check event flag of enabled timer event. More... | |
__STATIC_INLINE uint32_t | DL_Timer_getRawEventsStatus (const GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Check interrupt flag of any timer event. More... | |
__STATIC_INLINE void | DL_Timer_clearEventsStatus (GPTIMER_Regs *gptimer, DL_TIMER_EVENT_ROUTE index, uint32_t eventMask) |
Clear pending timer events. More... | |
bool | DL_Timer_saveConfiguration (const GPTIMER_Regs *gptimer, DL_Timer_backupConfig *ptr) |
Saves Timer configuration before entering STOP or STANDBY mode. Timer must be in IDLE state before calling this API. Timer can be put IDLE state by calling DL_TimerG_stopCounter or DL_Timer_stopCounter. More... | |
bool | DL_Timer_restoreConfiguration (GPTIMER_Regs *gptimer, DL_Timer_backupConfig *ptr, bool restoreCounter) |
Restore Timer configuration after leaving STOP or STANDBY mode. More... | |
__STATIC_INLINE void | DL_Timer_setCoreHaltBehavior (GPTIMER_Regs *gptimer, DL_TIMER_CORE_HALT haltMode) |
Configures timer behavior when the core is halted. More... | |
__STATIC_INLINE DL_TIMER_CORE_HALT | DL_Timer_getCoreHaltBehavior (const GPTIMER_Regs *gptimer) |
Get timer behavior when the core is halted. More... | |
GPTimer module has different variations and have been defined as TimerG and TimerA. This file contains APIs which are common between different variations.
It is not recommended to include this header file in the application. In order to access TimerG and TimerA functionality include to appropriate timer header file at the application level. Accessing the functionality via the corresponding header file will allow user to determine the functionality supported by the each Timer variant.
To access TimerG functionality:
To access TimerA functionality:
enum DL_TIMER_CLOCK |
enum DL_TIMER_CCP_DIS_OUT |
enum DL_TIMER_CC_INDEX |
enum DL_TIMER_TIMER_MODE |
enum DL_TIMER_COUNT_MODE |
enum DL_TIMER |
enum DL_TIMER_INTERM_INT |
enum DL_TIMER_PWM_MODE |
enum DL_TIMER_IIDX |
enum DL_TIMER_EVENT_ROUTE |
enum DL_TIMER_INPUT_CHAN |
enum DL_TIMER_DEBUG_RES |
enum DL_TIMER_CZC |
enum DL_TIMER_CAC |
enum DL_TIMER_CLC |
enum DL_TIMER_REPEAT_MODE |
enum DL_TIMER_FORCE_OUT |
enum DL_TIMER_CORE_HALT |
enum DL_TIMER_QEI_MODE |
__STATIC_INLINE void DL_Timer_enablePower | ( | GPTIMER_Regs * | gptimer | ) |
Enables the Peripheral Write Enable (PWREN) register for the timer.
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.
gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disablePower | ( | GPTIMER_Regs * | gptimer | ) |
Disables the Peripheral Write Enable (PWREN) register for the timer.
When the PWREN.ENABLE bit is cleared, the peripheral's registers are not accessible for read/write operations.
gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isPowerEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Returns if the Peripheral Write Enable (PWREN) register for the timer 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.
gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_reset | ( | GPTIMER_Regs * | gptimer | ) |
Resets timer peripheral.
gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isReset | ( | const GPTIMER_Regs * | gptimer | ) |
Returns if timer peripheral has been reset.
gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCCPDirection | ( | GPTIMER_Regs * | gptimer, |
uint32_t | ccpConfig | ||
) |
Sets CCP Direction.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccpConfig | Direction configuration for CCP as input or output. Bitwise OR of DL_TIMER_CCx |
__STATIC_INLINE uint32_t DL_Timer_getCCPDirection | ( | const GPTIMER_Regs * | gptimer | ) |
Gets CCP Direction.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCCPOutputDisabled | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CCP_DIS_OUT | ccp0Config, | ||
DL_TIMER_CCP_DIS_OUT | ccp1Config | ||
) |
Forces the output of the timer low via the ODIS register. This can be useful during shutdown or configuring the timer. The output pin still passes through the inversion (INV) bit. See figure "Output connection for TIMG" in Technical Reference Manual (TRM) for diagram. DL_Timer_overrideCCPOut() can be used for for similar functionality, where independent overrride settings for the output and complementary output channels can be configured.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccp0Config | Output Configuration for CCP0. One of DL_TIMER_CCP_DIS_OUT |
[in] | ccp1Config | Output Configuration for CCP1. One of DL_TIMER_CCP_DIS_OUT |
References DL_Common_updateReg().
__STATIC_INLINE void DL_Timer_setCCPOutputDisabledAdv | ( | GPTIMER_Regs * | gptimer, |
uint32_t | ccpOdisConfig | ||
) |
Sets CCP Output configuration for timer instances with more than two CCP channels via the ODIS register. The output pin still passes through the inversion (INV) bit.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccpOdisConfig | Output Configuration for CCP channels. Bitwise OR DL_TIMER_CCP0_DIS_OUT_ADV, DL_TIMER_CCP1_DIS_OUT_ADV, DL_TIMER_CCP2_DIS_OUT_ADV, DL_TIMER_CCP3_DIS_OUT_ADV |
References DL_Common_updateReg(), DL_Timer_getClockConfig(), and DL_Timer_setClockConfig().
void DL_Timer_setClockConfig | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_ClockConfig * | config | ||
) |
Configure timer source clock.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the clock configuration struct DL_Timer_ClockConfig. |
Referenced by DL_Timer_setCCPOutputDisabledAdv().
void DL_Timer_getClockConfig | ( | const GPTIMER_Regs * | gptimer, |
DL_Timer_ClockConfig * | config | ||
) |
Get timer source clock configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the clock configuration struct DL_Timer_ClockConfig. |
Referenced by DL_Timer_setCCPOutputDisabledAdv().
__STATIC_INLINE void DL_Timer_enableClock | ( | GPTIMER_Regs * | gptimer | ) |
Enable timer clock.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableClock | ( | GPTIMER_Regs * | gptimer | ) |
Disable timer clock.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isClockEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Returns if timer clock is disabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_configCrossTrigger | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CROSS_TRIG_SRC | ctSource, | ||
DL_TIMER_CROSS_TRIGGER_INPUT | enInTrigCond, | ||
DL_TIMER_CROSS_TRIGGER_MODE | enCrossTrig | ||
) |
Configure Cross Timer Trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ctSource | Selects cross trigger source. DL_TIMER_CROSS_TRIG_SRC |
[in] | enInTrigCond | Cofigures Input Trigger Conditions to the Timer module as a condition for Cross Triggers * DL_TIMER_CROSS_TRIGGER_INPUT |
[in] | enCrossTrig | Configures Timer Cross trigger DL_TIMER_CROSS_TRIGGER_MODE |
__STATIC_INLINE void DL_Timer_configCrossTriggerSrc | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CROSS_TRIG_SRC | ctSource | ||
) |
Configure Cross Timer Trigger source.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ctSource | Selects cross trigger source. DL_TIMER_CROSS_TRIG_SRC |
References DL_Common_updateReg().
__STATIC_INLINE void DL_Timer_configCrossTriggerInputCond | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CROSS_TRIGGER_INPUT | enInTrigCond | ||
) |
Enables/DIsables Input Trigger condition for Cross Timer Trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | enInTrigCond | Cofigures Input Trigger Conditions to the Timer module as a condition for Cross Triggers DL_TIMER_CROSS_TRIGGER_INPUT |
References DL_Common_updateReg().
__STATIC_INLINE void DL_Timer_configCrossTriggerEnable | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CROSS_TRIGGER_MODE | enCrossTrig | ||
) |
Enable/Disable Cross Timer Trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | enCrossTrig | Configures Timer Cross trigger DL_TIMER_CROSS_TRIGGER_MODE |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_Timer_getCrossTriggerConfig | ( | const GPTIMER_Regs * | gptimer | ) |
Get Cross Timer Trigger configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_TIMER_CROSS_TRIG_SRC DL_Timer_getCrossTriggerSrc | ( | const GPTIMER_Regs * | gptimer | ) |
Get Cross Timer Trigger source.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_TIMER_CROSS_TRIGGER_INPUT DL_Timer_getCrossTriggerInputCond | ( | const GPTIMER_Regs * | gptimer | ) |
Get Input Trigger condition for Cross Timer Trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_TIMER_CROSS_TRIGGER_MODE DL_Timer_getCrossTriggerEnable | ( | const GPTIMER_Regs * | gptimer | ) |
Checks if Cross Timer Trigger is enabled or disabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_generateCrossTrigger | ( | GPTIMER_Regs * | gptimer | ) |
Generates a synchronized trigger condition across all trigger enabled Timer instances.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_enableShadowFeatures | ( | GPTIMER_Regs * | gptimer | ) |
Enable shadow to activate load of buffered registers and register fields.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableShadowFeatures | ( | GPTIMER_Regs * | gptimer | ) |
Disable shadow to activate load of buffered registers and register fields.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setLoadValue | ( | GPTIMER_Regs * | gptimer, |
uint32_t | value | ||
) |
Sets timer LOAD register value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | value | Value to be loaded to timer LOAD register. Refer to the device datasheet to determine the bit width of the counter for the selected Timer instance. |
__STATIC_INLINE uint32_t DL_Timer_getLoadValue | ( | const GPTIMER_Regs * | gptimer | ) |
Gets the timer LOAD register value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE uint32_t DL_Timer_getTimerCount | ( | const GPTIMER_Regs * | gptimer | ) |
Gets the current counter value of the timer.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setTimerCount | ( | GPTIMER_Regs * | gptimer, |
uint32_t | value | ||
) |
Set timer counter value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | value | Value to set the timer counter value to |
__STATIC_INLINE void DL_Timer_enableLZEventSuppression | ( | GPTIMER_Regs * | gptimer | ) |
Enable suppression of load and zero events.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableLZEventSuppression | ( | GPTIMER_Regs * | gptimer | ) |
Disable suppression of load and zero events.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isLZEventSuppressionEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Checks if suppression of load and zero events is enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
true | suppression of load and zero events is enabled |
false | suppression of load and zero events is disabled |
__STATIC_INLINE void DL_Timer_setDebugReleaseBehavior | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_DEBUG_RES | debResB | ||
) |
Configures timer behavior during debug release/exit.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | debResB | Specifies timer behavior upon relase/exit of debug mode. DL_TIMER_DEBUG_RES |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_DEBUG_RES DL_Timer_getDebugReleaseBehavior | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer resume behavior after relase/exit of debug mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCounterControl | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CZC | zeroCtl, | ||
DL_TIMER_CAC | advCtl, | ||
DL_TIMER_CLC | loadCtl | ||
) |
Configure timer counter control operation.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | zeroCtl | Specifies event which zeroes the counter value. DL_TIMER_CZC |
[in] | advCtl | Specifies event which increments or decrements the counter value. DL_TIMER_CAC |
[in] | loadCtl | Specifies event which sets counter value with LD register value. DL_TIMER_CLC |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_CZC DL_Timer_getCounterZeroControl | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer counter zero control operation.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_TIMER_CAC DL_Timer_getCounterAdvanceControl | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer counter advance control operation.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE DL_TIMER_CLC DL_Timer_getCounterLoadControl | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer counter load control operation.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCounterMode | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_COUNT_MODE | countMode | ||
) |
Configure timer counter couting mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | countMode | Specifies timer counter couting mode. DL_TIMER_COUNT_MODE |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_COUNT_MODE DL_Timer_getCounterMode | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer counter couting mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCounterValueAfterEnable | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_COUNT_AFTER_EN | cvae | ||
) |
Configures counter value after enable.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | cvae | Speficies counter value after enable. DL_TIMER_COUNT_AFTER_EN |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_COUNT_AFTER_EN DL_Timer_getCounterValueAfterEnable | ( | const GPTIMER_Regs * | gptimer | ) |
Returns counter value after enable cofiguration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setCounterRepeatMode | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_REPEAT_MODE | repeatMode | ||
) |
Configure timer repeat counter mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | repeatMode | Specifies timer repeat counter mode DL_TIMER_REPEAT_MODE |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_REPEAT_MODE DL_Timer_getCounterRepeatMode | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer repeat counter mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
References DL_Timer_initCaptureCombinedMode(), DL_Timer_initCaptureMode(), DL_Timer_initCaptureTriggerMode(), DL_Timer_initCompareMode(), DL_Timer_initCompareTriggerMode(), DL_Timer_initFourCCPWMMode(), and DL_Timer_initTimerMode().
void DL_Timer_initTimerMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_TimerConfig * | config | ||
) |
Configure timer in one shot or periodic timer mode Initializes all the common configurable options for the TIMx peripheral when used in Timer mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_TimerConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initCaptureMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_CaptureConfig * | config | ||
) |
Configure timer in edge count, period capture, edge time or pulse-width capture mode Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_CaptureConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initCaptureTriggerMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_CaptureTriggerConfig * | config | ||
) |
Configure timer in edge count, period capture, edge time or pulse-width capture mode using the trigger as input source Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_CaptureTriggerConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initCaptureCombinedMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_CaptureCombinedConfig * | config | ||
) |
Configure timer in combined pulse-width and period capture Initializes all the common configurable options for the TIMx peripheral when used in Capture mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_CaptureCombinedConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initCompareMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_CompareConfig * | config | ||
) |
Configure timer in edge count compare mode Initializes all the common configurable options for the TIMx peripheral when used in Compare mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_CompareConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initCompareTriggerMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_CompareTriggerConfig * | config | ||
) |
Configure timer in edge count compare mode using the trigger as input source Initializes all the common configurable options for the TIMx peripheral when used in Compare mode. Any other custom configuration can be done after calling this API.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | config | Pointer to the mode configuration struct DL_Timer_CompareTriggerConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
void DL_Timer_initFourCCPWMMode | ( | GPTIMER_Regs * | gptimer, |
const DL_Timer_PWMConfig * | config | ||
) |
Configure timer in Pulse Width Modulation Mode Initializes all the common configurable options for the TIMx peripheral when used in PWM mode. Any other custom configuration can be done after calling this API. Configures the top two CC blocks and then configures the bottom two CC blocks.
gptimer | Pointer to the register overlay for the peripheral |
config | Pointer to the mode configuration struct DL_Timer_PWMConfig. |
Referenced by DL_Timer_getCounterRepeatMode().
__STATIC_INLINE void DL_Timer_resetCounterMode | ( | GPTIMER_Regs * | gptimer | ) |
Reset register controlling counter operation.
[in] | gptimer | Pointer to the register overlay for the peripheral |
References DL_Timer_disableCaptureCompareInputFilter(), DL_Timer_disableSuppressionOfCompEvent(), DL_Timer_enableCaptureCompareInputFilter(), DL_Timer_enableSuppressionOfCompEvent(), DL_Timer_getCaptCompActUpdateMethod(), DL_Timer_getCaptCompUpdateMethod(), DL_Timer_getCaptureCompareAction(), DL_Timer_getCaptureCompareCtl(), DL_Timer_getCaptureCompareInput(), DL_Timer_getCaptureCompareInputFilter(), DL_Timer_getCaptureCompareOutCtl(), DL_Timer_getCaptureCompareValue(), DL_Timer_getSecondCompActionDn(), DL_Timer_getSecondCompActionUp(), DL_Timer_getSecondCompSrcDn(), DL_Timer_getSecondCompSrcUp(), DL_Timer_isCaptureCompareInputFilterEnabled(), DL_Timer_overrideCCPOut(), DL_Timer_setCaptCompActUpdateMethod(), DL_Timer_setCaptCompUpdateMethod(), DL_Timer_setCaptureCompareAction(), DL_Timer_setCaptureCompareCtl(), DL_Timer_setCaptureCompareInput(), DL_Timer_setCaptureCompareInputFilter(), DL_Timer_setCaptureCompareOutCtl(), DL_Timer_setCaptureCompareValue(), DL_Timer_setSecondCompActionDn(), DL_Timer_setSecondCompActionUp(), DL_Timer_setSecondCompSrcDn(), and DL_Timer_setSecondCompSrcUp().
void DL_Timer_setCaptureCompareValue | ( | GPTIMER_Regs * | gptimer, |
uint32_t | value, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets Timer Capture Compare Value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | value | Value to write to capture compare register |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareValue | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Get Timer Capture Compare value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptureCompareCtl | ( | GPTIMER_Regs * | gptimer, |
uint32_t | ccMode, | ||
uint32_t | ccCondMask, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets Capture Compare Control configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccMode | Specifies whether the CC register is used as a capture register or a compare register DL_TIMER_CC_MODE |
[in] | ccCondMask | Specifies zero, load, advance and capture conditions. Bitwise OR of DL_TIMER_CC_ZCOND, DL_TIMER_CC_LCOND, DL_TIMER_CC_ACOND, DL_TIMER_CC_CCOND |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareCtl | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets Capture Compare Control configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setSecondCompSrcDn | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SEC_COMP_DOWN_EVT | secCompDn, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configures source for second capture compare down event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | secCompDn | Specifies second capture compare down event source. DL_TIMER_SEC_COMP_DOWN_EVT |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_SEC_COMP_DOWN_EVT DL_Timer_getSecondCompSrcDn | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets source for second capture compare down event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setSecondCompSrcUp | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SEC_COMP_UP_EVT | secCompUp, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configures source for second capture compare up event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | secCompUp | Specifies second capture compare up event source. DL_TIMER_SEC_COMP_UP_EVT |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_SEC_COMP_UP_EVT DL_Timer_getSecondCompSrcUp | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets source for second capture compare down event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_enableSuppressionOfCompEvent | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Enables suppression of compare event if repeat counter is not equal to zero.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_disableSuppressionOfCompEvent | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Disables suppression of compare event if repeat counter is not equal to zero.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptCompUpdateMethod | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_UPDATE_METHOD | ccUpdtMode, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configures capture compare shadow register update method.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccUpdtMode | Specifies capture compare shadow register update method. DL_TIMER_CC_UPDATE_METHOD |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_CC_UPDATE_METHOD DL_Timer_getCaptCompUpdateMethod | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets capture compare shadow register update method.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptCompActUpdateMethod | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CCACT_UPDATE_METHOD | ccUpdtMode, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configures capture compare action shadow register update method.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccUpdtMode | Specifies capture compare action shadow register update method. DL_TIMER_CCACT_UPDATE_METHOD |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_CCACT_UPDATE_METHOD DL_Timer_getCaptCompActUpdateMethod | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets capture compare action shadow register update method.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare action register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptureCompareOutCtl | ( | GPTIMER_Regs * | gptimer, |
uint32_t | ccpIV, | ||
uint32_t | ccpOInv, | ||
uint32_t | ccpO, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets Capture Compare Output Control.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccpIV | Specifies the logical value put on the CCP output while the output is disabled DL_TIMER_CC_OCTL_INIT_VAL |
[in] | ccpOInv | Specifies if the he output as selected by ccpo is inverted. DL_TIMER_CC_OCTL_INV_OUT |
[in] | ccpO | CCP Output Source DL_TIMER_CC_OCTL_SRC |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareOutCtl | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets Capture Compare Output Control.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptureCompareAction | ( | GPTIMER_Regs * | gptimer, |
uint32_t | actionsMask, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets actions of the signal generator.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | actionsMask | Bit mask of signal generator actions. Bitwise OR of DL_TIMER_CC_SWFRCACT_CMPL, DL_TIMER_CC_SWFRCACT, DL_TIMER_CC_CC2UACT, DL_TIMER_CC_CC2DACT, DL_TIMER_CC_FEXACT, DL_TIMER_CC_FENACT, DL_TIMER_CC_CUACT, DL_TIMER_CC_CDACT, DL_TIMER_CC_LACT, DL_TIMER_CC_ZACT, |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareAction | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets actions of the signal generator.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setSecondCompActionDn | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SEC_COMP_DOWN_ACT_SEL | secCompDnAct, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Set second comparator down counting timer channel output action.
The timer channel output will be set to selected DL_TIMER_SEC_COMP_DOWN_ACT_SEL when the timer counter reaches the configured capture compare value configure by
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | secCompDnAct | One of DL_TIMER_SEC_COMP_DOWN_ACT_SEL. |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_SEC_COMP_DOWN_ACT_SEL DL_Timer_getSecondCompActionDn | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets second comparator down counting timer channel output action.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setSecondCompActionUp | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SEC_COMP_UP_ACT_SEL | secCompUpAct, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets second comparator up counting timer channel output action.
The timer channel output will be set to selected DL_TIMER_SEC_COMP_UP_ACT_SEL when the timer counter reaches the configured capture compare value configure by
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | secCompUpAct | One of DL_TIMER_SEC_COMP_UP_ACT_SEL. |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
DL_TIMER_SEC_COMP_UP_ACT_SEL DL_Timer_getSecondCompActionUp | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets second comparator up counting timer channel output action.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_overrideCCPOut | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_FORCE_OUT | out, | ||
DL_TIMER_FORCE_CMPL_OUT | outComp, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Overrides the timer CCP output.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | out | Specifies the CCP output state. DL_TIMER_FORCE_OUT |
[in] | outComp | If timer insatance supports complementary output, it allows to override complementary out also. If timer instance doesn't support complementary output, this parameter is ignored. DL_TIMER_FORCE_CMPL_OUT |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptureCompareInput | ( | GPTIMER_Regs * | gptimer, |
uint32_t | inv, | ||
uint32_t | isel, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets Capture Compare Input.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | inv | Specifies whether the selected input is inverted. DL_TIMER_CC_INPUT_INV |
[in] | isel | Selects the input source to the filter input. DL_TIMER_CC_IN_SEL |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareInput | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets Capture Compare Input.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_setCaptureCompareInputFilter | ( | GPTIMER_Regs * | gptimer, |
uint32_t | cpv, | ||
uint32_t | fp, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Sets Capture Compare Input Filter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | cpv | Specifies fitering mode. DL_TIMER_CC_INPUT_FILT_CPV |
[in] | fp | Specifies the filter period. DL_TIMER_CC_INPUT_FILT_FP |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
uint32_t DL_Timer_getCaptureCompareInputFilter | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Gets Capture Compare Input Filter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_enableCaptureCompareInputFilter | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Enables the capture compare input filter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
void DL_Timer_disableCaptureCompareInputFilter | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Disables the capture compare input filter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
Referenced by DL_Timer_resetCounterMode().
bool DL_Timer_isCaptureCompareInputFilterEnabled | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Checks if the capture compare input filter is enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
true | capture compare input filter is enabled |
false | capture compare input filter is disabled |
Referenced by DL_Timer_resetCounterMode().
__STATIC_INLINE void DL_Timer_setDeadBand | ( | GPTIMER_Regs * | gptimer, |
uint16_t | falldelay, | ||
uint16_t | risedelay, | ||
uint32_t | mode | ||
) |
Sets dead band fall and raise delay.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | falldelay | The number of TIMCLK periods inserted between the fall of CCPi and the rise of CCPBo. Valid range [0- 4095] |
[in] | risedelay | The number of TIMCLK periods inserted between the fall of CCPi and the rise of CCPAo. Valid range [0- 4095]. |
[in] | mode | Specifies the dead band insertion mode. One of DL_TIMER_DEAD_BAND_MODE |
__STATIC_INLINE uint16_t DL_Timer_getDeadBandFallDelay | ( | const GPTIMER_Regs * | gptimer | ) |
Gets dead band fall delay.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE uint16_t DL_Timer_getDeadBandRiseDelay | ( | const GPTIMER_Regs * | gptimer | ) |
Gets dead band rise delay.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_setExternalTriggerEvent | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_EXT_TRIG_SEL | trigSel | ||
) |
Set External Trigger Event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | trigSel | External Trigger Select DL_TIMER_EXT_TRIG_SEL |
References DL_Common_updateReg().
__STATIC_INLINE DL_TIMER_EXT_TRIG_SEL DL_Timer_getExternalTriggerEvent | ( | const GPTIMER_Regs * | gptimer | ) |
Gets External Trigger Event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_enableExternalTrigger | ( | GPTIMER_Regs * | gptimer | ) |
Enables external trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableExternalTrigger | ( | GPTIMER_Regs * | gptimer | ) |
Disables external trigger.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isExternalTriggerEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Checks if external trigger is enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
true | external trigger is enabled |
false | external trigger is disabled |
__STATIC_INLINE void DL_Timer_setRepeatCounter | ( | GPTIMER_Regs * | gptimer, |
uint8_t | repeatCount | ||
) |
Sets repeat counter value. Repeat counter feature is used to reduce interupt overhead.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | repeatCount | Specifies repeat counter value |
__STATIC_INLINE uint8_t DL_Timer_getRepeatCounter | ( | const GPTIMER_Regs * | gptimer | ) |
Gets repeat counter value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_enablePhaseLoad | ( | GPTIMER_Regs * | gptimer | ) |
Enables phase load.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disablePhaseLoad | ( | GPTIMER_Regs * | gptimer | ) |
Disables phase load.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isPhaseLoadEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Checks if phase load enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
true | phase load is enabled |
false | phase load is disabled |
__STATIC_INLINE void DL_Timer_setPhaseLoadValue | ( | GPTIMER_Regs * | gptimer, |
uint32_t | value | ||
) |
Sets phase load value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | value | Phase load value |
__STATIC_INLINE uint32_t DL_Timer_getPhaseLoadValue | ( | const GPTIMER_Regs * | gptimer | ) |
Gets phase load value.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_startCounter | ( | GPTIMER_Regs * | gptimer | ) |
Starts Timer Counter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_stopCounter | ( | GPTIMER_Regs * | gptimer | ) |
Stops Timer Counter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isRunning | ( | const GPTIMER_Regs * | gptimer | ) |
Check if timer is actively running.
[in] | gptimer | Pointer to the register overlay for the peripheral |
true | Timer is running |
false | Timer is not running |
__STATIC_INLINE void DL_Timer_configQEI | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_QEI_MODE | mode, | ||
uint32_t | invert, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configure Quadrature Encoder Interface (QEI)
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | mode | Choose QEI input mode. One of DL_TIMER_QEI_MODE |
[in] | invert | Control whether selected input is inverted. One of DL_TIMER_CC_INPUT_INV |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
References DL_Timer_configQEIHallInputMode().
void DL_Timer_configQEIHallInputMode | ( | GPTIMER_Regs * | gptimer | ) |
Configure Hall Input Mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
Referenced by DL_Timer_configQEI().
__STATIC_INLINE DL_TIMER_QEI_DIRECTION DL_Timer_getQEIDirection | ( | const GPTIMER_Regs * | gptimer | ) |
Get direction of Quadrature Encoder Interface (QEI) count.
[in] | gptimer | Pointer to the register overlay for the peripheral |
One | of DL_TIMER_QEI_DIRECTION values |
__STATIC_INLINE void DL_Timer_setFaultConfig | ( | GPTIMER_Regs * | gptimer, |
uint32_t | faultConfMask | ||
) |
Sets Fault Configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | faultConfMask | Specifies faults configuration. Bitwise OR of DL_TIMER_FAULT_CONFIG_TFIM, DL_TIMER_FAULT_CONFIG_FL, DL_TIMER_FAULT_CONFIG_FI, DL_TIMER_FAULT_CONFIG_FIEN |
References DL_Common_updateReg().
__STATIC_INLINE uint32_t DL_Timer_getFaultConfig | ( | const GPTIMER_Regs * | gptimer | ) |
Gets Fault Configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_enableFaultInput | ( | GPTIMER_Regs * | gptimer | ) |
Enables fault input detection.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableFaultInput | ( | GPTIMER_Regs * | gptimer | ) |
Disables fault input detection.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isFaultInputEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Specifies if fault input is enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_enableClockFaultDetection | ( | GPTIMER_Regs * | gptimer | ) |
Enables source clock fault detection.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_disableClockFaultDetection | ( | GPTIMER_Regs * | gptimer | ) |
Disables source clock fault detection.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_Timer_isClockFaultDetectionEnabled | ( | const GPTIMER_Regs * | gptimer | ) |
Specifies if source clock fault detection is enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
References DL_Timer_getFaultSourceConfig(), and DL_Timer_setFaultSourceConfig().
void DL_Timer_setFaultSourceConfig | ( | GPTIMER_Regs * | gptimer, |
uint32_t | source | ||
) |
Configures the fault source and and fault input mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | source | Selects fault source and and fault input mode. One of DL_TIMER_FAULT_SOURCE. |
Referenced by DL_Timer_isClockFaultDetectionEnabled().
uint32_t DL_Timer_getFaultSourceConfig | ( | const GPTIMER_Regs * | gptimer | ) |
[in] | gptimer | Pointer to the register overlay for the peripheral |
Referenced by DL_Timer_isClockFaultDetectionEnabled().
__STATIC_INLINE void DL_Timer_setFaultInputFilterConfig | ( | GPTIMER_Regs * | gptimer, |
uint32_t | filten, | ||
uint32_t | cpv, | ||
uint32_t | fp | ||
) |
Set Fault Input Filtering Configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | filten | Specifies input is filter mode DL_TIMER_FAULT_FILT |
[in] | cpv | Specifies input filter type DL_TIMER_FAULT_FILTER_CPV |
[in] | fp | Specifies sample period for the input filter DL_TIMER_FAULT_FILTER_FP |
__STATIC_INLINE uint32_t DL_Timer_getFaultInputFilterConfig | ( | const GPTIMER_Regs * | gptimer | ) |
Get Fault Input Filtering Configuration.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_configFaultOutputAction | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_FAULT_ENTRY_CCP | faultEntry, | ||
DL_TIMER_FAULT_EXIT_CCP | faultExit, | ||
DL_TIMER_CC_INDEX | ccIndex | ||
) |
Configures output behavior upon fault entry and exit.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | faultEntry | Specifies the fault entry behavior. One of DL_TIMER_FAULT_ENTRY_CCP |
[in] | faultExit | Specifies the fault exit behavior. One of DL_TIMER_FAULT_EXIT_CCP |
[in] | ccIndex | Index associated to capture compare register DL_TIMER_CC_INDEX. |
References DL_Common_updateReg().
__STATIC_INLINE void DL_Timer_configFaultCounter | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_FAULT_ENTRY_CTR | faultEntry, | ||
DL_TIMER_FAULT_EXIT_CTR | faultExit | ||
) |
Configures timer counter behavior upon fault entry and exit.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | faultEntry | Specifies the fault entry behavior. One of DL_TIMER_FAULT_ENTRY_CTR |
[in] | faultExit | Specifies the fault exit behavior. One of DL_TIMER_FAULT_EXIT_CTR |
References DL_Common_updateReg().
__STATIC_INLINE void DL_Timer_enableInterrupt | ( | GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Enable timer interrupts.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to enable. Bitwise OR of DL_TIMER_INTERRUPT. |
__STATIC_INLINE void DL_Timer_disableInterrupt | ( | GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Disable timer interrupts.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to enable. Bitwise OR of DL_TIMER_INTERRUPT. |
__STATIC_INLINE uint32_t DL_Timer_getEnabledInterrupts | ( | const GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Check which timer interrupts are enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_INTERRUPT. |
Bitwise | OR of DL_TIMER_INTERRUPT values |
__STATIC_INLINE uint32_t DL_Timer_getEnabledInterruptStatus | ( | const GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Check interrupt flag of enabled timer interrupts.
Checks if any of the timer interrupts that were previously enabled are pending.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_INTERRUPT. |
Bitwise | OR of DL_TIMER_INTERRUPT values |
__STATIC_INLINE uint32_t DL_Timer_getRawInterruptStatus | ( | const GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Check interrupt flag of any timer interrupt.
Checks if any of the timer interrupts are pending. Interrupts do not have to be previously enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_INTERRUPT. |
Bitwise | OR of DL_TIMER_INTERRUPT values |
__STATIC_INLINE DL_TIMER_IIDX DL_Timer_getPendingInterrupt | ( | const GPTIMER_Regs * | gptimer | ) |
Get highest priority pending timer interrupt.
Checks if any of the timer interrupts are pending. Interrupts do not have to be previously enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_Timer_clearInterruptStatus | ( | GPTIMER_Regs * | gptimer, |
uint32_t | interruptMask | ||
) |
Clear pending timer interrupts.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | interruptMask | Bit mask of interrupts to clear. Bitwise OR of DL_TIMER_INTERRUPT. |
__STATIC_INLINE void DL_Timer_setPublisherChanID | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_PUBLISHER_INDEX | index, | ||
uint8_t | chanID | ||
) |
Sets the event publisher channel id.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | chanID | Channel ID number. Valid range 0-15. If ChanID == 0 publisher is disconnected. |
__STATIC_INLINE uint8_t DL_Timer_getPublisherChanID | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_PUBLISHER_INDEX | index | ||
) |
Gets the event publisher channel id.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
__STATIC_INLINE void DL_Timer_setSubscriberChanID | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SUBSCRIBER_INDEX | index, | ||
uint8_t | chanID | ||
) |
Sets the event subscriber channel id.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | chanID | Channel ID number. Valid range 0-15. If ChanID == 0 subscriber is disconnected. |
__STATIC_INLINE uint8_t DL_Timer_getSubscriberChanID | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_SUBSCRIBER_INDEX | index | ||
) |
Gets the event subscriber channel id.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
__STATIC_INLINE void DL_Timer_enableEvent | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Enable timer event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to enable. Bitwise OR of DL_TIMER_EVENT. |
__STATIC_INLINE void DL_Timer_disableEvent | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Disable timer event.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to enable. Bitwise OR of DL_TIMER_EVENT. |
__STATIC_INLINE uint32_t DL_Timer_getEnabledEvents | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Check which timer events are enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_EVENT. |
Bitwise | OR of DL_TIMER_EVENT values |
__STATIC_INLINE uint32_t DL_Timer_getEnabledEventStatus | ( | const GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Check event flag of enabled timer event.
Checks if any of the timer events that were previously enabled are pending.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_EVENT. |
Bitwise | OR of DL_TIMER_EVENT values |
__STATIC_INLINE uint32_t DL_Timer_getRawEventsStatus | ( | const GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Check interrupt flag of any timer event.
Checks if any events are pending. Events do not have to be previously enabled.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to check. Bitwise OR of DL_TIMER_EVENT. |
Bitwise | OR of DL_TIMER_EVENT values |
__STATIC_INLINE void DL_Timer_clearEventsStatus | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_EVENT_ROUTE | index, | ||
uint32_t | eventMask | ||
) |
Clear pending timer events.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | index | Specifies the register event index to be configured |
[in] | eventMask | Bit mask of interrupts to clear. Bitwise OR of DL_TIMER_EVENT. |
References DL_Timer_restoreConfiguration(), and DL_Timer_saveConfiguration().
bool DL_Timer_saveConfiguration | ( | const GPTIMER_Regs * | gptimer, |
DL_Timer_backupConfig * | ptr | ||
) |
Saves Timer configuration before entering STOP or STANDBY mode. Timer must be in IDLE state before calling this API. Timer can be put IDLE state by calling DL_TimerG_stopCounter or DL_Timer_stopCounter.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ptr | Configuration backup setup structure. See DL_Timer_backupConfig. |
FALSE | if a configuration already exists in ptr (will not be overwritten). TRUE if a configuration was successfully saved |
Referenced by DL_Timer_clearEventsStatus().
bool DL_Timer_restoreConfiguration | ( | GPTIMER_Regs * | gptimer, |
DL_Timer_backupConfig * | ptr, | ||
bool | restoreCounter | ||
) |
Restore Timer configuration after leaving STOP or STANDBY mode.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | ptr | Configuration backup setup structure. See DL_Timer_backupConfig. |
[in] | restoreCounter | If true timer counter value is also restored (e.g. resume counts of edge counts). If false timer counter is not restored. |
FALSE | if a configuration does not exist in ptr (will not be loaded). TRUE if a configuration successfully loaded |
Referenced by DL_Timer_clearEventsStatus().
__STATIC_INLINE void DL_Timer_setCoreHaltBehavior | ( | GPTIMER_Regs * | gptimer, |
DL_TIMER_CORE_HALT | haltMode | ||
) |
Configures timer behavior when the core is halted.
[in] | gptimer | Pointer to the register overlay for the peripheral |
[in] | haltMode | Timer halt behavior. One of DL_TIMER_CORE_HALT. |
__STATIC_INLINE DL_TIMER_CORE_HALT DL_Timer_getCoreHaltBehavior | ( | const GPTIMER_Regs * | gptimer | ) |
Get timer behavior when the core is halted.
[in] | gptimer | Pointer to the register overlay for the peripheral |