From e40da33140177fe4f7dbb606a3b4b46d4089b453 Mon Sep 17 00:00:00 2001 From: Vikram Rajput Date: Tue, 17 Sep 2024 15:41:44 +0530 Subject: [PATCH] Added switch cases --- lab5.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lab5.c b/lab5.c index baa9472..b863abd 100644 --- a/lab5.c +++ b/lab5.c @@ -19,9 +19,23 @@ int main(void) while(1) { + GPIO_PORTF_DATA_R = 0x04; + } + +void GPIOIntHandler(void) + { + switch(z) + { + case 0: GPIO_PORTF_DATA_R = 0x02; + break; + + case 1: GPIO_PORTF_DATA_R = 0x00; + break; + + default : GPIO_PORTF_DATA_R = 0xFF; - + } }