42#include "../interrupt.h"
82 while((DMTSTAT & 0x0001) != 0x0001)
93 if((DMTSTAT & 0x0001) == 0x0001)
108 uint32_t counter = 0;
109 counter = (uint32_t)(DMTPSCNTH & 0x0000FFFF) << 16;
110 return (counter | DMTPSCNTL);
115 uint32_t winTimeoutCounter = 0;
116 winTimeoutCounter = (uint32_t)(DMTPSINTVH & 0x0000FFFF) << 16;
117 return (winTimeoutCounter | DMTPSINTVL);
123 status = (uint16_t)(DMTSTAT & 0xE1);
129 uint32_t counter = 0;
130 counter = (uint32_t)(DMTCNTH & 0x0000FFFF) << 16;
131 return (counter | DMTCNTL);
152 (*DMT_EventHandler)();
uint16_t DMT_StatusGet(void)
Gets the DMT status.
void DMT_EventCallback(void)
This is the default callback with weak attribute. The user can override and implement the default cal...
void DMT_Initialize(void)
Initializes the DMT module.
void DMT_PreClear(void)
Writes the PreClear Pattern for DMTPRECLR register.
bool DMT_IsPreCleared(void)
Checks for the PreClear sequence was initiated and done before the Clear sequence is done.
bool DMT_IsWindowOpen(void)
Returns the Window Open status.
void DMT_EventCallbackRegister(void(*handler)(void))
This function can be used to override default callback and to define custom callback for DMT Event ev...
uint32_t DMT_WindowTimeoutCounterGet(void)
Reads the DMT Window Interval Counter.
uint32_t DMT_CounterGet(void)
Returns the current counter value.
void DMT_Enable(void)
Enables the DMT module.
uint32_t DMT_TimeoutCounterGet(void)
Reads the DMT counter register.
void DMT_Clear(void)
Checks the PreClear Status and clears the DMT Fetch Counter.
static void INTERRUPT_GlobalEnable(void)
Enables the global interrupt bit.
static void INTERRUPT_GlobalDisable(void)
Disables the global interrupt bit.
static void(* DMT_EventHandler)(void)