[rtems commit] serial/ns16550: Use standard register names
Sebastian Huber
sebh at rtems.org
Wed Aug 1 09:18:46 UTC 2018
Module: rtems
Branch: master
Commit: 8a78b784c4357b60043b7840317ba590f9e0f138
Changeset: http://git.rtems.org/rtems/commit/?id=8a78b784c4357b60043b7840317ba590f9e0f138
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 31 10:45:41 2018 +0200
serial/ns16550: Use standard register names
Use the standard register names for the divisor latches. This makes it
easier to compare the code with other driver implementations.
---
bsps/shared/dev/serial/ns16550-context.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bsps/shared/dev/serial/ns16550-context.c b/bsps/shared/dev/serial/ns16550-context.c
index b42be96..5f5ef27 100644
--- a/bsps/shared/dev/serial/ns16550-context.c
+++ b/bsps/shared/dev/serial/ns16550-context.c
@@ -153,9 +153,9 @@ bool ns16550_probe(rtems_termios_device_context *base)
(*setReg)(pNS16550, NS16550_LINE_CONTROL, ucDataByte);
/* XXX */
- (*setReg)(pNS16550,NS16550_TRANSMIT_BUFFER,(uint8_t)(ulBaudDivisor & 0xffU));
+ (*setReg)(pNS16550,NS16550_DIVISOR_LATCH_L,(uint8_t)(ulBaudDivisor & 0xffU));
(*setReg)(
- pNS16550,NS16550_INTERRUPT_ENABLE,
+ pNS16550,NS16550_DIVISOR_LATCH_M,
(uint8_t)(( ulBaudDivisor >> 8 ) & 0xffU )
);
@@ -660,8 +660,8 @@ static bool ns16550_set_attributes(
*/
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB);
- (*setReg)(pNS16550, NS16550_TRANSMIT_BUFFER, ulBaudDivisor&0xff);
- (*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, (ulBaudDivisor>>8)&0xff);
+ (*setReg)(pNS16550, NS16550_DIVISOR_LATCH_L, ulBaudDivisor&0xff);
+ (*setReg)(pNS16550, NS16550_DIVISOR_LATCH_M, (ulBaudDivisor>>8)&0xff);
/*
* Now write the line control
More information about the vc
mailing list