IO_SERIAL_RAW_IO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IO_SERIAL_RAW_IO

867 Views
barbercolman
Contributor III

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?

0 Kudos
Reply
1 Reply

524 Views
MarkP_
Contributor V

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));