mk66f18/usbhs/
burstsize.rs1#[doc = "Reader of register BURSTSIZE"]
2pub type R = crate::R<u32, super::BURSTSIZE>;
3#[doc = "Writer for register BURSTSIZE"]
4pub type W = crate::W<u32, super::BURSTSIZE>;
5#[doc = "Register BURSTSIZE `reset()`'s with value 0x0808"]
6impl crate::ResetValue for super::BURSTSIZE {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x0808
11 }
12}
13#[doc = "Reader of field `RXPBURST`"]
14pub type RXPBURST_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `RXPBURST`"]
16pub struct RXPBURST_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> RXPBURST_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
24 self.w
25 }
26}
27#[doc = "Reader of field `TXPBURST`"]
28pub type TXPBURST_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `TXPBURST`"]
30pub struct TXPBURST_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> TXPBURST_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
38 self.w
39 }
40}
41impl R {
42 #[doc = "Bits 0:7 - Programable RX Burst length"]
43 #[inline(always)]
44 pub fn rxpburst(&self) -> RXPBURST_R {
45 RXPBURST_R::new((self.bits & 0xff) as u8)
46 }
47 #[doc = "Bits 8:15 - Programable TX Burst length"]
48 #[inline(always)]
49 pub fn txpburst(&self) -> TXPBURST_R {
50 TXPBURST_R::new(((self.bits >> 8) & 0xff) as u8)
51 }
52}
53impl W {
54 #[doc = "Bits 0:7 - Programable RX Burst length"]
55 #[inline(always)]
56 pub fn rxpburst(&mut self) -> RXPBURST_W {
57 RXPBURST_W { w: self }
58 }
59 #[doc = "Bits 8:15 - Programable TX Burst length"]
60 #[inline(always)]
61 pub fn txpburst(&mut self) -> TXPBURST_W {
62 TXPBURST_W { w: self }
63 }
64}