Refactored class names to start with capital letter
This commit is contained in:
76
uart.hpp
76
uart.hpp
@@ -21,19 +21,19 @@ struct always_false {
|
||||
} // namespace detail
|
||||
|
||||
template <class Driver>
|
||||
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 <typename... Ts>
|
||||
uart &operator<<(char)
|
||||
Uart &operator<<(char)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned char)
|
||||
Uart &operator<<(unsigned char)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(short)
|
||||
Uart &operator<<(short)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned short)
|
||||
Uart &operator<<(unsigned short)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(int)
|
||||
Uart &operator<<(int)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned int)
|
||||
Uart &operator<<(unsigned int)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(long)
|
||||
Uart &operator<<(long)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned long)
|
||||
Uart &operator<<(unsigned long)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(long long)
|
||||
Uart &operator<<(long long)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned long long)
|
||||
Uart &operator<<(unsigned long long)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(float)
|
||||
Uart &operator<<(float)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(double)
|
||||
Uart &operator<<(double)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(long double)
|
||||
Uart &operator<<(long double)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(bool)
|
||||
Uart &operator<<(bool)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(const void *)
|
||||
Uart &operator<<(const void *)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
@@ -177,91 +177,91 @@ class uart {
|
||||
// Input stream overloads
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(char &)
|
||||
Uart &operator>>(char &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned char &)
|
||||
Uart &operator>>(unsigned char &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(short &)
|
||||
Uart &operator>>(short &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned short &)
|
||||
Uart &operator>>(unsigned short &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(int &)
|
||||
Uart &operator>>(int &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned int &)
|
||||
Uart &operator>>(unsigned int &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(long &)
|
||||
Uart &operator>>(long &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned long &)
|
||||
Uart &operator>>(unsigned long &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(long long &)
|
||||
Uart &operator>>(long long &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned long long &)
|
||||
Uart &operator>>(unsigned long long &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(float &)
|
||||
Uart &operator>>(float &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(double &)
|
||||
Uart &operator>>(double &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(long double &)
|
||||
Uart &operator>>(long double &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(bool &)
|
||||
Uart &operator>>(bool &)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(const void *&)
|
||||
Uart &operator>>(const void *&)
|
||||
{
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user