Generated from stm32-data d8716bffb5dee286c8337b3c4383fa78197de7d7

This commit is contained in:
guangzong 2024-04-14 14:46:25 -04:00
parent b7893e7c7a
commit bacbbc5200
Signed by: guangzong
GPG Key ID: 095389BACAE97D19
3 changed files with 32 additions and 8 deletions

View File

@ -950,19 +950,25 @@
"name": "XFRSIZ", "name": "XFRSIZ",
"description": "XFRSIZ.", "description": "XFRSIZ.",
"bit_offset": 0, "bit_offset": 0,
"bit_size": 7 "bit_size": 19
}, },
{ {
"name": "PKTCNT", "name": "PKTCNT",
"description": "PKTCNT.", "description": "PKTCNT.",
"bit_offset": 19, "bit_offset": 19,
"bit_size": 1 "bit_size": 10
}, },
{ {
"name": "STUPCNT", "name": "STUPCNT",
"description": "STUPCNT.", "description": "STUPCNT.",
"bit_offset": 29, "bit_offset": 29,
"bit_size": 2 "bit_size": 2
},
{
"name": "RXDPID",
"description": "RXDPID.",
"bit_offset": 29,
"bit_size": 2
} }
] ]
}, },

View File

@ -526,13 +526,17 @@ fn default () -> Doepmsk { Doepmsk (0) } } # [doc = "The application must modify
# [derive (Copy , Clone , Eq , PartialEq)] # [derive (Copy , Clone , Eq , PartialEq)]
pub struct Doeptsiz (pub u32) ; impl Doeptsiz { # [doc = "XFRSIZ."] pub struct Doeptsiz (pub u32) ; impl Doeptsiz { # [doc = "XFRSIZ."]
# [inline (always)] # [inline (always)]
pub const fn xfrsiz (& self) -> u8 { let val = (self . 0 >> 0usize) & 0x7f ; val as u8 } # [doc = "XFRSIZ."] pub const fn xfrsiz (& self) -> u32 { let val = (self . 0 >> 0usize) & 0x0007_ffff ; val as u32 } # [doc = "XFRSIZ."]
# [inline (always)] # [inline (always)]
pub fn set_xfrsiz (& mut self , val : u8) { self . 0 = (self . 0 & ! (0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize) ; } # [doc = "PKTCNT."] pub fn set_xfrsiz (& mut self , val : u32) { self . 0 = (self . 0 & ! (0x0007_ffff << 0usize)) | (((val as u32) & 0x0007_ffff) << 0usize) ; } # [doc = "PKTCNT."]
# [inline (always)] # [inline (always)]
pub const fn pktcnt (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "PKTCNT."] pub const fn pktcnt (& self) -> u16 { let val = (self . 0 >> 19usize) & 0x03ff ; val as u16 } # [doc = "PKTCNT."]
# [inline (always)] # [inline (always)]
pub fn set_pktcnt (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "STUPCNT."] pub fn set_pktcnt (& mut self , val : u16) { self . 0 = (self . 0 & ! (0x03ff << 19usize)) | (((val as u32) & 0x03ff) << 19usize) ; } # [doc = "RXDPID."]
# [inline (always)]
pub const fn rxdpid (& self) -> u8 { let val = (self . 0 >> 29usize) & 0x03 ; val as u8 } # [doc = "RXDPID."]
# [inline (always)]
pub fn set_rxdpid (& mut self , val : u8) { self . 0 = (self . 0 & ! (0x03 << 29usize)) | (((val as u32) & 0x03) << 29usize) ; } # [doc = "STUPCNT."]
# [inline (always)] # [inline (always)]
pub const fn stupcnt (& self) -> u8 { let val = (self . 0 >> 29usize) & 0x03 ; val as u8 } # [doc = "STUPCNT."] pub const fn stupcnt (& self) -> u8 { let val = (self . 0 >> 29usize) & 0x03 ; val as u8 } # [doc = "STUPCNT."]
# [inline (always)] # [inline (always)]

View File

@ -2292,7 +2292,7 @@
offset: 0, offset: 0,
}, },
), ),
bit_size: 7, bit_size: 19,
array: None, array: None,
enumm: None, enumm: None,
}, },
@ -2306,7 +2306,21 @@
offset: 19, offset: 19,
}, },
), ),
bit_size: 1, bit_size: 10,
array: None,
enumm: None,
},
Field {
name: "rxdpid",
description: Some(
"RXDPID.",
),
bit_offset: BitOffset::Regular(
RegularBitOffset {
offset: 29,
},
),
bit_size: 2,
array: None, array: None,
enumm: None, enumm: None,
}, },