diff --git a/uart.hpp b/uart.hpp index 45c1738..594bc83 100644 --- a/uart.hpp +++ b/uart.hpp @@ -107,7 +107,7 @@ class Uart { template static inline void txNumber(const T &val) { - // static_assert(util::is_integral_v, "Only supported on integral types"); + static_assert(util::is_integral_v, "Only supported on integral types"); constexpr size_t numDigits = detail::maxNumDigits(); typename Driver::data_t buffer[numDigits]; @@ -175,10 +175,10 @@ class Uart { return *this; } - template - Uart &operator<<(unsigned int) const + Uart &operator<<(const unsigned int &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } template @@ -223,10 +223,10 @@ class Uart { static_assert(util::always_false_v, "Not implemented"); } - template - Uart &operator<<(bool) const + Uart &operator<<(const bool &val) { - static_assert(util::always_false_v, "Not implemented"); + txString(val ? F("true") : F("false")); + return *this; } template