#[doc="Returns the value of this field:"]
#[doc=$comment]
)?
- #[inline]
+ #[inline(always)]
pub(crate) fn $field(self) -> $res_type {
::kernel::macros::paste!(
const MASK: u32 = $name::[<$field:upper _MASK>];
#[doc="Sets the value of this field:"]
#[doc=$comment]
)?
- #[inline]
+ #[inline(always)]
pub(crate) fn [<set_ $field>](mut self, value: $to_type) -> Self {
const MASK: u32 = $name::[<$field:upper _MASK>];
const SHIFT: u32 = $name::[<$field:upper _SHIFT>];
pub(crate) const OFFSET: usize = $offset;
/// Read the register from its address in `io`.
- #[inline]
+ #[inline(always)]
pub(crate) fn read<const SIZE: usize, T>(io: &T) -> Self where
T: ::core::ops::Deref<Target = ::kernel::io::Io<SIZE>>,
{
}
/// Write the value contained in `self` to the register address in `io`.
- #[inline]
+ #[inline(always)]
pub(crate) fn write<const SIZE: usize, T>(self, io: &T) where
T: ::core::ops::Deref<Target = ::kernel::io::Io<SIZE>>,
{
/// Read the register from its address in `io` and run `f` on its value to obtain a new
/// value to write back.
- #[inline]
+ #[inline(always)]
pub(crate) fn alter<const SIZE: usize, T, F>(
io: &T,
f: F,
impl $name {
pub(crate) const OFFSET: usize = $offset;
- #[inline]
+ #[inline(always)]
pub(crate) fn read<const SIZE: usize, T>(
io: &T,
base: usize,
Self(io.read32(base + $offset))
}
- #[inline]
+ #[inline(always)]
pub(crate) fn write<const SIZE: usize, T>(
self,
io: &T,
io.write32(self.0, base + $offset)
}
- #[inline]
+ #[inline(always)]
pub(crate) fn alter<const SIZE: usize, T, F>(
io: &T,
base: usize,