Rif: Re: [En-Nut-Discussion] Troubles with uart1

maurilio.bortolussi at ade.it maurilio.bortolussi at ade.it
Fri Feb 7 14:15:09 CET 2003


>  How did you connect UART1?


Yes, i connected  the uart1 with following settings.

NutRegisterDevice(&devUart1, 1, 0);


#ifdef _UART1
    NutRegisterDevice(&devUart0, 0, 0);
    uart0 = NutDeviceOpen("uart0");
    NutDeviceIOCtl(uart0, UART_SETSPEED, &baud);

    NutRegisterDevice(&devUart1, 1, 0);
    uart1 = NutDeviceOpen("uart1");
    baud = 9600;
    NutDeviceIOCtl(uart1, UART_SETSPEED, &baud);
  #else
    NutDeviceIOCtl(0, UART_SETSPEED, &baud);
    outp(BV(RXEN) | BV(TXEN), UCR);
  #endif


Maurilio




More information about the En-Nut-Discussion mailing list