max78000_pac/i2c0/
txctrl1.rs1#[doc = "Register `TXCTRL1` reader"]
2pub type R = crate::R<Txctrl1Spec>;
3#[doc = "Register `TXCTRL1` writer"]
4pub type W = crate::W<Txctrl1Spec>;
5#[doc = "Field `PRELOAD_RDY` reader - Transmit FIFO Preload Ready."]
6pub type PreloadRdyR = crate::BitReader;
7#[doc = "Field `PRELOAD_RDY` writer - Transmit FIFO Preload Ready."]
8pub type PreloadRdyW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `LVL` reader - Transmit FIFO Count. These bits reflect the number of bytes in the TX_FIFO."]
10pub type LvlR = crate::FieldReader;
11impl R {
12 #[doc = "Bit 0 - Transmit FIFO Preload Ready."]
13 #[inline(always)]
14 pub fn preload_rdy(&self) -> PreloadRdyR {
15 PreloadRdyR::new((self.bits & 1) != 0)
16 }
17 #[doc = "Bits 8:11 - Transmit FIFO Count. These bits reflect the number of bytes in the TX_FIFO."]
18 #[inline(always)]
19 pub fn lvl(&self) -> LvlR {
20 LvlR::new(((self.bits >> 8) & 0x0f) as u8)
21 }
22}
23impl W {
24 #[doc = "Bit 0 - Transmit FIFO Preload Ready."]
25 #[inline(always)]
26 pub fn preload_rdy(&mut self) -> PreloadRdyW<Txctrl1Spec> {
27 PreloadRdyW::new(self, 0)
28 }
29}
30#[doc = "Transmit Control Register 1.\n\nYou can [`read`](crate::Reg::read) this register and get [`txctrl1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`txctrl1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
31pub struct Txctrl1Spec;
32impl crate::RegisterSpec for Txctrl1Spec {
33 type Ux = u32;
34}
35#[doc = "`read()` method returns [`txctrl1::R`](R) reader structure"]
36impl crate::Readable for Txctrl1Spec {}
37#[doc = "`write(|w| ..)` method takes [`txctrl1::W`](W) writer structure"]
38impl crate::Writable for Txctrl1Spec {
39 type Safety = crate::Unsafe;
40 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
41 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
42}
43#[doc = "`reset()` method sets TXCTRL1 to value 0"]
44impl crate::Resettable for Txctrl1Spec {
45 const RESET_VALUE: u32 = 0;
46}