Add main function

This commit is contained in:
Sanyog Nevase Nevase 2024-11-29 15:20:18 +05:30
parent 3f711a8b87
commit 0372a221f8
1 changed files with 12 additions and 3 deletions

15
main.c
View File

@ -12,8 +12,6 @@ volatile uint8_t nmea_index = 0;
volatile bool nmea_ready = false;
void GPIO_PORT_F_init(void)
{
SYSCTL_RCGC2_R |= 0x00000020; // ENABLE CLOCK TO GPIOF
@ -22,7 +20,6 @@ void GPIO_PORT_F_init(void)
GPIO_PORTF_DEN_R = 0x1F; // SET PORTF DIGITAL ENABLE
GPIO_PORTF_DIR_R = 0x0E; // SET PF0, PF4 as input and PF1, PF2 and PF3 as output
GPIO_PORTF_PUR_R = 0x11; // PORTF PF0 and PF4 IS PULLED UP
}
@ -91,3 +88,15 @@ void UART1_Handler(void)
}
}
int main(void)
{
GPIO_PORT_F_init();
GPIO_PORT_B_init();
while (1)
{
if (nmea_ready)
{
nmea_ready = false;
}
}
}