diff --git a/uart.hpp b/uart.hpp index 5056259..b87d917 100644 --- a/uart.hpp +++ b/uart.hpp @@ -153,6 +153,12 @@ class Uart { return *this; } + Uart &operator<<(const signed char &val) + { + txNumber(val); + return *this; + } + Uart &operator<<(const unsigned char &val) { txNumber(val); @@ -165,10 +171,10 @@ class Uart { return *this; } - template - Uart &operator<<(unsigned short) const + Uart &operator<<(unsigned short &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } Uart &operator<<(const int &val) @@ -183,28 +189,28 @@ class Uart { return *this; } - template - Uart &operator<<(long) const + Uart &operator<<(const long &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } - template - Uart &operator<<(unsigned long) const + Uart &operator<<(unsigned long &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } - template - Uart &operator<<(long long) const + Uart &operator<<(long long &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } - template - Uart &operator<<(unsigned long long) const + Uart &operator<<(unsigned long long &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } template @@ -231,10 +237,10 @@ class Uart { return *this; } - template - Uart &operator<<(const void *) const + Uart &operator<<(const void *val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(reinterpret_cast(val)); + return *this; } //////////////////////////////////////////////////////////////////////////