Commit 790799a3 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

esp8266 stdout: partialle respect base, output unsigned char as number

parent 44358d6a
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -9,7 +9,11 @@ void os_printf_plus(const char *s, ...);

StandardOutput & StandardOutput::operator<<(unsigned char c)
{
	put(c);
	if (base == 16) {
		os_printf("%02x", c);
	} else {
		os_printf("%d", c);
	}
	return *this;
}

@@ -33,13 +37,21 @@ StandardOutput & StandardOutput::operator<<(short number)

StandardOutput & StandardOutput::operator<<(unsigned int number)
{
	if (base == 16) {
		os_printf("%08x", number);
	} else {
		os_printf("%u", number);
	}
	return *this;
}

StandardOutput & StandardOutput::operator<<(int number)
{
	if (base == 16) {
		os_printf("%08x", number);
	} else {
		os_printf("%d", number);
	}
	return *this;
}