mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Fixed build for F7.
This commit is contained in:
parent
39a38fd951
commit
24bbb524f6
3 changed files with 13 additions and 4 deletions
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "drivers/serial.h"
|
||||
|
||||
#include "vcp_hal/usbd_cdc_interface.h"
|
||||
|
||||
typedef struct {
|
||||
serialPort_t port;
|
||||
|
||||
|
@ -32,6 +34,8 @@ typedef struct {
|
|||
bool buffering;
|
||||
} vcpPort_t;
|
||||
|
||||
extern USBD_HandleTypeDef USBD_Device;
|
||||
|
||||
serialPort_t *usbVcpOpen(void);
|
||||
struct serialPort_s;
|
||||
uint32_t usbVcpGetBaudRate(struct serialPort_s *instance);
|
||||
|
|
|
@ -29,12 +29,15 @@
|
|||
#include "rx/rx.h"
|
||||
|
||||
//TODO: Make it platform independent in the future
|
||||
#ifdef STM32F4
|
||||
#if defined(STM32F4)
|
||||
#include "vcpf4/usbd_cdc_vcp.h"
|
||||
|
||||
#include "usbd_hid_core.h"
|
||||
#elif defined(STM32F7)
|
||||
#include "usbd_cdc_interface.h"
|
||||
#include "usbd_def.h"
|
||||
#include "drivers/serial_usb_vcp.h"
|
||||
|
||||
#include "vcp_hal/usbd_cdc_interface.h"
|
||||
|
||||
#include "usbd_hid.h"
|
||||
#endif
|
||||
|
||||
|
@ -67,7 +70,7 @@ void sendRcDataToHid(void)
|
|||
report[i] = -report[i];
|
||||
}
|
||||
}
|
||||
#ifdef STM32F4
|
||||
#if defined(STM32F4)
|
||||
USBD_HID_SendReport(&USB_OTG_dev, (uint8_t*)report, sizeof(report));
|
||||
#elif defined(STM32F7)
|
||||
USBD_HID_SendReport(&USBD_Device, (uint8_t*)report, sizeof(report));
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
#include "usbd_cdc.h"
|
||||
#include "usbd_cdc_interface.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
#include "drivers/serial_usb_vcp.h"
|
||||
#include "drivers/time.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue