From: Tilman Sauerbeck Date: Mon, 8 Jul 2019 19:06:01 +0000 (+0200) Subject: common: Wrap USB_VcomDeinit() in usb_serial::shutdown(). X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=29fee1b4244b310c437cfe3013a85ccb3615ccc8;p=gps-watch.git common: Wrap USB_VcomDeinit() in usb_serial::shutdown(). --- 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()