summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon2/console/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon2/console/console.c')
-rw-r--r--c/src/lib/libbsp/sparc/leon2/console/console.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/sparc/leon2/console/console.c b/c/src/lib/libbsp/sparc/leon2/console/console.c
index 25deed7cd6..8c55b8778a 100644
--- a/c/src/lib/libbsp/sparc/leon2/console/console.c
+++ b/c/src/lib/libbsp/sparc/leon2/console/console.c
@@ -21,7 +21,7 @@
/*
* Should we use a polled or interrupt drived console?
- *
+ *
* NOTE: This is defined in the custom/leon.cfg file.
*
* WARNING: In sis 1.6, it did not appear that the UART interrupts
@@ -29,7 +29,7 @@
* a character into the TX buffer, an interrupt was generated.
* This did not allow enough time for the program to put more
* characters in the buffer. So every character resulted in
- * "priming" the transmitter. This effectively results in
+ * "priming" the transmitter. This effectively results in
* in a polled console with a useless interrupt per character
* on output. It is reasonable to assume that input does not
* share this problem although it was not investigated.
@@ -50,7 +50,7 @@ void console_outbyte_polled(
/* body is in debugputs.c */
/*
- * console_inbyte_nonblocking
+ * console_inbyte_nonblocking
*
* This routine polls for a character.
*/
@@ -70,10 +70,10 @@ int console_inbyte_nonblocking( int port );
*/
#include <ringbuf.h>
-
+
Ring_buffer_t TX_Buffer[ 2 ];
bool Is_TX_active[ 2 ];
-
+
void *console_termios_data[ 2 ];
/*
@@ -82,7 +82,7 @@ void *console_termios_data[ 2 ];
* This routine is the console interrupt handler for Channel 1.
*
* Input parameters:
- * vector - vector number
+ * vector - vector number
*
* Output parameters: NONE
*
@@ -92,10 +92,10 @@ void *console_termios_data[ 2 ];
rtems_isr console_isr_a(
rtems_vector_number vector
)
-{
+{
char ch;
int UStat;
-
+
if ( (UStat = LEON_REG.UART_Status_1) & LEON_REG_UART_STATUS_DR ) {
if (UStat & LEON_REG_UART_STATUS_ERR) {
LEON_REG.UART_Status_1 = LEON_REG_UART_STATUS_CLR;
@@ -104,7 +104,7 @@ rtems_isr console_isr_a(
rtems_termios_enqueue_raw_characters( console_termios_data[ 0 ], &ch, 1 );
}
-
+
if ( LEON_REG.UART_Status_1 & LEON_REG_UART_STATUS_THE ) {
if ( !Ring_buffer_Is_empty( &TX_Buffer[ 0 ] ) ) {
Ring_buffer_Remove_character( &TX_Buffer[ 0 ], ch );
@@ -112,7 +112,7 @@ rtems_isr console_isr_a(
} else
Is_TX_active[ 0 ] = false;
}
-
+
LEON_Clear_interrupt( LEON_INTERRUPT_UART_1_RX_TX );
}
@@ -122,13 +122,13 @@ rtems_isr console_isr_a(
* This routine is the console interrupt handler for Channel 2.
*
* Input parameters:
- * vector - vector number
+ * vector - vector number
*
* Output parameters: NONE
*
* Return values: NONE
*/
-
+
rtems_isr console_isr_b(
rtems_vector_number vector
)
@@ -193,11 +193,11 @@ void console_exit()
* Now wait for all the data to actually get out ... the send register
* should be empty.
*/
-
- while ( (LEON_REG.UART_Status_1 & LEON_REG_UART_STATUS_THE) !=
+
+ while ( (LEON_REG.UART_Status_1 & LEON_REG_UART_STATUS_THE) !=
LEON_REG_UART_STATUS_THE );
- while ( (LEON_REG.UART_Status_2 & LEON_REG_UART_STATUS_THE) !=
+ while ( (LEON_REG.UART_Status_2 & LEON_REG_UART_STATUS_THE) !=
LEON_REG_UART_STATUS_THE );
LEON_REG.UART_Control_1 = 0;
@@ -261,7 +261,7 @@ void console_initialize_interrupts( void )
*
* Return values: NONE
*/
-
+
void console_outbyte_interrupt(
int port,
char ch
@@ -308,7 +308,7 @@ int console_write_support (int minor, const char *buf, int len)
* Console Device Driver Entry Points
*
*/
-
+
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -334,7 +334,7 @@ rtems_device_driver console_initialize(
/*
* Initialize Hardware
*/
-
+
LEON_REG.UART_Control_1 |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
LEON_REG.UART_Control_2 |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE |
LEON_REG_UART_CTRL_RI; /* rx irq default enable for remote debugger */
@@ -382,7 +382,7 @@ rtems_device_driver console_open(
assert( minor <= 1 );
if ( minor > 2 )
return RTEMS_INVALID_NUMBER;
-
+
#if (CONSOLE_USE_INTERRUPTS)
sc = rtems_termios_open (major, minor, arg, &intrCallbacks);
@@ -393,7 +393,7 @@ rtems_device_driver console_open(
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -402,7 +402,7 @@ rtems_device_driver console_close(
{
return rtems_termios_close (arg);
}
-
+
rtems_device_driver console_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -411,7 +411,7 @@ rtems_device_driver console_read(
{
return rtems_termios_read (arg);
}
-
+
rtems_device_driver console_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -420,7 +420,7 @@ rtems_device_driver console_write(
{
return rtems_termios_write (arg);
}
-
+
rtems_device_driver console_control(
rtems_device_major_number major,
rtems_device_minor_number minor,