d1_pac/tcon_lcd0/
lcd_cpu_tri1.rs1#[doc = "Register `lcd_cpu_tri1` reader"]
2pub type R = crate::R<LCD_CPU_TRI1_SPEC>;
3#[doc = "Register `lcd_cpu_tri1` writer"]
4pub type W = crate::W<LCD_CPU_TRI1_SPEC>;
5#[doc = "Field `block_num` reader - The number of data blocks. It is usually set as Y."]
6pub type BLOCK_NUM_R = crate::FieldReader<u16>;
7#[doc = "Field `block_num` writer - The number of data blocks. It is usually set as Y."]
8pub type BLOCK_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `block_current_num` reader - Shows the current data block transmitting to panel."]
10pub type BLOCK_CURRENT_NUM_R = crate::FieldReader<u16>;
11impl R {
12 #[doc = "Bits 0:15 - The number of data blocks. It is usually set as Y."]
13 #[inline(always)]
14 pub fn block_num(&self) -> BLOCK_NUM_R {
15 BLOCK_NUM_R::new((self.bits & 0xffff) as u16)
16 }
17 #[doc = "Bits 16:31 - Shows the current data block transmitting to panel."]
18 #[inline(always)]
19 pub fn block_current_num(&self) -> BLOCK_CURRENT_NUM_R {
20 BLOCK_CURRENT_NUM_R::new(((self.bits >> 16) & 0xffff) as u16)
21 }
22}
23impl W {
24 #[doc = "Bits 0:15 - The number of data blocks. It is usually set as Y."]
25 #[inline(always)]
26 #[must_use]
27 pub fn block_num(&mut self) -> BLOCK_NUM_W<LCD_CPU_TRI1_SPEC> {
28 BLOCK_NUM_W::new(self, 0)
29 }
30 #[doc = r" Writes raw bits to the register."]
31 #[doc = r""]
32 #[doc = r" # Safety"]
33 #[doc = r""]
34 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
35 #[inline(always)]
36 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
37 self.bits = bits;
38 self
39 }
40}
41#[doc = "LCD CPU Panel Trigger Register1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`lcd_cpu_tri1::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`lcd_cpu_tri1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
42pub struct LCD_CPU_TRI1_SPEC;
43impl crate::RegisterSpec for LCD_CPU_TRI1_SPEC {
44 type Ux = u32;
45}
46#[doc = "`read()` method returns [`lcd_cpu_tri1::R`](R) reader structure"]
47impl crate::Readable for LCD_CPU_TRI1_SPEC {}
48#[doc = "`write(|w| ..)` method takes [`lcd_cpu_tri1::W`](W) writer structure"]
49impl crate::Writable for LCD_CPU_TRI1_SPEC {
50 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
51 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
52}
53#[doc = "`reset()` method sets lcd_cpu_tri1 to value 0"]
54impl crate::Resettable for LCD_CPU_TRI1_SPEC {
55 const RESET_VALUE: Self::Ux = 0;
56}