#[doc = "Register `CAN_TDT0R` reader"]
pub type R = crate::R<CanTdt0rSpec>;
#[doc = "Register `CAN_TDT0R` writer"]
pub type W = crate::W<CanTdt0rSpec>;
#[doc = "Field `DLC` reader - DLC"]
pub type DlcR = crate::FieldReader;
#[doc = "Field `DLC` writer - DLC"]
pub type DlcW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
#[doc = "Field `TGT` reader - TGT"]
pub type TgtR = crate::BitReader;
#[doc = "Field `TGT` writer - TGT"]
pub type TgtW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TIME` reader - TIME"]
pub type TimeR = crate::FieldReader<u16>;
#[doc = "Field `TIME` writer - TIME"]
pub type TimeW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
    #[doc = "Bits 0:3 - DLC"]
    #[inline(always)]
    pub fn dlc(&self) -> DlcR {
        DlcR::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bit 8 - TGT"]
    #[inline(always)]
    pub fn tgt(&self) -> TgtR {
        TgtR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bits 16:31 - TIME"]
    #[inline(always)]
    pub fn time(&self) -> TimeR {
        TimeR::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
impl W {
    #[doc = "Bits 0:3 - DLC"]
    #[inline(always)]
    pub fn dlc(&mut self) -> DlcW<'_, CanTdt0rSpec> {
        DlcW::new(self, 0)
    }
    #[doc = "Bit 8 - TGT"]
    #[inline(always)]
    pub fn tgt(&mut self) -> TgtW<'_, CanTdt0rSpec> {
        TgtW::new(self, 8)
    }
    #[doc = "Bits 16:31 - TIME"]
    #[inline(always)]
    pub fn time(&mut self) -> TimeW<'_, CanTdt0rSpec> {
        TimeW::new(self, 16)
    }
}
#[doc = "CAN_TDT0R\n\nYou can [`read`](crate::Reg::read) this register and get [`can_tdt0r::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`can_tdt0r::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CanTdt0rSpec;
impl crate::RegisterSpec for CanTdt0rSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`can_tdt0r::R`](R) reader structure"]
impl crate::Readable for CanTdt0rSpec {}
#[doc = "`write(|w| ..)` method takes [`can_tdt0r::W`](W) writer structure"]
impl crate::Writable for CanTdt0rSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets CAN_TDT0R to value 0"]
impl crate::Resettable for CanTdt0rSpec {}
