sdmmc: implement clock reset controller for register api

This commit is contained in:
Michael Scire
2020-10-25 19:08:19 -07:00
parent 397d0c4295
commit 37704d670b
10 changed files with 748 additions and 12 deletions

View File

@@ -51,6 +51,11 @@ namespace ams::reg {
return (EncodeValue(values) | ...);
}
template<typename... Masks> requires ((sizeof...(Masks) > 0) && (std::is_same<Masks, BitsMask>::value && ...))
constexpr ALWAYS_INLINE u32 EncodeMask(const Masks... masks) {
return (EncodeMask(masks) | ...);
}
template<typename IntType> requires UnsignedNonConstIntegral<IntType>
ALWAYS_INLINE void Write(volatile IntType *reg, std::type_identity_t<IntType> val) { *reg = val; }