summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/idp/console/duart.c
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
commit6128a4aa5e791ed4e0a655bfd346a52d92da7883 (patch)
treeaf53ca3f67ce405b6fbc6c98399c8e0c87e01a9e /c/src/lib/libbsp/m68k/idp/console/duart.c
parent2004-04-20 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-6128a4aa5e791ed4e0a655bfd346a52d92da7883.tar.bz2
Remove stray white spaces.
Diffstat (limited to 'c/src/lib/libbsp/m68k/idp/console/duart.c')
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/duart.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/c/src/lib/libbsp/m68k/idp/console/duart.c b/c/src/lib/libbsp/m68k/idp/console/duart.c
index c944d57ed6..194b4ecc09 100644
--- a/c/src/lib/libbsp/m68k/idp/console/duart.c
+++ b/c/src/lib/libbsp/m68k/idp/console/duart.c
@@ -55,13 +55,13 @@ volatile void init_pit()
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_DISABLE_TX);
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_DISABLE_RX);
- /*
+ /*
* install ISR for ports A and B
*/
set_vector(C_Receive_ISR, (VECT+H3VECT), 1);
- /*
- * initialize pit
+ /*
+ * initialize pit
*
* set mode to 0 -- disable all ports
* set up pirq and piack
@@ -70,24 +70,24 @@ volatile void init_pit()
* setup pivr
* turn on all ports
*/
- MC68230_WRITE(PGCR, 0x00);
- MC68230_WRITE(PSRR, 0x18);
+ MC68230_WRITE(PGCR, 0x00);
+ MC68230_WRITE(PSRR, 0x18);
MC68230_WRITE(PBDDR, 0x00);
- MC68230_WRITE(PBCR, 0x82);
- MC68230_WRITE(PIVR, VECT);
- MC68230_WRITE(PGCR, 0x20);
+ MC68230_WRITE(PBCR, 0x82);
+ MC68230_WRITE(PIVR, VECT);
+ MC68230_WRITE(PGCR, 0x20);
/*
* For some reason, the reset of receiver/transmitter only works for
- * the first time around -- it garbles the output otherwise
- * (e.g., sp21)
+ * the first time around -- it garbles the output otherwise
+ * (e.g., sp21)
*/
if (!Pit_initialized)
{
- /*
+ /*
* initialize the duart registers on port b
* WARNING:OPTIMIZER MAY ONLY EXECUTE THIRD STATEMENT IF NOT VOLATILE
- *
+ *
* reset tx, channel b
* reset rx, channel b
* reset mr pointer, ch
@@ -96,10 +96,10 @@ volatile void init_pit()
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_RESET_RX);
MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_B, MC68681_MODE_REG_RESET_MR_PTR);
- /*
+ /*
* initialize the duart registers on port a
* WARNING:OPTIMIZER MAY ONLY EXECUTE THIRD STATEMENT IF NOT VOLATILE
- *
+ *
* reset tx, channel a
* reset rx, channel a
* reset mr pointer, ch
@@ -112,8 +112,8 @@ volatile void init_pit()
}
/*
- * Init the general registers of the duart
- *
+ * Init the general registers of the duart
+ *
* init ivr
* init imr
* init acr
@@ -122,32 +122,32 @@ volatile void init_pit()
* init opcr
* init cts
*/
- MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_VECTOR_REG,
+ MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_VECTOR_REG,
MC68681_INTERRUPT_VECTOR_INIT);
- MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_MASK_REG,
- MC68681_IR_RX_READY_A | MC68681_IR_RX_READY_B);
+ MC68681_WRITE(DUART_ADDR, MC68681_INTERRUPT_MASK_REG,
+ MC68681_IR_RX_READY_A | MC68681_IR_RX_READY_B);
MC68681_WRITE(DUART_ADDR, MC68681_AUX_CTRL_REG, MC68681_CLEAR);
MC68681_WRITE(DUART_ADDR, MC68681_COUNTER_TIMER_UPPER_REG, 0x00);
MC68681_WRITE(DUART_ADDR, MC68681_COUNTER_TIMER_LOWER_REG, 0x02);
- MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_CONFIG_REG, MC68681_CLEAR);
- MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_SET_REG, 0x01);
+ MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_CONFIG_REG, MC68681_CLEAR);
+ MC68681_WRITE(DUART_ADDR, MC68681_OUTPUT_PORT_SET_REG, 0x01);
- /*
+ /*
* init the actual serial port for port a
- *
- * Set Baud Rate to 9600
+ *
+ * Set Baud Rate to 9600
* Set Stop bit length of 1
* enable Transmit and receive
*/
MC68681_WRITE(DUART_ADDR, MC68681_CLOCK_SELECT_REG_A, MC68681_BAUD_RATE_MASK_9600);
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1A,
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1A,
(MC68681_8BIT_CHARS | MC68681_NO_PARITY));
MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_2A,MC68681_STOP_BIT_LENGTH_1);
- MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_A,
+ MC68681_WRITE(DUART_ADDR, MC68681_COMMAND_REG_A,
(MC68681_MODE_REG_ENABLE_TX | MC68681_MODE_REG_ENABLE_RX));
- /*
- * init the actual serial port for port b
+ /*
+ * init the actual serial port for port b
* init csrb -- 9600 baud
*/
MC68681_WRITE(DUART_ADDR, MC68681_CLOCK_SELECT_REG_B, MC68681_BAUD_RATE_MASK_9600);
@@ -157,20 +157,20 @@ volatile void init_pit()
#ifdef EIGHT_BITS_NO_PARITY
/*
* Set 8 Bit characters with no parity
- */
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
+ */
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
(MC68681_NO_PARITY | MC68681_8BIT_CHARS) );
-#else
+#else
/*
- * Set 7 Bit Characters with parity
+ * Set 7 Bit Characters with parity
*/
- MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
+ MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_1B,
(MC68681_WITH_PARITY | MC68681_7BIT_CHARS) );
#endif
/*
- * Set Stop Bit length to 1
+ * Set Stop Bit length to 1
* Disable Recieve and transmit on B
*/
MC68681_WRITE(DUART_ADDR, MC68681_MODE_REG_2B,MC68681_STOP_BIT_LENGTH_1);
@@ -191,8 +191,8 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
_addr = (unsigned char *) (PIT_ADDR + PITSR);
*_addr = 0x04;
- /*
- * check port A first for input
+ /*
+ * check port A first for input
* extract rcvrdy on port B
* set ptr to recieve buffer and read character into ring buffer
*/
@@ -203,11 +203,11 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
Ring_buffer_Add_character( &Console_Buffer[ 0 ], *_addr );
}
- /*
+ /*
* If not on port A, let's check port B
* extract rcvrdy on port B
* set ptr to recieve buffer and read character into ring buffer
- */
+ */
else
{
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_B);
@@ -217,9 +217,9 @@ rtems_isr C_Receive_ISR(rtems_vector_number vector)
Ring_buffer_Add_character( &Console_Buffer[ 1 ], *_addr );
}
- /*
- * if not ready on port A or port B, must be an error
- * if error, get out so that fifo is undisturbed
+ /*
+ * if not ready on port A or port B, must be an error
+ * if error, get out so that fifo is undisturbed
*/
}
}
@@ -232,16 +232,16 @@ void transmit_char(char ch)
{
volatile unsigned char *_addr;
- /*
- * Get SRA (extract txrdy)
+ /*
+ * Get SRA (extract txrdy)
*/
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_A);
while (!(*_addr & MC68681_TX_READY))
{
}
- /*
- * transmit character over port A
+ /*
+ * transmit character over port A
*/
MC68681_WRITE(DUART_ADDR, MC68681_TRANSMIT_BUFFER_A, ch);
}
@@ -255,16 +255,16 @@ void transmit_char_portb(char ch)
{
volatile unsigned char *_addr;
- /*
- * Get SRB (extract txrdy)
+ /*
+ * Get SRB (extract txrdy)
*/
_addr = (unsigned char *) (DUART_ADDR + MC68681_STATUS_REG_B);
while (!(*_addr & MC68681_TX_READY))
{
}
- /*
- * transmit character over port B
+ /*
+ * transmit character over port B
*/
MC68681_WRITE(DUART_ADDR, MC68681_TRANSMIT_BUFFER_B, ch);
}