-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usbfs: add support for the USBFS peripheral
Adds support for the USB full speed device peripheral. Implements the `Device` function using the [usb-device](https://github.com/rust-embedded-community/usb-device) crate. Creates a new `usbfs` module to allow for adding the `OTG` and `Host` functions in later work.
- Loading branch information
Showing
4 changed files
with
1,203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,5 @@ pub mod signature; | |
pub mod spi; | ||
pub mod time; | ||
pub mod timer; | ||
pub mod usbfs; | ||
pub mod watchdog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//! USB full-speed | ||
pub mod device; | ||
|
||
/// Settings for port speed. | ||
/// | ||
/// In Host mode, either setting is acceptable. | ||
/// | ||
/// In Device mode, port speed is fixed to full-speed. | ||
#[repr(u8)] | ||
#[derive(Clone, Copy, Debug, PartialEq)] | ||
pub enum PortSpeed { | ||
FullSpeedHost = 0b01, | ||
LowSpeedHost = 0b10, | ||
FullSpeedDevice = 0b11, | ||
} |
Oops, something went wrong.