diff --git a/src/main/vcp/hw_config.c b/src/main/vcp/hw_config.c index 97e8c1a988..f9ec7c32ee 100644 --- a/src/main/vcp/hw_config.c +++ b/src/main/vcp/hw_config.c @@ -217,6 +217,8 @@ void USB_Interrupts_Config(void) NVIC_Init(&NVIC_InitStructure); } +#ifdef STM32F10X + /******************************************************************************* * Function Name : USB_Interrupts_Disable * Description : Disables the USB interrupts @@ -237,6 +239,7 @@ void USB_Interrupts_Disable(void) NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE; NVIC_Init(&NVIC_InitStructure); } +#endif /******************************************************************************* * Function Name : USB_Cable_Config diff --git a/src/main/vcp/hw_config.h b/src/main/vcp/hw_config.h index 6892e0037b..66d9a83261 100644 --- a/src/main/vcp/hw_config.h +++ b/src/main/vcp/hw_config.h @@ -53,7 +53,9 @@ void Set_USBClock(void); void Enter_LowPowerMode(void); void Leave_LowPowerMode(void); void USB_Interrupts_Config(void); +#ifdef STM32F10X void USB_Interrupts_Disable(void); +#endif void USB_Cable_Config(FunctionalState NewState); void Get_SerialNum(void); uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength); // HJI diff --git a/src/main/vcp/usb_prop.c b/src/main/vcp/usb_prop.c index e8487bc2a2..be822f155a 100644 --- a/src/main/vcp/usb_prop.c +++ b/src/main/vcp/usb_prop.c @@ -87,8 +87,10 @@ ONE_DESCRIPTOR String_Descriptor[4] = { { (uint8_t*)Virtual_Com_Port_StringLangI *******************************************************************************/ void Virtual_Com_Port_init(void) { +#ifdef STM32F10X /* Make absolutly sure interrupts are disabled. */ USB_Interrupts_Disable(); +#endif /* Update the serial number string descriptor with the data from the unique ID*/