Hi,
In the raw MQX examples there is example of non blocking uart input:
uint32_t ser_opts = IO_SERIAL_NON_BLOCKING;
retval = ioctl(ser_device, IO_IOCTL_SERIAL_SET_FLAGS, &ser_opts); | |
if (retval != MQX_OK) | |
{ | |
fputs("TXtask Fatal Error: Unable to setup non-blocking mode.", stderr); | |
Unfortunately I could not find the IO_SERIAL_NON_BLOCKING defined inside my project or the KSDK,
is the non-blockin mode removed, or is the interface just changed?
(I just want to check if a char is available from the UART, and if not just keep on with what I was doing....)
I don't really understand what you mean. My UART is IRQ driven, could you please tell me which API I should use to
figure out if there is a char waiting in the input quee?
Hi Ole,
Drivers is classic MQX and MQX for KSDK are completeley different.
In MQX for KSDK you need to check for RDRF flash in UARTx Statusx Register. This flag is defined in KSDK as kUartIntRxDataRegFull.
Hope this helps.
Carlos