[rtems commit] libchip ns16550.c: Improve comment

Joel Sherrill joel at rtems.org
Tue Jul 9 17:35:03 UTC 2013


Module:    rtems
Branch:    master
Commit:    48a22edb4ae2ef41969095abc5a514910361ee58
Changeset: http://git.rtems.org/rtems/commit/?id=48a22edb4ae2ef41969095abc5a514910361ee58

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Jul  9 11:15:57 2013 -0500

libchip ns16550.c: Improve comment

---

 c/src/libchip/serial/ns16550.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/c/src/libchip/serial/ns16550.c b/c/src/libchip/serial/ns16550.c
index de22456..829284a 100644
--- a/c/src/libchip/serial/ns16550.c
+++ b/c/src/libchip/serial/ns16550.c
@@ -501,10 +501,13 @@ int ns16550_set_attributes(
 
     /*
      *  Set the baud rate
+     *
+     *  NOTE: When the Divisor Latch Access Bit (DLAB) is set to 1,
+     *        the transmit buffer and interrupt enable registers
+     *        turn into the LSB and MSB divisor latch registers.
      */
 
     (*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB);
-    /* XXX are these registers right? */
     (*setReg)(pNS16550, NS16550_TRANSMIT_BUFFER, ulBaudDivisor&0xff);
     (*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, (ulBaudDivisor>>8)&0xff);
 




More information about the vc mailing list