Other Parts Discussed in Thread: EK-TM4C123GXL
Tool/software:
Hello,
I initialize the serial port as below:
void init_serial(void) {
MAP_GPIOPinConfigure(GPIO_PA0_U0RX);
MAP_GPIOPinConfigure(GPIO_PA1_U0TX);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
MAP_UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC); // UART_CLOCK_PIOSC or UART_CLOCK_SYSTEM
MAP_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTStdioConfig(0, 230400, 16000000);
}
I want to process nmea data coming from a gps.while doing other things. Is there an example on doing serial handling as the data comes in? Equivalent to:
while(Serial.available()) {
c=Serial.read();
// do stuff with c
}
Best Regards,
C.