fusee_cpp: implement erista pll selection logic for mtc

This commit is contained in:
Michael Scire authored and SciresM committed 2021-09-06 16:26:50 -07:00
1 parent d2f3b806d6
commit d7192343d8
4 files changed
+207 -1

No files matched your search

@@ -56,6 +56,12 @@ namespace ams::reg {
return (EncodeMask(masks) | ...);
}
template<typename IntType> requires UnsignedNonConstIntegral<IntType>
constexpr ALWAYS_INLINE IntType GetField(const IntType &value, const BitsMask mask) { return (value & EncodeMask(mask)) >> GetOffset(mask); }
template<typename IntType> requires UnsignedNonConstIntegral<IntType>
constexpr ALWAYS_INLINE void SetField(IntType &value, const BitsValue v) { value = (value & ~EncodeMask(v)) | EncodeValue(v); }
template<typename IntType> requires UnsignedNonConstIntegral<IntType>
ALWAYS_INLINE void Write(volatile IntType *reg, std::type_identity_t<IntType> val) { *reg = val; }