mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
fusee_cpp: implement erista pll selection logic for mtc
This commit is contained in:
parent
d2f3b806d6
commit
d7192343d8
4 changed files with 207 additions and 1 deletions
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue