From 749c54ecbff2361cf260f6441a04f338c0b56154 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 25 Jul 1998 17:22:58 +0000 Subject: Added comments and corrected spacing. --- c/src/libchip/serial/mc68681.c | 4 ++++ c/src/libchip/serial/z85c30.c | 45 ++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 21 deletions(-) (limited to 'c/src/libchip') diff --git a/c/src/libchip/serial/mc68681.c b/c/src/libchip/serial/mc68681.c index 217e4fc9de..0da69d2653 100644 --- a/c/src/libchip/serial/mc68681.c +++ b/c/src/libchip/serial/mc68681.c @@ -528,6 +528,10 @@ MC68681_STATIC int mc68681_inbyte_nonblocking_polled( } } +/* + * mc68681_baud_rate + */ + MC68681_STATIC int mc68681_baud_rate( int minor, int baud, diff --git a/c/src/libchip/serial/z85c30.c b/c/src/libchip/serial/z85c30.c index 4cf90114b0..4f688e8787 100644 --- a/c/src/libchip/serial/z85c30.c +++ b/c/src/libchip/serial/z85c30.c @@ -43,14 +43,12 @@ * Flow control is only supported when using interrupts */ -console_flow z85c30_flow_RTSCTS = -{ +console_flow z85c30_flow_RTSCTS = { z85c30_negate_RTS, /* deviceStopRemoteTx */ z85c30_assert_RTS /* deviceStartRemoteTx */ }; -console_flow z85c30_flow_DTRCTS = -{ +console_flow z85c30_flow_DTRCTS = { z85c30_negate_DTR, /* deviceStopRemoteTx */ z85c30_assert_DTR /* deviceStartRemoteTx */ }; @@ -59,8 +57,7 @@ console_flow z85c30_flow_DTRCTS = * Exported driver function table */ -console_fns z85c30_fns = -{ +console_fns z85c30_fns = { libchip_serial_default_probe, /* deviceProbe */ z85c30_open, /* deviceFirstOpen */ NULL, /* deviceLastClose */ @@ -72,8 +69,7 @@ console_fns z85c30_fns = TRUE /* deviceOutputUsesInterrupts */ }; -console_fns z85c30_fns_polled = -{ +console_fns z85c30_fns_polled = { libchip_serial_default_probe, /* deviceProbe */ z85c30_open, /* deviceFirstOpen */ z85c30_close, /* deviceLastClose */ @@ -88,9 +84,9 @@ console_fns z85c30_fns_polled = extern void set_vector( rtems_isr_entry, rtems_vector_number, int ); /* - * z85c30_initialize_port + * z85c30_initialize_port * - * initialize a z85c30 Port + * initialize a z85c30 Port */ Z85C30_STATIC void z85c30_initialize_port( @@ -207,6 +203,10 @@ Z85C30_STATIC void z85c30_initialize_port( (*setReg)( ulCtrlPort, SCC_WR0_SEL_WR0, SCC_WR0_RST_INT ); } +/* + * z85c30_open + */ + Z85C30_STATIC int z85c30_open( int major, int minor, @@ -227,6 +227,10 @@ Z85C30_STATIC int z85c30_open( return(RTEMS_SUCCESSFUL); } +/* + * z85c30_close + */ + Z85C30_STATIC int z85c30_close( int major, int minor, @@ -245,7 +249,7 @@ Z85C30_STATIC int z85c30_close( } /* - * Console Device Driver Entry Points + * z85c30_init */ Z85C30_STATIC void z85c30_init(int minor) @@ -522,16 +526,9 @@ Z85C30_STATIC int z85c30_set_attributes( } /* - * z85c30_isr + * z85c30_process * - * This routine is the console interrupt handler for COM3 and COM4 - * - * Input parameters: - * vector - vector number - * - * Output parameters: NONE - * - * Return values: NONE + * This is the per port ISR handler. */ Z85C30_STATIC void z85c30_process( @@ -633,6 +630,12 @@ Z85C30_STATIC void z85c30_process( (*setReg)(ulCtrlPort, SCC_WR0_SEL_WR0, SCC_WR0_RST_HI_IUS); } +/* + * z85c30_isr + * + * This is the ISR handler for each Z8530. + */ + Z85C30_STATIC rtems_isr z85c30_isr( rtems_vector_number vector ) @@ -641,7 +644,7 @@ Z85C30_STATIC rtems_isr z85c30_isr( unsigned32 ulCtrlPort; volatile unsigned8 ucIntPend; volatile unsigned8 ucIntPendPort; - getRegister_f getReg; + getRegister_f getReg; for (minor=0;minor