Support easier read

This commit is contained in:
Jaby
2023-01-10 21:12:41 +01:00
parent 3bd3a57801
commit 67436a2e88
2 changed files with 6 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ namespace JabyEngine {
return const_cast<const volatile IOPort<T>*>(this)->value;
}
template<typename S>
constexpr S read(const BitRange<S>& range) const {
return IOPort::read().get_value(range);
}
template<typename...ARGS>
constexpr void write_combined(const ARGS&... value) {
IOPort::write(T::with(value...));