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