mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
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:
commit
cdce6d59fe
3 changed files with 7 additions and 0 deletions
|
@ -217,6 +217,8 @@ void USB_Interrupts_Config(void)
|
||||||
NVIC_Init(&NVIC_InitStructure);
|
NVIC_Init(&NVIC_InitStructure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef STM32F10X
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Function Name : USB_Interrupts_Disable
|
* Function Name : USB_Interrupts_Disable
|
||||||
* Description : Disables the USB interrupts
|
* Description : Disables the USB interrupts
|
||||||
|
@ -237,6 +239,7 @@ void USB_Interrupts_Disable(void)
|
||||||
NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;
|
NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;
|
||||||
NVIC_Init(&NVIC_InitStructure);
|
NVIC_Init(&NVIC_InitStructure);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Function Name : USB_Cable_Config
|
* Function Name : USB_Cable_Config
|
||||||
|
|
|
@ -53,7 +53,9 @@ void Set_USBClock(void);
|
||||||
void Enter_LowPowerMode(void);
|
void Enter_LowPowerMode(void);
|
||||||
void Leave_LowPowerMode(void);
|
void Leave_LowPowerMode(void);
|
||||||
void USB_Interrupts_Config(void);
|
void USB_Interrupts_Config(void);
|
||||||
|
#ifdef STM32F10X
|
||||||
void USB_Interrupts_Disable(void);
|
void USB_Interrupts_Disable(void);
|
||||||
|
#endif
|
||||||
void USB_Cable_Config(FunctionalState NewState);
|
void USB_Cable_Config(FunctionalState NewState);
|
||||||
void Get_SerialNum(void);
|
void Get_SerialNum(void);
|
||||||
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength); // HJI
|
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength); // HJI
|
||||||
|
|
|
@ -87,8 +87,10 @@ ONE_DESCRIPTOR String_Descriptor[4] = { { (uint8_t*)Virtual_Com_Port_StringLangI
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void Virtual_Com_Port_init(void)
|
void Virtual_Com_Port_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef STM32F10X
|
||||||
/* Make absolutly sure interrupts are disabled. */
|
/* Make absolutly sure interrupts are disabled. */
|
||||||
USB_Interrupts_Disable();
|
USB_Interrupts_Disable();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Update the serial number string descriptor with the data from the unique
|
/* Update the serial number string descriptor with the data from the unique
|
||||||
ID*/
|
ID*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue