diff options
Diffstat (limited to 'src/arch/esp8266/driver')
-rw-r--r-- | src/arch/esp8266/driver/stdout.cc | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/arch/esp8266/driver/stdout.cc b/src/arch/esp8266/driver/stdout.cc index 2064b38..4471672 100644 --- a/src/arch/esp8266/driver/stdout.cc +++ b/src/arch/esp8266/driver/stdout.cc @@ -21,37 +21,37 @@ StandardOutput & StandardOutput::operator<<(char c) StandardOutput & StandardOutput::operator<<(unsigned short number) { - *this << (unsigned long long)number; + os_printf("%u", number); return *this; } StandardOutput & StandardOutput::operator<<(short number) { - *this << (long long)number; + os_printf("%d", number); return *this; } StandardOutput & StandardOutput::operator<<(unsigned int number) { - *this << (unsigned long long)number; + os_printf("%u", number); return *this; } StandardOutput & StandardOutput::operator<<(int number) { - *this << (long long)number; + os_printf("%d", number); return *this; } StandardOutput & StandardOutput::operator<<(unsigned long number) { - *this << (unsigned long long)number; + os_printf("%lu", number); return *this; } StandardOutput & StandardOutput::operator<<(long number) { - *this << (long long)number; + os_printf("%ld", number); return *this; } @@ -122,10 +122,7 @@ StandardOutput & StandardOutput::operator<<(void *pointer) StandardOutput & StandardOutput::operator<<(const char *text) { - int i = 0; - while (text[i] != '\0') { - put(text[i++]); - } + write(text); return *this; } @@ -227,11 +224,6 @@ StandardOutput & term(StandardOutput & os) return os; } -StandardOutput::StandardOutput() -{ - base = 10; -} - void StandardOutput::setup() { uart_div_modify(0, UART_CLK_FREQ / 115200); |