From fe9e67036e4acfb539499d0fa31afbc9ef99315d Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sat, 3 Aug 2019 16:17:07 +0200 Subject: [PATCH] Implemented stream operator for some basic types --- uart.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/uart.hpp b/uart.hpp index 94ec3cd..5056259 100644 --- a/uart.hpp +++ b/uart.hpp @@ -147,22 +147,22 @@ class Uart { return *this; } - template - Uart &operator<<(char) const + Uart &operator<<(const char &val) { - static_assert(util::always_false_v, "Not implemented"); + txByte(val); + return *this; } - template - Uart &operator<<(unsigned char) const + Uart &operator<<(const unsigned char &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } - template - Uart &operator<<(short) const + Uart &operator<<(const short &val) { - static_assert(util::always_false_v, "Not implemented"); + txNumber(val); + return *this; } template