summaryrefslogtreecommitdiff
path: root/src/serial.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-21 13:00:36 +0100
committerHampusM <hampus@hampusmat.com>2022-03-21 13:00:36 +0100
commit757a29d0137b974fff6ddcc945d76e69ae120ecb (patch)
tree1fff46951e30eeae0402e99070e60901bd104eea /src/serial.hpp
parent12e3713e7705e4353d306ae2ec03abfe8fcd5f55 (diff)
refactor: use MPU6050_light & clean up bloatHEADmaster
Diffstat (limited to 'src/serial.hpp')
-rw-r--r--src/serial.hpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/serial.hpp b/src/serial.hpp
deleted file mode 100644
index ae51c3f..0000000
--- a/src/serial.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#pragma once
-
-#include "common/string.hpp"
-
-#include <USBAPI.h>
-
-#define LEONARDO_XINPUT_VID 0x045E // NOLINT(cppcoreguidelines-macro-usage)
-#define LEONARDO_XINPUT_PID 0x028E // NOLINT(cppcoreguidelines-macro-usage)
-
-class SerialStream
-{
-public:
- SerialStream(Serial_ serial, const unsigned long &baud_rate) noexcept;
-
- void waitReady();
-
- void write(const char *str);
-
- void flush();
-
- constexpr static bool is_enabled() noexcept
- {
-#if USB_VID != LEONARDO_XINPUT_VID && USB_PID != LEONARDO_XINPUT_PID
- return true;
-#else
- return false;
-#endif
- }
-
- SerialStream &operator<<(const char *str);
- SerialStream &operator<<(const common::String &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 *));
-
-private:
- Serial_ _serial;
-};
-
-void endl(SerialStream *serial_stream);