Adapt to moved type submodule

This commit is contained in:
BlackMark 2020-05-16 17:42:52 +02:00
parent 8f88cdccea
commit 119de32445
3 changed files with 25 additions and 25 deletions

View File

@ -2,7 +2,7 @@
#include "../clock.hpp"
#include "../type/type.hpp"
#include "../util/type.hpp"
#include <math.h>
#include <stdint.h>
@ -294,7 +294,7 @@ class BlockingHardware {
static bool peek(data_t &) FORCE_INLINE
{
static_assert(type::always_false_v<data_t>, "Peek with data is not supported in blocking mode");
static_assert(util::always_false_v<data_t>, "Peek with data is not supported in blocking mode");
return false;
}

View File

@ -3,13 +3,13 @@
#include "config.hpp"
#include "../io/io.hpp"
#include "../type/type.hpp"
#include "../util/type.hpp"
namespace uart {
template <io::P rxPin, io::P txPin, class cfg = Config<>>
class Software {
static_assert(type::always_false_v<cfg>, "Not implemented");
static_assert(util::always_false_v<cfg>, "Not implemented");
public:
using data_t = typename cfg::data_t;

View File

@ -33,8 +33,8 @@ static constexpr size_t cntDigits()
template <typename T, size_t Base>
static constexpr size_t maxNumDigits()
{
constexpr T MinVal = type::numeric_limits<T>::min();
constexpr T MaxVal = type::numeric_limits<T>::max();
constexpr T MinVal = util::numeric_limits<T>::min();
constexpr T MaxVal = util::numeric_limits<T>::max();
constexpr T MinDigits = cntDigits<T, MinVal, Base>();
constexpr T MaxDigits = cntDigits<T, MaxVal, Base>();
@ -112,7 +112,7 @@ class Uart {
template <typename T, size_t Base = 10, size_t Padding = 0, char PadChar = '0', bool LowerCase = true>
static void txNumber(const T &val)
{
static_assert(type::is_integral_v<T>, "Only supported on integral types");
static_assert(util::is_integral_v<T>, "Only supported on integral types");
static_assert(Base >= 2, "Numbers with base less than 2 make no sense");
static_assert(Base <= 16, "Numbers with base higher than 16 are not supported");
static_assert(Padding <= detail::maxNumDigits<T, Base>(), "Cannot pad more than maximum length of number");
@ -234,19 +234,19 @@ class Uart {
template <typename... Ts>
Uart &operator<<(float) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
template <typename... Ts>
Uart &operator<<(double) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
template <typename... Ts>
Uart &operator<<(long double) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
Uart &operator<<(const bool &val)
@ -268,91 +268,91 @@ class Uart {
template <typename... Ts>
Uart &operator>>(char &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(unsigned char &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(short &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(unsigned short &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(int &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(unsigned int &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(long &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(unsigned long &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(long long &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(unsigned long long &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(float &) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
template <typename... Ts>
Uart &operator>>(double &) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
template <typename... Ts>
Uart &operator>>(long double &) const
{
static_assert(type::always_false_v<Ts...>, "Not supported by hardware");
static_assert(util::always_false_v<Ts...>, "Not supported by hardware");
}
template <typename... Ts>
Uart &operator>>(bool &) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
template <typename... Ts>
Uart &operator>>(const void *&) const
{
static_assert(type::always_false_v<Ts...>, "Not implemented");
static_assert(util::always_false_v<Ts...>, "Not implemented");
}
private: