diff --git a/config.hpp b/config.hpp index 860687d..53d29cf 100644 --- a/config.hpp +++ b/config.hpp @@ -37,7 +37,7 @@ struct choose_data_type { template -struct config { +struct Config { static constexpr auto BAUD_RATE = baudRate; static constexpr auto DATA_BITS = dataBits; static constexpr auto PARITY = parity; diff --git a/hardware0.hpp b/hardware0.hpp index 8183446..5a054b5 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -187,8 +187,8 @@ static constexpr auto currentHardware = SupportedHardware::ATmega1284P; } // namespace detail -template , Driven driven = Driven::INTERRUPT> -class hardware0 { +template , Driven driven = Driven::INTERRUPT> +class Hardware0 { public: using data_t = typename cfg::data_t; static constexpr auto DATA_BITS = cfg::DATA_BITS; diff --git a/software.hpp b/software.hpp index f8b0432..234bf0d 100644 --- a/software.hpp +++ b/software.hpp @@ -6,8 +6,8 @@ namespace uart { -template > -class software { +template > +class Software { public: using data_t = typename cfg::data_t; static constexpr auto DATA_BITS = cfg::DATA_BITS; diff --git a/uart.hpp b/uart.hpp index 90f047a..3029dc1 100644 --- a/uart.hpp +++ b/uart.hpp @@ -21,19 +21,19 @@ struct always_false { } // namespace detail template -class uart { +class Uart { public: // Initialization is done upon construction - uart() + Uart() { Driver::init(); } // Moving and copying uart objects is not supported - uart(const uart &) = delete; - uart(uart &&) = delete; - uart &operator=(const uart &) = delete; - uart &operator=(uart &&) = delete; + Uart(const Uart &) = delete; + Uart(Uart &&) = delete; + Uart &operator=(const Uart &) = delete; + Uart &operator=(Uart &&) = delete; static void txByte(typename Driver::data_t byte) FORCE_INLINE { @@ -71,104 +71,104 @@ class uart { ////////////////////////////////////////////////////////////////////////// // Output stream overloads - uart &operator<<(const char *str) FORCE_INLINE + Uart &operator<<(const char *str) FORCE_INLINE { txString(str); return *this; } - uart &operator<<(const ::detail::FlashString *str) FORCE_INLINE + Uart &operator<<(const ::detail::FlashString *str) FORCE_INLINE { txString(str); return *this; } template - uart &operator<<(char) + Uart &operator<<(char) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(unsigned char) + Uart &operator<<(unsigned char) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(short) + Uart &operator<<(short) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(unsigned short) + Uart &operator<<(unsigned short) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(int) + Uart &operator<<(int) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(unsigned int) + Uart &operator<<(unsigned int) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(long) + Uart &operator<<(long) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(unsigned long) + Uart &operator<<(unsigned long) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(long long) + Uart &operator<<(long long) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(unsigned long long) + Uart &operator<<(unsigned long long) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(float) + Uart &operator<<(float) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(double) + Uart &operator<<(double) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(long double) + Uart &operator<<(long double) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(bool) + Uart &operator<<(bool) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator<<(const void *) + Uart &operator<<(const void *) { static_assert(detail::always_false::value, "Not implemented"); } @@ -177,91 +177,91 @@ class uart { // Input stream overloads template - uart &operator>>(char &) + Uart &operator>>(char &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(unsigned char &) + Uart &operator>>(unsigned char &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(short &) + Uart &operator>>(short &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(unsigned short &) + Uart &operator>>(unsigned short &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(int &) + Uart &operator>>(int &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(unsigned int &) + Uart &operator>>(unsigned int &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(long &) + Uart &operator>>(long &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(unsigned long &) + Uart &operator>>(unsigned long &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(long long &) + Uart &operator>>(long long &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(unsigned long long &) + Uart &operator>>(unsigned long long &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(float &) + Uart &operator>>(float &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(double &) + Uart &operator>>(double &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(long double &) + Uart &operator>>(long double &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(bool &) + Uart &operator>>(bool &) { static_assert(detail::always_false::value, "Not implemented"); } template - uart &operator>>(const void *&) + Uart &operator>>(const void *&) { static_assert(detail::always_false::value, "Not implemented"); }