Hello,
I am using the UART driver in the PSP (1.30.01) at 115kbaud and it works fine with valid data. But when I send it bad data i.e. connect at 38.4kbaud or flood the UART port it produces an error condition
status = GIO_submit(hUart_IN,IOM_READ,buf,&len,NULL); // read
where status=-1. That is fine but then i want to recover from the error. Is this what i should be doing to flush the port and start again?
if (!((status == IOM_COMPLETED)||(status == IOM_PENDING)))
{
status = GIO_control(hUart_IN, Uart_IOCTL_CANCEL_CURRENT_IO, 0);
status = GIO_control(hUart_IN, Uart_IOCTL_RESET_RX_FIFO, 0);
status = GIO_control(hUart_IN, Uart_IOCTL_FLUSH_ALL_REQUEST, 0);
}
Regards,
Fawad