stm32g4/stm32g484/fmac/
ybufcfg.rs1pub type R = crate::R<YBUFCFGrs>;
3pub type W = crate::W<YBUFCFGrs>;
5pub type Y_BASE_R = crate::FieldReader;
7pub type Y_BASE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9pub type Y_BUF_SIZE_R = crate::FieldReader;
11pub type Y_BUF_SIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13pub type EMPTY_WM_R = crate::FieldReader;
15pub type EMPTY_WM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17impl R {
18 #[inline(always)]
20 pub fn y_base(&self) -> Y_BASE_R {
21 Y_BASE_R::new((self.bits & 0xff) as u8)
22 }
23 #[inline(always)]
25 pub fn y_buf_size(&self) -> Y_BUF_SIZE_R {
26 Y_BUF_SIZE_R::new(((self.bits >> 8) & 0xff) as u8)
27 }
28 #[inline(always)]
30 pub fn empty_wm(&self) -> EMPTY_WM_R {
31 EMPTY_WM_R::new(((self.bits >> 24) & 3) as u8)
32 }
33}
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("YBUFCFG")
37 .field("y_base", &self.y_base())
38 .field("y_buf_size", &self.y_buf_size())
39 .field("empty_wm", &self.empty_wm())
40 .finish()
41 }
42}
43impl W {
44 #[inline(always)]
46 pub fn y_base(&mut self) -> Y_BASE_W<YBUFCFGrs> {
47 Y_BASE_W::new(self, 0)
48 }
49 #[inline(always)]
51 pub fn y_buf_size(&mut self) -> Y_BUF_SIZE_W<YBUFCFGrs> {
52 Y_BUF_SIZE_W::new(self, 8)
53 }
54 #[inline(always)]
56 pub fn empty_wm(&mut self) -> EMPTY_WM_W<YBUFCFGrs> {
57 EMPTY_WM_W::new(self, 24)
58 }
59}
60pub struct YBUFCFGrs;
66impl crate::RegisterSpec for YBUFCFGrs {
67 type Ux = u32;
68}
69impl crate::Readable for YBUFCFGrs {}
71impl crate::Writable for YBUFCFGrs {
73 type Safety = crate::Unsafe;
74}
75impl crate::Resettable for YBUFCFGrs {}