Adapt to moved type submodule

This commit is contained in:
BlackMark 2020-05-16 17:43:55 +02:00
parent 11211be9b9
commit 16249914c2

View File

@ -5,7 +5,7 @@
#include <stddef.h>
#include "../i2c/i2c.hpp"
#include "../type/type.hpp"
#include "../util/type.hpp"
#include "registers.hpp"
@ -165,7 +165,7 @@ class DS3231 {
} else if constexpr (Address == TEMP_REG_ADDR) {
return readRegisterHelper<Address, detail::TempReg>();
} else {
static_assert(type::always_false_v<decltype(Address)>, "Invalid register address");
static_assert(util::always_false_v<decltype(Address)>, "Invalid register address");
}
}
@ -180,21 +180,21 @@ class DS3231 {
static_assert(StartOffset + WRITE_SIZE <= sizeof(Register), "Writing out of bounds");
if constexpr (Address == TIME_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::TimeReg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::TimeReg>, "Invalid register type");
} else if constexpr (Address == ALARM1_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::Alarm1Reg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::Alarm1Reg>, "Invalid register type");
} else if constexpr (Address == ALARM2_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::Alarm2Reg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::Alarm2Reg>, "Invalid register type");
} else if constexpr (Address == CONTROL_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::ControlReg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::ControlReg>, "Invalid register type");
} else if constexpr (Address == CONTROL_STATUS_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::ControlStatusReg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::ControlStatusReg>, "Invalid register type");
} else if constexpr (Address == AGING_OFFSET_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::AgingOffsetReg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::AgingOffsetReg>, "Invalid register type");
} else if constexpr (Address == TEMP_REG_ADDR) {
static_assert(type::is_same_v<Register, detail::TempReg>, "Invalid register type");
static_assert(util::is_same_v<Register, detail::TempReg>, "Invalid register type");
} else {
static_assert(type::always_false_v<Register>, "Invalid register address");
static_assert(util::always_false_v<Register>, "Invalid register address");
}
I2cDriver::template start<I2C_ADDRESS>(false);