Retrieve the specific queue head based on endpoint and direction. Returns a mutable UsbEndpointQueueHead.
(endpoint: usize, tx: bool)
| 92 | /// |
| 93 | /// Returns a mutable UsbEndpointQueueHead. |
| 94 | pub 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. |
no outgoing calls
no test coverage detected