mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
[G4] USB_HID_CDC support (untested)
This commit is contained in:
parent
de35df8e07
commit
345d26178d
2 changed files with 6 additions and 2 deletions
|
@ -39,7 +39,7 @@
|
|||
#if defined(STM32F4)
|
||||
#include "vcpf4/usbd_cdc_vcp.h"
|
||||
#include "usbd_hid_core.h"
|
||||
#elif defined(STM32F7) || defined(STM32H7)
|
||||
#elif defined(STM32F7) || defined(STM32H7) || defined(STM32G4)
|
||||
#include "drivers/serial_usb_vcp.h"
|
||||
#include "usbd_hid.h"
|
||||
#include "vcp_hal/usbd_cdc_interface.h"
|
||||
|
@ -96,7 +96,7 @@ void sendRcDataToHid(void)
|
|||
}
|
||||
#if defined(STM32F4)
|
||||
USBD_HID_SendReport(&USB_OTG_dev, (uint8_t*)report, sizeof(report));
|
||||
#elif defined(STM32F7) || defined(STM32H7)
|
||||
#elif defined(STM32F7) || defined(STM32H7) || defined(STM32G4)
|
||||
USBD_HID_SendReport(&USBD_Device, (uint8_t*)report, sizeof(report));
|
||||
#else
|
||||
# error "MCU does not support USB HID."
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
#error Unknown MCU
|
||||
#endif
|
||||
|
||||
#ifdef STM32G4
|
||||
#define USB_OTG_MAX_EP0_SIZE USB_MAX_EP0_SIZE
|
||||
#endif
|
||||
|
||||
#if (USBD_DEBUG_LEVEL > 0)
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue