From 609ff32cfc5c526a60521c2bed1409bfc01dfb42 Mon Sep 17 00:00:00 2001 From: toddmorehouse Date: Thu, 16 May 2019 21:33:41 -0400 Subject: [PATCH] Changed clock frequency parameter to be 32 bits to fix truncation bug. (120MHz was cut off to ~56KHz) --- TaskScheduler/TaskScheduler.c | 2 +- TaskScheduler/TaskScheduler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TaskScheduler/TaskScheduler.c b/TaskScheduler/TaskScheduler.c index e227925..e75711d 100644 --- a/TaskScheduler/TaskScheduler.c +++ b/TaskScheduler/TaskScheduler.c @@ -48,7 +48,7 @@ void TaskSchedulerTimer_ISR(void){ TimerIntClear(scheduler.timerBase, TIMER_TIMA_TIMEOUT); } -void InitializeTaskScheduler(uint32_t timerBase, uint16_t sysClkFreq, uint32_t timerIntBase){ +void InitializeTaskScheduler(uint32_t timerBase, uint32_t sysClkFreq, uint32_t timerIntBase){ //Initialize the task scheduler scheduler.timerBase = timerBase; scheduler.pTaskListRoot = NULL; diff --git a/TaskScheduler/TaskScheduler.h b/TaskScheduler/TaskScheduler.h index 858ec37..3968b48 100644 --- a/TaskScheduler/TaskScheduler.h +++ b/TaskScheduler/TaskScheduler.h @@ -28,7 +28,7 @@ typedef struct TaskScheduler_tag{ Task *pTaskListRoot; } TaskScheduler; -void InitializeTaskScheduler(uint32_t timerBase, uint16_t sysClkFreq, uint32_t timerIntBase); +void InitializeTaskScheduler(uint32_t timerBase, uint32_t sysClkFreq, uint32_t timerIntBase); void AddTask(Task *pTask); void RemoveTask(Task *pTask);