Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kyork

Pages: [1]
1
NXPTM M522XX, KINETIS and i.MX RT / UART XON/XOFF
« on: August 29, 2008, 10:23:43 PM »
This may be a simple misunderstanding on my part.  When operating in XON/XOFF mode, should the driver pass those control bytes to the application when fnRead() is called?

Code: [Select]
TTYTABLE tInterfaceParameters;       //table for passing information to driver
QUEUE_HANDLE serialPortId;

tInterfaceParameters.Channel = 1;  // serial 0, 1, 2, 3, 4, etc.
tInterfaceParameters.ucSpeed =  SERIAL_BAUD_57600; // baud rate
tInterfaceParameters.Rx_tx_sizes.RxQueueSize = RX_BUFFER_SIZE;       // input buffer size
tInterfaceParameters.Rx_tx_sizes.TxQueueSize = TX_BUFFER_SIZE; // outpu buffer size
tInterfaceParameters.Task_to_wake = 0;
tInterfaceParameters.usConfig = (CHAR_8 | NO_PARITY | USE_XON_OFF | ONE_STOP | NO_HANDSHAKE | CHAR_MODE);    

serialPortId = fnOpen(TYPE_TTY, FOR_I_O, &tInterfaceParameters);
if ( serialPortId != 0 )  // open or change the channel with defined configurations (initially inactive)
{
fnDriver( serialPortId, (RX_ON | TX_ON), 0 );        // enable RX & TX
}

And then later
Code: [Select]
int count = fnRead(serialPortId, inBuffer, inBlockLen);

inBuffer will contain a 0x11, the XON byte.  Should this be the case?  Shouldn't the driver remove those control bytes? 

Pages: [1]