stm32l5/stm32l562/usb/btable.rs
1///Register `BTABLE` reader
2pub type R = crate::R<BTABLErs>;
3///Register `BTABLE` writer
4pub type W = crate::W<BTABLErs>;
5///Field `BTABLE` reader - Buffer table
6pub type BTABLE_R = crate::FieldReader<u16>;
7///Field `BTABLE` writer - Buffer table
8pub type BTABLE_W<'a, REG> = crate::FieldWriter<'a, REG, 13, u16, crate::Safe>;
9impl R {
10 ///Bits 3:15 - Buffer table
11 #[inline(always)]
12 pub fn btable(&self) -> BTABLE_R {
13 BTABLE_R::new((self.bits >> 3) & 0x1fff)
14 }
15}
16impl core::fmt::Debug for R {
17 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18 f.debug_struct("BTABLE")
19 .field("btable", &self.btable())
20 .finish()
21 }
22}
23impl W {
24 ///Bits 3:15 - Buffer table
25 #[inline(always)]
26 pub fn btable(&mut self) -> BTABLE_W<BTABLErs> {
27 BTABLE_W::new(self, 3)
28 }
29}
30/**Buffer table address
31
32You can [`read`](crate::Reg::read) this register and get [`btable::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`btable::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
33
34See register [structure](https://stm32-rs.github.io/stm32-rs/STM32L562.html#USB:BTABLE)*/
35pub struct BTABLErs;
36impl crate::RegisterSpec for BTABLErs {
37 type Ux = u16;
38}
39///`read()` method returns [`btable::R`](R) reader structure
40impl crate::Readable for BTABLErs {}
41///`write(|w| ..)` method takes [`btable::W`](W) writer structure
42impl crate::Writable for BTABLErs {
43 type Safety = crate::Unsafe;
44}
45///`reset()` method sets BTABLE to value 0
46impl crate::Resettable for BTABLErs {}