Initialization of gpio interrupt

This commit is contained in:
Rajput R Vikramsingh Vikramsingh 2024-09-19 22:56:55 +05:30
parent 3455ff0fa6
commit d667194c3e
1 changed files with 12 additions and 1 deletions

View File

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