1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#![no_std]
#[cfg(all(feature = "fs", feature = "hs"))]
compile_error!("choose only one USB mode");
#[cfg(not(any(feature = "fs", feature ="hs")))]
compile_error!("select USB mode feature (fs/hs)");
mod endpoint;
mod endpoint_memory;
mod target;
pub mod bus;
pub use crate::bus::UsbBus;
mod ral;
mod transition;
pub unsafe trait UsbPeripheral: Send + Sync {
const REGISTERS: *const ();
const HIGH_SPEED: bool;
const FIFO_DEPTH_WORDS: usize;
const ENDPOINT_COUNT: usize;
fn enable();
fn ahb_frequency_hz(&self) -> u32;
}