ra4m1/sci2/
tdrhl.rs

1#[doc = "Register `TDRHL` reader"]
2pub struct R(crate::R<TDRHL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TDRHL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TDRHL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TDRHL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `TDRHL` writer"]
17pub struct W(crate::W<TDRHL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<TDRHL_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<TDRHL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<TDRHL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `TDRHL` writer - TDRHL is a 16-bit register that stores transmit data."]
38pub type TDRHL_W<'a, const O: u8> = crate::FieldWriter<'a, u16, TDRHL_SPEC, u16, u16, 16, O>;
39impl W {
40    #[doc = "Bits 0:15 - TDRHL is a 16-bit register that stores transmit data."]
41    #[inline(always)]
42    #[must_use]
43    pub fn tdrhl(&mut self) -> TDRHL_W<0> {
44        TDRHL_W::new(self)
45    }
46    #[doc = "Writes raw bits to the register."]
47    #[inline(always)]
48    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
49        self.0.bits(bits);
50        self
51    }
52}
53#[doc = "Transmit 9-bit Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tdrhl](index.html) module"]
54pub struct TDRHL_SPEC;
55impl crate::RegisterSpec for TDRHL_SPEC {
56    type Ux = u16;
57}
58#[doc = "`read()` method returns [tdrhl::R](R) reader structure"]
59impl crate::Readable for TDRHL_SPEC {
60    type Reader = R;
61}
62#[doc = "`write(|w| ..)` method takes [tdrhl::W](W) writer structure"]
63impl crate::Writable for TDRHL_SPEC {
64    type Writer = W;
65    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
66    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
67}
68#[doc = "`reset()` method sets TDRHL to value 0xffff"]
69impl crate::Resettable for TDRHL_SPEC {
70    const RESET_VALUE: Self::Ux = 0xffff;
71}