1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

f4 usb: ensure correct interface numbers for BL and FW

The interface numbers differ for the HID interface between
the BL and FW.  This is required to keep windows happy.

In HID+CDC, the CDC interfaces must come first with HID last
which makes it #2.  In HID only mode, we can't use #2 for HID
since windows doesn't like the first/only interface to be
anything other than #0.

Conflicts:
	flight/targets/board_hw_defs/discoveryf4/board_hw_defs.c
	flight/targets/board_hw_defs/flyingf4/board_hw_defs.c
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
This commit is contained in:
Stacey Sheldon 2013-03-16 23:42:59 -04:00 committed by Alessio Morale
parent 2165a5afe1
commit 565de5fd4e
2 changed files with 25 additions and 9 deletions

View File

@ -1888,17 +1888,17 @@ const struct pios_usb_cfg * PIOS_BOARD_HW_DEFS_GetUsbCfg (uint32_t board_revisio
#endif /* PIOS_INCLUDE_COM_MSG */
#if defined(PIOS_INCLUDE_USB_HID)
#if defined(PIOS_INCLUDE_USB_HID) && !defined(PIOS_INCLUDE_USB_CDC)
#include <pios_usb_hid_priv.h>
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_if = 2,
.data_if = 0,
.data_rx_ep = 1,
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID */
#endif /* PIOS_INCLUDE_USB_HID && !PIOS_INCLUDE_USB_CDC */
#if defined(PIOS_INCLUDE_USB_CDC)
#if defined(PIOS_INCLUDE_USB_HID) && defined(PIOS_INCLUDE_USB_CDC)
#include <pios_usb_cdc_priv.h>
const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
@ -1909,4 +1909,12 @@ const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
.data_rx_ep = 3,
.data_tx_ep = 3,
};
#endif /* PIOS_INCLUDE_USB_CDC */
#include <pios_usb_hid_priv.h>
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_if = 2,
.data_rx_ep = 1,
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID && PIOS_INCLUDE_USB_CDC */

View File

@ -2019,7 +2019,7 @@ static const struct pios_usb_cfg pios_usb_main_cfg = {
#endif /* PIOS_INCLUDE_COM_MSG */
#if defined(PIOS_INCLUDE_USB_HID)
#if defined(PIOS_INCLUDE_USB_HID) && !defined(PIOS_INCLUDE_USB_CDC)
#include <pios_usb_hid_priv.h>
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
@ -2027,9 +2027,9 @@ const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_rx_ep = 1,
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID */
#endif /* PIOS_INCLUDE_USB_HID && !PIOS_INCLUDE_USB_CDC */
#if defined(PIOS_INCLUDE_USB_CDC)
#if defined(PIOS_INCLUDE_USB_HID) && defined(PIOS_INCLUDE_USB_CDC)
#include <pios_usb_cdc_priv.h>
const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
@ -2040,4 +2040,12 @@ const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
.data_rx_ep = 3,
.data_tx_ep = 3,
};
#endif /* PIOS_INCLUDE_USB_CDC */
#include <pios_usb_hid_priv.h>
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_if = 2,
.data_rx_ep = 1,
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID && PIOS_INCLUDE_USB_CDC */