[En-Nut-Discussion] CR + LF or LF + CR

Ulrich Prinz uprinz2 at netscape.net
Sat Sep 5 22:41:21 CEST 2009


OK, found it:

Can you test this fix by exchanging the appropriate function in 
nut/arch/arm/dev/debug_at91.c: Starting Line 289 with the following code:

/*!
  * \brief Send a single character to debug device 0.
  *
  * A newline character will be automatically prepended
  * by a carriage return.
  */
static void DebugPut(CONST NUTDEVICE * dev, char ch)
{
     while ((inr(dev->dev_base + US_CSR_OFF) & US_TXRDY) == 0);
     if (ch == '\n') {
        while ((inr(dev->dev_base + US_CSR_OFF) & US_TXRDY) == 0);
         outr(dev->dev_base + US_THR_OFF, '\r');
     }
     outr(dev->dev_base + US_THR_OFF, ch);
}

Hope that this will fix it for ARM. If it works, give me a response so I 
can check it into the latest trunk.

Best regards,
Ulrich

Andre Riesberg schrieb:
> Hi all,
> 
> I use the debug output via serial interface. In the output every LF will 
> be replaced by LF CR.
> This surprised me a little bit, many other system (I know) use CR LF.
> 
> I know this is really an unimportant detail but my favorite terminal 
> program can suppress CR LF but not LF CR on the screen.
> 
> Greetings
> Andre
> 
> PS: I forward this mail to the developer of HTerm. Maybe in the next 
> version he can also suppress LF CR :-)
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list