MCPcopy Create free account
hub / github.com/SharpCoder/teensycore / usb_get_queuehead

Function usb_get_queuehead

src/phys/usb.rs:94–103  ·  view source on GitHub ↗

Retrieve the specific queue head based on endpoint and direction. Returns a mutable UsbEndpointQueueHead.

(endpoint: usize, tx: bool)

Source from the content-addressed store, hash-verified

92///
93/// Returns a mutable UsbEndpointQueueHead.
94pub fn usb_get_queuehead(endpoint: usize, tx: bool) -> &'static mut UsbEndpointQueueHead {
95 unsafe {
96 let index = match tx {
97 true => endpoint * 2 + 1,
98 false => endpoint * 2,
99 };
100
101 return &mut ENDPOINT_HEADERS[index];
102 }
103}
104
105/// Boot up the usb clocks. This method
106/// takes many milliseconds to run.

Callers 4

rx_callbackFunction · 0.85
usb_setup_endpointFunction · 0.85
schedule_transferFunction · 0.85
handle_usb_irqFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected