Kamcho Library 02.00.03  lib.kamcho.02.00.03.287
systick_sfrs.h
Go to the documentation of this file.
1 
12 #ifndef __SYSTICK_SFRS_H__
13 #define __SYSTICK_SFRS_H__
14 
18 static __INLINE void f_SYSTICK_Enable(void)
19 {
20  SysTick->CTRL |= (SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_CLKSOURCE_Msk);
21 }
22 
26 static __INLINE void f_SYSTICK_Disable(void)
27 {
28  SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
29 }
30 
36 static __INLINE uint8_t f_SYSTICK_IsEnabled(void)
37 {
38  return SysTick->CTRL & SysTick_CTRL_ENABLE_Msk;
39 }
40 
44 static __INLINE void f_SYSTICK_IntEnable(void)
45 {
46  SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
47 }
48 
52 static __INLINE void f_SYSTICK_IntDisable(void)
53 {
54  SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
55 }
56 
62 static __INLINE void f_SYSTICK_SetLoad(uint32_t ticks)
63 {
64  SysTick->LOAD = ticks;
65 }
66 
72 static __INLINE void f_SYSTICK_SetCount(uint32_t ticks)
73 {
74  SysTick->VAL = ticks;
75 }
76 
82 static __INLINE uint32_t f_SYSTICK_GetCount(void)
83 {
84  return SysTick->VAL;
85 }
86 
92 static __INLINE uint32_t f_SYSTICK_GetLoad(void)
93 {
94  return SysTick->LOAD;
95 }
96 #endif /* __SYSTICK_SFRS_H__ */
static __INLINE uint32_t f_SYSTICK_GetLoad(void)
Get load value of SysTick timer.
Definition: systick_sfrs.h:92
static __INLINE void f_SYSTICK_Enable(void)
Enable SysTick timer.
Definition: systick_sfrs.h:18
static __INLINE void f_SYSTICK_SetLoad(uint32_t ticks)
Set Reload value of SysTick timer.
Definition: systick_sfrs.h:62
static __INLINE uint32_t f_SYSTICK_GetCount(void)
Get counter value of SysTick timer.
Definition: systick_sfrs.h:82
static __INLINE void f_SYSTICK_Disable(void)
Disable SysTick timer.
Definition: systick_sfrs.h:26
static __INLINE uint8_t f_SYSTICK_IsEnabled(void)
Check if SysTick timer enable.
Definition: systick_sfrs.h:36
static __INLINE void f_SYSTICK_IntEnable(void)
Enable SysTick timer interrupt.
Definition: systick_sfrs.h:44
static __INLINE void f_SYSTICK_SetCount(uint32_t ticks)
Set counter value of SysTick timer.
Definition: systick_sfrs.h:72
static __INLINE void f_SYSTICK_IntDisable(void)
Disable SysTick timer interrupt.
Definition: systick_sfrs.h:52