[En-Nut-Discussion] Uart and flow control

Damian Slee damian at commtech.com.au
Mon Feb 16 09:15:32 CET 2004


Hi all,
Should uartavr.h be used or usartavr.h for RTS/CTS flow control or
XON/XOFF.

Usartavr looks more complete, but how do I open that device?  
I use this for Uart1;
NutRegisterDevice(&devUart1, 0, 0);
g_rs232 = fopen("uart1", "r+b");
fileno = _fileno(g_rs232);


I notice the code in uartavr.c has this, which is obviosly wrong.  Look
like a copyn'paste from UART_SETLOCALECHO.

    case UART_SETFLOWCONTROL:
        if (bv)
            dcb->dcb_modeflags |= UART_MF_LOCALECHO;
        else
            dcb->dcb_modeflags &= ~UART_MF_LOCALECHO;
        break;
    case UART_GETFLOWCONTROL:
        break;


Thanks,

damian



More information about the En-Nut-Discussion mailing list