mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Use static definition for ClassData to support USB MSC DMA on G4
This commit is contained in:
parent
86aa5cc84e
commit
f39467c396
4 changed files with 14 additions and 34 deletions
|
@ -281,17 +281,8 @@ static DMA_DATA_ZERO_INIT USBD_MSC_BOT_HandleTypeDef ClassData;
|
|||
uint8_t USBD_MSC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||
{
|
||||
UNUSED(cfgidx);
|
||||
USBD_MSC_BOT_HandleTypeDef *hmsc;
|
||||
|
||||
hmsc = &ClassData;
|
||||
|
||||
if (hmsc == NULL)
|
||||
{
|
||||
pdev->pMSC_ClassData = NULL;
|
||||
return (uint8_t)USBD_EMEM;
|
||||
}
|
||||
|
||||
pdev->pMSC_ClassData = (void *)hmsc;
|
||||
pdev->pMSC_ClassData = (void *)&ClassData;
|
||||
|
||||
if (pdev->dev_speed == USBD_SPEED_HIGH)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue