1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Add Composite CDC+HID device option. (#5478)

* Add Composite CDC+HID device option.

- It passes on though HID interface 8 channels received from TX
- Endpoints are reconfigured to support HID interface
- Potentially this can slow down SPI Flash transfer though CDC interface...
- This could be addressed by support for MSC when using SPI Flash (emulating FATFS)

* Different way to handle MIN redefine
This commit is contained in:
conkerkh 2018-03-22 03:21:22 +01:00 committed by Michael Keller
parent b2e807be6c
commit 4786e1a333
11 changed files with 1209 additions and 7 deletions

View file

@ -93,12 +93,18 @@ USBMSC_DIR = $(ROOT)/lib/main/STM32_USB_Device_Library/Class/msc
USBMSC_SRC = $(notdir $(wildcard $(USBMSC_DIR)/src/*.c))
EXCLUDES = usbd_storage_template.c
USBMSC_SRC := $(filter-out ${EXCLUDES}, $(USBMSC_SRC))
VPATH := $(VPATH):$(USBOTG_DIR)/src:$(USBCORE_DIR)/src:$(USBCDC_DIR)/src:$(USBMSC_DIR)/src
USBHID_DIR = $(ROOT)/lib/main/STM32_USB_Device_Library/Class/hid
USBHID_SRC = $(notdir $(wildcard $(USBHID_DIR)/src/*.c))
USBWRAPPER_DIR = $(ROOT)/lib/main/STM32_USB_Device_Library/Class/hid_cdc_wrapper
USBWRAPPER_SRC = $(notdir $(wildcard $(USBWRAPPER_DIR)/src/*.c))
VPATH := $(VPATH):$(USBOTG_DIR)/src:$(USBCORE_DIR)/src:$(USBCDC_DIR)/src:$(USBMSC_DIR)/src:$(USBHID_DIR)/src:$(USBWRAPPER_DIR)/src
DEVICE_STDPERIPH_SRC := $(STDPERIPH_SRC) \
$(USBOTG_SRC) \
$(USBCORE_SRC) \
$(USBCDC_SRC) \
$(USBHID_SRC) \
$(USBWRAPPER_SRC) \
$(USBMSC_SRC)
endif
@ -122,6 +128,8 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \
$(USBOTG_DIR)/inc \
$(USBCORE_DIR)/inc \
$(USBCDC_DIR)/inc \
$(USBHID_DIR)/inc \
$(USBWRAPPER_DIR)/inc \
$(USBMSC_DIR)/inc \
$(USBFS_DIR)/inc \
$(CMSIS_DIR)/Core/Include \