X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fcommon%2Fvirtual_com.c;h=cc388c704778aa037805d3fb01ffd56428a7f6e9;hb=b0ba131fbae07787bcac2149464eebb0c6272aa3;hp=207ff69247942624c4b776c989dc1a501a8c14d8;hpb=3fd53fa6607064ad6a7a3cf5d869729fa1fc65b5;p=gps-watch.git diff --git a/src/common/virtual_com.c b/src/common/virtual_com.c index 207ff69..cc388c7 100644 --- a/src/common/virtual_com.c +++ b/src/common/virtual_com.c @@ -59,6 +59,7 @@ /* Provided by users. */ extern void USB_DeviceClockInit(void); extern void USB_DeviceIsrEnable(void); +extern void USB_DeviceIsrDisable(void); /******************************************************************************* * Definitions ******************************************************************************/ @@ -102,8 +103,8 @@ static usb_cdc_acm_info_t s_usbCdcAcmInfo = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, /* Data buffer for receiving and sending*/ static uint8_t s_currRecvBuf[DATA_BUFF_SIZE]; -volatile static uint32_t s_recvSize = 0; -volatile static uint8_t s_sendComplete = 0; +static volatile uint32_t s_recvSize = 0; +static volatile uint8_t s_sendComplete = 0; static uint32_t s_usbBulkMaxPacketSize = FS_CDC_VCOM_BULK_OUT_PACKET_SIZE; /******************************************************************************* * Prototypes @@ -669,6 +670,8 @@ USB_VcomDeinit (void) USB_DeviceDeinit (s_cdcVcom.deviceHandle); s_cdcVcom.deviceHandle = NULL; + USB_DeviceIsrDisable(); + /* XXX: We are not stopping the USBOTG clock yet. */ }