From 29fee1b4244b310c437cfe3013a85ccb3615ccc8 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Mon, 8 Jul 2019 21:06:01 +0200 Subject: [PATCH] common: Wrap USB_VcomDeinit() in usb_serial::shutdown(). --- src/common/usb_serial.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/usb_serial.rs b/src/common/usb_serial.rs index 6a7cd17..cce12e3 100644 --- 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() -- 2.30.2