summaryrefslogtreecommitdiff
path: root/project/Core/Src/System/systick.c
diff options
context:
space:
mode:
Diffstat (limited to 'project/Core/Src/System/systick.c')
-rw-r--r--project/Core/Src/System/systick.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/project/Core/Src/System/systick.c b/project/Core/Src/System/systick.c
index ac3a731..c18707e 100644
--- a/project/Core/Src/System/systick.c
+++ b/project/Core/Src/System/systick.c
@@ -23,6 +23,8 @@ void init_systick()
s->CSR |= 1;
}
+
+
// This fuction is to create delay using SysTick timer counter
void delay_systick()
{
@@ -54,3 +56,12 @@ int check_systick() {
return 0;
}
}
+
+static uint32_t count = 0;
+void SysTick_Handler() {
+ SysTick_Handler2(count++);
+}
+
+uint32_t systick_get_count() {
+ return count;
+}