common: Wrap USB_VcomDeinit() in usb_serial::shutdown().
authorTilman Sauerbeck <tilman@code-monkey.de>
Mon, 8 Jul 2019 19:06:01 +0000 (21:06 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000 (20:38 +0100)
src/common/usb_serial.rs

index 6a7cd173b0fc09e51e04021e7a32604170914bbe..cce12e3da405d160287eb8f460ebdd0c4010d2e1 100644 (file)
@@ -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()