I am having issues with serial_translation. Base on an older post this is what I have tried.
#define RS485_SERIAL_CHANNEL "ittyb:"
MQX_FILE_PTR rs485_dev = NULL;
rs485_dev = NULL;
rs485_dev = fopen( RS485_SERIAL_CHANNEL, (pointer)IO_SERIAL_RAW_IO );
Howevery when I run this code it is still doing the serial translation!
while( fstatus(rs485_dev) == TRUE ) {
read(rs485_dev, &data, 1);
}
Any suggestions?
There is an attribute for non-blocking operation:
uartDef->uart_device = _io_fopen(uartDevicesTbl[uartIndex],
(char _PTR_)(IO_SERIAL_RAW_IO | IO_SERIAL_NON_BLOCKING));