Some error corrections

This commit is contained in:
Rajput R Vikramsingh Vikramsingh 2024-09-19 23:07:11 +05:30
parent 1970542dc8
commit 5570e37d76
1 changed files with 10 additions and 10 deletions

View File

@ -14,7 +14,7 @@ void main(void)
SYSCTL_RCGCPWM_R = 0x3; // SYSCTL_RCGCPWM_R = 0x3; //
GPIOF_config(); GPIOF_config();
GPIOF_Interrupt_config(); GPIOF_Int_Config();
GPIO_PORTF_AFSEL_R |= 0x02; GPIO_PORTF_AFSEL_R |= 0x02;
GPIO_PORTF_PCTL_R |= 0x50; GPIO_PORTF_PCTL_R |= 0x50;
@ -44,20 +44,20 @@ void GPIOF_config()
void GPIOF_Int_Config() void GPIOF_Int_Config()
{ {
GPIO_PORTF_IM_R &= ~MASK_BITS; GPIO_PORTF_IM_R &= ~mask_bits;
GPIO_PORTF_IS_R &= ~MASK_BITS; GPIO_PORTF_IS_R &= ~mask_bits;
GPIO_PORTF_IEV_R &= ~MASK_BITS; GPIO_PORTF_IEV_R &= ~mask_bits;
GPIO_PORTF_IBE_R &= ~MASK_BITS; GPIO_PORTF_IBE_R &= ~mask_bits;
NVIC_PRI7_R = (NVIC_PRI7_R & 0xFF1FFFFF) | (2 << 21); NVIC_PRI7_R = (NVIC_PRI7_R & 0xFF1FFFFF) | (2 << 21);
NVIC_EN0_R |= (1 << 30); NVIC_EN0_R |= (1 << 30);
GPIO_PORTF_ICR_R = MASK_BITS; GPIO_PORTF_ICR_R = mask_bits;
GPIO_PORTF_IM_R |= MASK_BITS; GPIO_PORTF_IM_R |= mask_bits;
} }
void GPIOF_INT_Handler(void) void GPIOF_INT_Handler(void)
{ {
GPIO_PORTF_IM_R &= ~MASK_BITS; GPIO_PORTF_IM_R &= ~mask_bits;
int i; int i;
if(GPIO_PORTF_RIS_R & 0x01) if(GPIO_PORTF_RIS_R & 0x01)
{ {
@ -83,8 +83,8 @@ void GPIOF_INT_Handler(void)
} }
} }
} }
GPIO_PORTF_ICR_R = MASK_BITS; GPIO_PORTF_ICR_R = mask_bits;
GPIO_PORTF_IM_R |= MASK_BITS; GPIO_PORTF_IM_R |= mask_bits;
} }