stm32f1_staging/stm32f103/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) as u16)
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").field("btable", &self.btable()).finish()
19 }
20}
21impl W {
22 ///Bits 3:15 - Buffer table
23 #[inline(always)]
24 pub fn btable(&mut self) -> BTABLE_W<BTABLErs> {
25 BTABLE_W::new(self, 3)
26 }
27}
28/**Buffer table address
29
30You 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).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F103.html#USB:BTABLE)*/
33pub struct BTABLErs;
34impl crate::RegisterSpec for BTABLErs {
35 type Ux = u32;
36}
37///`read()` method returns [`btable::R`](R) reader structure
38impl crate::Readable for BTABLErs {}
39///`write(|w| ..)` method takes [`btable::W`](W) writer structure
40impl crate::Writable for BTABLErs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets BTABLE to value 0
44impl crate::Resettable for BTABLErs {}