60 #include "../inc/hw_types.h" 61 #include "../inc/hw_ints.h" 62 #include "../inc/hw_memmap.h" 63 #include "../inc/hw_systick.h" 94 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) |= (SYSTICK_CSR_CLKSOURCE | SYSTICK_CSR_ENABLE);
110 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) &= ~(SYSTICK_CSR_ENABLE);
137 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) |= SYSTICK_CSR_TICKINT;
156 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) &= ~(SYSTICK_CSR_TICKINT);
179 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) |= SYSTICK_CSR_TICKINT;
195 HWREG(SYSTICK_BASE + SYSTICK_O_CSR) &= ~(SYSTICK_CSR_TICKINT);
221 ASSERT((period > 0) && (period <= 16777216));
224 HWREG(SYSTICK_BASE + SYSTICK_O_RVR) = period - 1;
240 return (HWREG(SYSTICK_BASE + SYSTICK_O_RVR) + 1);
256 return (HWREG(SYSTICK_BASE + SYSTICK_O_CVR));
276 #endif // __SYSTICK_H__ __STATIC_INLINE uint32_t SysTickGetPeriod(void)
Gets the period of the SysTick counter.
Definition: systick.h:237
__STATIC_INLINE void SysTickDisableInt(void)
Disables the SysTick interrupt.
Definition: systick.h:192
__STATIC_INLINE void SysTickUnregisterInt(void)
Unregisters the interrupt handler for the SysTick interrupt in the dynamic interrupt table...
Definition: systick.h:153
__STATIC_INLINE void SysTickDisable(void)
Disables the SysTick counter.
Definition: systick.h:107
__STATIC_INLINE void SysTickEnableInt(void)
Enables the SysTick interrupt.
Definition: systick.h:176
#define ASSERT(expr)
Definition: debug.h:71
__STATIC_INLINE uint32_t SysTickGetValue(void)
Gets the current value of the SysTick counter.
Definition: systick.h:253
__STATIC_INLINE void SysTickEnable(void)
Enables the SysTick counter.
Definition: systick.h:91
void IntUnregister(uint32_t intNum)
Unregisters an interrupt handler in the dynamic vector table.
Definition: interrupt.c:124
void IntRegister(uint32_t intNum, void(*handler)(void))
Registers a function as an interrupt handler in the dynamic vector table.
__STATIC_INLINE void SysTickSetPeriod(uint32_t period)
Sets the period of the SysTick counter.
Definition: systick.h:218
#define __STATIC_INLINE
Definition: cmsis_gcc.h:47
__STATIC_INLINE void SysTickRegisterInt(void(*pfnHandler)(void))
Registers an interrupt handler for the SysTick interrupt in the dynamic interrupt table...
Definition: systick.h:131