Initialization of gpio interrupt
This commit is contained in:
parent
3455ff0fa6
commit
d667194c3e
13
Lab6_Task1.c
13
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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue