Hello,
In some code I have picked from a website dedicated to STM 32 there is the code below. I was wondering how I could port it for TM4C
void USART2_IRQHandler(void)
{
uint8_t Buffer;
uint8_t GpsBuffer[1];
static uint16_t Count=0;
static uint8_t Num=0;
uint8_t GpsFlag=1;
if(SET==USART_GetITStatus(USART2,USART_IT_RXNE))
{
Buffer=USART_ReceiveData(USART2);
if('$'==Buffer)
{
Num++;
if(7==Num)//Normall output 6 NMEA sentences from GPS UART¡£
{
GpsBuffer[0]='$';
Count=1;
GpsFlag=1;
Num=1;
}
else
{
GpsBuffer[Count++]=Buffer;
}
}
else
{
GpsBuffer[Count++]=Buffer;
}
}
USART_ClearITPendingBit(USART2, USART_IT_RXNE);//Clear interrupt
}