This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTS / CTS handshaking with LPC2148 USB VCOM example

How might I implement RTS / CTS handshaking using the dual VCom example (AN10420) for the LPC2148? I have an audio stream on VCOM0 I would like to halt if my input buffer is almost full and continue transfer once it has enough space again. I am only interested in data from the virtual port (NO_UART_CABLE = 1), not sending it to the LPC2148's physical UART.

I thought perhaps I could set the modem0status bits (below) defined in the example to control the CTS line, with bit allocations matching the 16550 uart spec (bit 4 of modem status register = CTS) but transfer from the host side doesn't stop. In the physical implementation, SetSIORTS() controls the LPC2148's UART registers to assert the RTS state, but I don't see how the host driver can detect that the device UART's CTS pin is asserted.

Thanks for any help.

// EP3 is used to report UART0 status, and EP9
//is used to report UART1 status respectively
if ( ReportStatus0 )
{
     ReportStatus0 = 0;

     // For Interrupt IN on EP3
     USB_WriteEP( 3 | 0x80, &Modem0Status, sizeof(Modem0Status) );
}
if ( ReportStatus1 )
{
     ReportStatus1 = 0;

     // For Interrupt IN on EP9
     USB_WriteEP( 9 | 0x80, &Modem1Status, sizeof(Modem1Status) );
}

0