projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de363e4
)
common: Wrap USB_VcomDeinit() in usb_serial::shutdown().
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 8 Jul 2019 19:06:01 +0000
(21:06 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000
(20:38 +0100)
src/common/usb_serial.rs
patch
|
blob
|
history
diff --git
a/src/common/usb_serial.rs
b/src/common/usb_serial.rs
index 6a7cd173b0fc09e51e04021e7a32604170914bbe..cce12e3da405d160287eb8f460ebdd0c4010d2e1 100644
(file)
--- a/
src/common/usb_serial.rs
+++ b/
src/common/usb_serial.rs
@@
-26,12
+26,17
@@
use clock;
extern {
fn USB_VcomInit(vid: u16, pid: u16);
+ fn USB_VcomDeinit();
}
pub unsafe fn init(vid: u16, pid: u16) {
USB_VcomInit(vid, pid);
}
+pub unsafe fn shutdown() {
+ USB_VcomDeinit();
+}
+
#[no_mangle]
#[allow(non_snake_case)]
pub unsafe extern fn USB_DeviceIsrEnable()