Added switch cases

This commit is contained in:
Rajput R Vikramsingh Vikramsingh 2024-09-17 15:41:44 +05:30
parent 83a8b28d36
commit e40da33140
1 changed files with 15 additions and 1 deletions

16
lab5.c
View File

@ -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;
}
}