Merge pull request #2163 from AndersHoglund/usb_vcp_f1_only

USB VCP Interrupt fix only for STM32F10X, problem on DOGE fixed.
This commit is contained in:
borisbstyle 2017-01-19 17:23:06 +01:00 committed by GitHub
commit cdce6d59fe
3 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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*/