From d667194c3ea6349bb2d444e89834a5b9117c0ae1 Mon Sep 17 00:00:00 2001 From: Vikram Rajput Date: Thu, 19 Sep 2024 22:56:55 +0530 Subject: [PATCH] Initialization of gpio interrupt --- Lab6_Task1.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Lab6_Task1.c b/Lab6_Task1.c index cc0a0cd..3e12edd 100644 --- a/Lab6_Task1.c +++ b/Lab6_Task1.c @@ -42,7 +42,18 @@ void GPIOF_config() } - +void GPIOF_Int_Config() + { + GPIO_PORTF_IM_R &= ~MASK_BITS; + GPIO_PORTF_IS_R &= ~MASK_BITS; + GPIO_PORTF_IEV_R &= ~MASK_BITS; + GPIO_PORTF_IBE_R &= ~MASK_BITS; + NVIC_PRI7_R = (NVIC_PRI7_R & 0xFF1FFFFF) | (2 << 21); + NVIC_EN0_R |= (1 << 30); + GPIO_PORTF_ICR_R = MASK_BITS; + GPIO_PORTF_IM_R |= MASK_BITS; + + }