Compare commits

..

No commits in common. "1970542dc83772e7063788a4dc36c052fec888ea" and "3455ff0fa6539009dbe3f716da6d4f996d28b61c" have entirely different histories.

1 changed files with 3 additions and 45 deletions

View File

@ -42,51 +42,9 @@ 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;
}
void GPIOF_INT_Handler(void)
{
GPIO_PORTF_IM_R &= ~MASK_BITS;
int i;
if(GPIO_PORTF_RIS_R & 0x01)
{
for(i=0;i<160000;i++){}
if(~(GPIO_PORTF_DATA_R)&0x01)
{
if(PWM1_2_CMPB_R < 155)
{
PWM1_2_CMPB_R += 5;
}
}
}
if(GPIO_PORTF_RIS_R & 0x10)
{
for(i=0;i<160000;i++){}
if(~(GPIO_PORTF_DATA_R)&0x10)
{
if(PWM1_2_CMPB_R > 5)
{
PWM1_2_CMPB_R -= 5;
}
}
}
GPIO_PORTF_ICR_R = MASK_BITS;
GPIO_PORTF_IM_R |= MASK_BITS;
}