Hi Mark,
I have been trying to set up the serial port with CTS/RTS, I done the below ( I set the RTS_CTS in the usconfig):
I have another serial port sending out data to hyperterminal which works fine (on uart 0), but as soon as the below is called, then nothing gets sent on that uart. The same happens when I tried the above code , as well as previous.
Neil
TTYTABLE tInterfaceParameters; // table for passing information to driver
tInterfaceParameters.Channel = 2; // set UART channel for serial use
tInterfaceParameters.ucSpeed = SERIAL_BAUD_9600; // baud rate
tInterfaceParameters.Rx_tx_sizes.RxQueueSize = 200; // input buffer size
tInterfaceParameters.Rx_tx_sizes.TxQueueSize = 500; // output buffer size
tInterfaceParameters.Task_to_wake = TASK_USBCOMMAND; // wake self when messages have been received
tInterfaceParameters.usConfig =(CHAR_8 | NO_PARITY | ONE_STOP | CHAR_MODE | RTS_CTS);
tInterfaceParameters.ucDMAConfig = 1; // DMA for UART2
if ((USBPortID = fnOpen( TYPE_TTY, ucDriverMode, &tInterfaceParameters )) != 0)
{ // open or change the channel with defined configurations (initially inactive)
fnDriver( USBPortID, ( TX_ON | RX_ON ), 0 );
if (tInterfaceParameters.usConfig & RTS_CTS) { // {8}
fnDriver( SerialPortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0 ); // activate CTS interrupt when working with HW flow control (this returns also the present control line states)
fnDriver( SerialPortID, (MODIFY_CONTROL | SET_RTS), 0 ); // activate RTS line when working with HW flow control
}
}