#pragma once #include "std/smart_string.hpp" #include class SerialStream { public: SerialStream(Serial_ serial, uint64_t baud_rate); SerialStream &operator<<(const char *str); SerialStream &operator<<(const SmartString &str); SerialStream &operator<<(const double &num); SerialStream &operator<<(const int &num); SerialStream &operator<<(const unsigned int &num); SerialStream &operator<<(const unsigned long &num); SerialStream &operator<<(void (*manipulator)(SerialStream *)); void write(const char *str); void flush(); private: Serial_ _serial; }; void endl(SerialStream *serial_stream);