Generated from stm32-data d8716bffb5dee286c8337b3c4383fa78197de7d7

This commit is contained in:
guangzong 2024-04-14 14:42:16 -04:00
parent a25021bad0
commit b7893e7c7a
Signed by: guangzong
GPG Key ID: 095389BACAE97D19
3 changed files with 30 additions and 6 deletions

View File

@ -697,12 +697,18 @@
"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": 10
},
{
"name": "MCNT",
"description": "Multi count",
"bit_offset": 29,
"bit_size": 2 "bit_size": 2
} }
] ]

View File

@ -354,13 +354,17 @@ fn default () -> Diepmsk { Diepmsk (0) } } # [doc = "The application must modify
# [derive (Copy , Clone , Eq , PartialEq)] # [derive (Copy , Clone , Eq , PartialEq)]
pub struct Dieptsiz (pub u32) ; impl Dieptsiz { # [doc = "XFRSIZ."] pub struct Dieptsiz (pub u32) ; impl Dieptsiz { # [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) -> u8 { let val = (self . 0 >> 19usize) & 0x03 ; val as u8 } # [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 : u8) { self . 0 = (self . 0 & ! (0x03 << 19usize)) | (((val as u32) & 0x03) << 19usize) ; } } impl Default for Dieptsiz { # [inline (always)] pub fn set_pktcnt (& mut self , val : u16) { self . 0 = (self . 0 & ! (0x03ff << 19usize)) | (((val as u32) & 0x03ff) << 19usize) ; } # [doc = "Multi count"]
# [inline (always)]
pub const fn mcnt (& self) -> u8 { let val = (self . 0 >> 29usize) & 0x03 ; val as u8 } # [doc = "Multi count"]
# [inline (always)]
pub fn set_mcnt (& mut self , val : u8) { self . 0 = (self . 0 & ! (0x03 << 29usize)) | (((val as u32) & 0x03) << 29usize) ; } } impl Default for Dieptsiz { # [inline (always)]
fn default () -> Dieptsiz { Dieptsiz (0) } } # [doc = "This section describes the DOEPCTL0 register."] fn default () -> Dieptsiz { Dieptsiz (0) } } # [doc = "This section describes the DOEPCTL0 register."]
# [repr (transparent)] # [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)] # [derive (Copy , Clone , Eq , PartialEq)]

View File

@ -1710,7 +1710,7 @@
offset: 0, offset: 0,
}, },
), ),
bit_size: 7, bit_size: 19,
array: None, array: None,
enumm: None, enumm: None,
}, },
@ -1724,6 +1724,20 @@
offset: 19, offset: 19,
}, },
), ),
bit_size: 10,
array: None,
enumm: None,
},
Field {
name: "mcnt",
description: Some(
"Multi count",
),
bit_offset: BitOffset::Regular(
RegularBitOffset {
offset: 29,
},
),
bit_size: 2, bit_size: 2,
array: None, array: None,
enumm: None, enumm: None,