mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 15:56:41 +00:00
base: Don't complete line breaks in UART drivers.
This commit is contained in:
parent
f51ce6f5a5
commit
240f1e334f
@ -31,7 +31,20 @@ namespace Genode
|
||||
/**
|
||||
* Print a char to the console
|
||||
*/
|
||||
void _out_char(char c) { Serial_log::put_char(c); }
|
||||
void _out_char(char c)
|
||||
{
|
||||
enum {
|
||||
ASCII_LINE_FEED = 10,
|
||||
ASCII_CARRIAGE_RETURN = 13,
|
||||
};
|
||||
|
||||
/* auto complete new line commands */
|
||||
if (c == ASCII_LINE_FEED)
|
||||
Serial_log::put_char(ASCII_CARRIAGE_RETURN);
|
||||
|
||||
/* print char */
|
||||
Serial_log::put_char(c);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
@ -26,12 +26,7 @@ namespace Genode
|
||||
{
|
||||
protected:
|
||||
|
||||
enum {
|
||||
MAX_BAUD_RATE = 0xfffffff,
|
||||
|
||||
ASCII_LINE_FEED = 10,
|
||||
ASCII_CARRIAGE_RETURN = 13,
|
||||
};
|
||||
enum { MAX_BAUD_RATE = 0xfffffff };
|
||||
|
||||
/**
|
||||
* Data register
|
||||
@ -175,9 +170,6 @@ void Genode::Pl011_base::put_char(char const c)
|
||||
/* wait as long as the transmission buffer is full */
|
||||
while (read<Uartfr::Txff>()) ;
|
||||
|
||||
/* auto complete new line commands */
|
||||
if (c == ASCII_LINE_FEED) write<Uartdr::Data>(ASCII_CARRIAGE_RETURN);
|
||||
|
||||
/* transmit character */
|
||||
write<Uartdr::Data>(c);
|
||||
_wait_until_ready();
|
||||
|
@ -19,11 +19,6 @@
|
||||
|
||||
namespace Genode
|
||||
{
|
||||
enum {
|
||||
ASCII_LINE_FEED = 10,
|
||||
ASCII_CARRIAGE_RETURN = 13,
|
||||
};
|
||||
|
||||
/**
|
||||
* Base driver Texas instruments TL16C750 UART module
|
||||
*
|
||||
@ -219,10 +214,6 @@ namespace Genode
|
||||
/* wait as long as the transmission buffer is full */
|
||||
while (!read<Uart_lsr::Tx_fifo_empty>()) ;
|
||||
|
||||
/* auto complete new line commands */
|
||||
if (c == ASCII_LINE_FEED)
|
||||
write<Uart_thr::Thr>(ASCII_CARRIAGE_RETURN);
|
||||
|
||||
/* transmit character */
|
||||
write<Uart_thr::Thr>(c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user