summaryrefslogtreecommitdiffstats
path: root/c/src/libchip
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-25 17:19:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-25 17:19:45 +0000
commitcae05041f2d1e29c6dd63279e8e4aee57abbb904 (patch)
tree3d70d31109113a0d7101873f24134e95c2413339 /c/src/libchip
parentAdded ns16550_set_attributes. (diff)
downloadrtems-cae05041f2d1e29c6dd63279e8e4aee57abbb904.tar.bz2
Corrected spacing and added headers.
Diffstat (limited to 'c/src/libchip')
-rw-r--r--c/src/libchip/serial/ns16550.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/c/src/libchip/serial/ns16550.c b/c/src/libchip/serial/ns16550.c
index 336f906d3d..d5ac72004f 100644
--- a/c/src/libchip/serial/ns16550.c
+++ b/c/src/libchip/serial/ns16550.c
@@ -32,20 +32,18 @@
/*
* Flow control is only supported when using interrupts
*/
-console_flow ns16550_flow_RTSCTS =
-{
+
+console_flow ns16550_flow_RTSCTS = {
ns16550_negate_RTS, /* deviceStopRemoteTx */
ns16550_assert_RTS /* deviceStartRemoteTx */
};
-console_flow ns16550_flow_DTRCTS =
-{
+console_flow ns16550_flow_DTRCTS = {
ns16550_negate_DTR, /* deviceStopRemoteTx */
ns16550_assert_DTR /* deviceStartRemoteTx */
};
-console_fns ns16550_fns =
-{
+console_fns ns16550_fns = {
libchip_serial_default_probe, /* deviceProbe */
ns16550_open, /* deviceFirstOpen */
NULL, /* deviceLastClose */
@@ -57,8 +55,7 @@ console_fns ns16550_fns =
TRUE /* deviceOutputUsesInterrupts */
};
-console_fns ns16550_fns_polled =
-{
+console_fns ns16550_fns_polled = {
libchip_serial_default_probe, /* deviceProbe */
ns16550_open, /* deviceFirstOpen */
ns16550_close, /* deviceLastClose */
@@ -72,6 +69,10 @@ console_fns ns16550_fns_polled =
extern void set_vector( rtems_isr_entry, rtems_vector_number, int );
+/*
+ * ns16550_init
+ */
+
NS16550_STATIC void ns16550_init(int minor)
{
unsigned32 pNS16550;
@@ -131,6 +132,10 @@ NS16550_STATIC void ns16550_init(int minor)
ucTrash = (*getReg)(pNS16550, NS16550_RECEIVE_BUFFER );
}
+/*
+ * ns16550_open
+ */
+
NS16550_STATIC int ns16550_open(
int major,
int minor,
@@ -148,6 +153,10 @@ NS16550_STATIC int ns16550_open(
return(RTEMS_SUCCESSFUL);
}
+/*
+ * ns16550_close
+ */
+
NS16550_STATIC int ns16550_close(
int major,
int minor,
@@ -210,9 +219,11 @@ NS16550_STATIC void ns16550_write_polled(
/*
* These routines provide control of the RTS and DTR lines
*/
+
/*
* ns16550_assert_RTS
*/
+
NS16550_STATIC int ns16550_assert_RTS(int minor)
{
unsigned32 pNS16550;
@@ -238,6 +249,7 @@ NS16550_STATIC int ns16550_assert_RTS(int minor)
/*
* ns16550_negate_RTS
*/
+
NS16550_STATIC int ns16550_negate_RTS(int minor)
{
unsigned32 pNS16550;
@@ -264,9 +276,11 @@ NS16550_STATIC int ns16550_negate_RTS(int minor)
* These flow control routines utilise a connection from the local DTR
* line to the remote CTS line
*/
+
/*
* ns16550_assert_DTR
*/
+
NS16550_STATIC int ns16550_assert_DTR(int minor)
{
unsigned32 pNS16550;
@@ -411,16 +425,9 @@ NS16550_STATIC int ns16550_set_attributes(
}
/*
- * ns16550_isr
- *
- * This routine is the console interrupt handler for COM1 and COM2
+ * ns16550_process
*
- * Input parameters:
- * vector - vector number
- *
- * Output parameters: NONE
- *
- * Return values: NONE
+ * This routine is the console interrupt handler for A port.
*/
NS16550_STATIC void ns16550_process(
@@ -493,6 +500,10 @@ NS16550_STATIC void ns16550_process(
} while((ucInterruptId&0xf)!=0x1);
}
+/*
+ * ns16550_isr
+ */
+
NS16550_STATIC rtems_isr ns16550_isr(
rtems_vector_number vector
)