mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add api to determine current speed
This commit is contained in:
parent
c5fb3f282d
commit
c79a891553
1 changed files with 2 additions and 0 deletions
|
|
@ -1630,6 +1630,8 @@ impl CorigineUsb {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_speed(&self) -> PortSpeed { PortSpeed::from_portsc(self.csr.r(PORTSC)) }
|
||||
|
||||
pub fn update_ep0_maxpacketsize(&mut self, size: usize) {
|
||||
let cmd_param = self.csr.ms(CMDPARA0_CMD1_UPDATE_EP0_MPS, size as u32);
|
||||
self.issue_command(CmdType::UpdateEp0, cmd_param, 0).expect("couldn't issue command");
|
||||
|
|
|
|||
Loading…
Reference in a new issue