From edacdd8b63028b89902d39c3ebc23eb018d9b628 Mon Sep 17 00:00:00 2001 From: Sanyog Date: Sun, 22 Sep 2024 21:05:33 +0530 Subject: [PATCH] Declare and define ontime --- Group21_Lab06_Task2/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Group21_Lab06_Task2/main.c b/Group21_Lab06_Task2/main.c index 89466ea..4c5374b 100644 --- a/Group21_Lab06_Task2/main.c +++ b/Group21_Lab06_Task2/main.c @@ -49,6 +49,7 @@ void delay(int us) // DEFINING DELAY FUNCTION } void SystickHandler(void) { // SysTick interrupt handler + static int ontime = 0; ontime++; if (ontime < duty) { @@ -114,5 +115,3 @@ int main(void) { // Main loop does nothing; everything is handled in interrupts } } - -