u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] serial: lpc32xx: send CR before LF
Date: Sat, 30 Nov 2013 21:43:47 +0100	[thread overview]
Message-ID: <20131130204347.EFF9B38015F@gemini.denx.de> (raw)
In-Reply-To: <201311301642.36531.marex@denx.de>

Dear Marek Vasut,

In message <201311301642.36531.marex@denx.de> you wrote:
> Dear Vladimir Zapolskiy,
> 
> > For LPC32XX high-speed UART it is required to send a carriage return
> > symbol along with line feed.
> 
> Why ?

Because we are actually emulating a classical type writer here, and to
start printing at the beginning of a new line requires two separate
actions: performing a line feed (i. e. scrolling the paper one line
up) and a crriage return (i. e. repositioning the drum such that the
next character will be printed in column 1.

In the strict sense, the ASCII characters represent the line feed and
'\r' the carriage return, respectively.  To print the equivalent of
the "new line" as it is interpreted by the C standard, we have to
translate the single C character into a two-character sequence.  You
can trace this back to the very beginnings of Unix; you can see the
same in Unix version 6 drivers, for example.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A well-written program is its own heaven; a poorly-written program is
its own hell.             -- Geoffrey James, "The Tao of Programming"

  parent reply	other threads:[~2013-11-30 20:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 14:47 [U-Boot] [PATCH] serial: lpc32xx: send CR before LF Vladimir Zapolskiy
2013-11-30 15:42 ` Marek Vasut
2013-11-30 18:24   ` Vladimir Zapolskiy
2013-11-30 18:31   ` Vladimir Zapolskiy
2013-11-30 23:06     ` Marek Vasut
2013-12-01  7:11       ` Vladimir Zapolskiy
2013-12-01 15:18         ` Marek Vasut
2013-11-30 20:43   ` Wolfgang Denk [this message]
2013-11-30 23:04     ` Marek Vasut
2013-12-16 14:15 ` [U-Boot] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131130204347.EFF9B38015F@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).