projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Add the shell module.
[gps-watch.git]
/
src
/
common
/
virtual_com.c
diff --git
a/src/common/virtual_com.c
b/src/common/virtual_com.c
index 9b40b50d721c18d18b1880ca8b0706ffdf12acf7..cc388c704778aa037805d3fb01ffd56428a7f6e9 100644
(file)
--- 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);
/* Provided by users. */
extern void USB_DeviceClockInit(void);
extern void USB_DeviceIsrEnable(void);
+extern void USB_DeviceIsrDisable(void);
/*******************************************************************************
* Definitions
******************************************************************************/
/*******************************************************************************
* Definitions
******************************************************************************/
@@
-102,9
+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];
/* Data buffer for receiving and sending*/
static uint8_t s_currRecvBuf[DATA_BUFF_SIZE];
-volatile static uint32_t s_recvSize = 0;
-volatile static uint32_t s_sendSize = 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
static uint32_t s_usbBulkMaxPacketSize = FS_CDC_VCOM_BULK_OUT_PACKET_SIZE;
/*******************************************************************************
* Prototypes
@@
-670,6
+670,8
@@
USB_VcomDeinit (void)
USB_DeviceDeinit (s_cdcVcom.deviceHandle);
s_cdcVcom.deviceHandle = NULL;
USB_DeviceDeinit (s_cdcVcom.deviceHandle);
s_cdcVcom.deviceHandle = NULL;
+ USB_DeviceIsrDisable();
+
/* XXX: We are not stopping the USBOTG clock yet. */
}
/* XXX: We are not stopping the USBOTG clock yet. */
}