Hello again,
I have search o lot in forum about this question, I find Dave Wilson mind that:
"I suppose, add code to UARTStdioIntHandler to do something similar to what UARTPeek does and set some flag for your main loop whenever it detects the end of a line.."
http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/p/46111/159192.aspx#159192
So, I need instead of UARTPeek spinning all the time in while loop looking for '\r' - end of line (like qs-rgb example), find a way to make flag high and jump to UARTStdioIntHandler interrupt..
I need write about six separated Hex elements in one line and press Enter..
this is possible at all?
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
static char g_cInput[APP_INPUT_BUF_SIZE];
extern void UARTStdioIntHandler(void)
{
// Seriuosly, i dont know.. Something like clean flag..
UARTgets(g_cInput,sizeof(g_cInput));
// something...
}
int
main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|
SYSCTL_OSC_MAIN);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
ROM_GPIOPinConfigure(GPIO_PA0_U0RX);
ROM_GPIOPinConfigure(GPIO_PA1_U0TX);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);
IntMasterEnable(); // Need this one?
UARTStdioConfig(0, 115200, 16000000);
while(1)
{
}
}