s32k118.rs/src/dma/tcd0_doff.rs
Sean Cross 96cd7368a2 s32k118: rewrite everything for s32k118
Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-07 18:24:29 +08:00

41 lines
1.1 KiB
Rust

#[doc = "Reader of register TCD0_DOFF"]
pub type R = crate::R<u16, super::TCD0_DOFF>;
#[doc = "Writer for register TCD0_DOFF"]
pub type W = crate::W<u16, super::TCD0_DOFF>;
#[doc = "Register TCD0_DOFF `reset()`'s with value 0"]
impl crate::ResetValue for super::TCD0_DOFF {
type Type = u16;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `DOFF`"]
pub type DOFF_R = crate::R<u16, u16>;
#[doc = "Write proxy for field `DOFF`"]
pub struct DOFF_W<'a> {
w: &'a mut W,
}
impl<'a> DOFF_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u16) -> &'a mut W {
self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff);
self.w
}
}
impl R {
#[doc = "Bits 0:15 - Destination Address Signed Offset"]
#[inline(always)]
pub fn doff(&self) -> DOFF_R {
DOFF_R::new((self.bits & 0xffff) as u16)
}
}
impl W {
#[doc = "Bits 0:15 - Destination Address Signed Offset"]
#[inline(always)]
pub fn doff(&mut self) -> DOFF_W {
DOFF_W { w: self }
}
}