mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
hid+vcp: change default USB descriptor to HID+VCP
Now that we have a USB descriptor for HID+VCP that works on Ubuntu 11.10, MacOS 10.7.3, Win7-SP1-32bit, WinXP-SP3-32bit, Win7-SP1-64bit. VCP will is known to not work on WinXP without service pack 3.
This commit is contained in:
parent
4968df183a
commit
41d4ba4b1a
2
Makefile
2
Makefile
@ -229,7 +229,7 @@ openocd_install: openocd_clean
|
||||
$(V1) mkdir -p "$(OPENOCD_DIR)"
|
||||
$(V1) ( \
|
||||
cd $(DL_DIR)/openocd-build/openocd-0.5.0 ; \
|
||||
./configure --prefix="$(OPENOCD_DIR)" --enable-ft2232_libftdi --enable-buspirate; \
|
||||
./configure --prefix="$(OPENOCD_DIR)" --enable-ft2232_libftdi ; \
|
||||
$(MAKE) ; \
|
||||
$(MAKE) install ; \
|
||||
)
|
||||
|
@ -76,7 +76,7 @@ void PIOS_Board_Init(void) {
|
||||
}
|
||||
#if defined(PIOS_INCLUDE_USB_HID) && defined(PIOS_INCLUDE_COM_MSG)
|
||||
uint32_t pios_usb_hid_id;
|
||||
if (PIOS_USB_HID_Init(&pios_usb_hid_id, &pios_usb_hid_cfg, pios_usb_id)) {
|
||||
if (PIOS_USB_HID_Init(&pios_usb_hid_id, &pios_usb_hid_without_vcp_cfg, pios_usb_id)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
if (PIOS_COM_MSG_Init(&pios_com_telem_usb_id, &pios_usb_hid_com_driver, pios_usb_hid_id)) {
|
||||
|
@ -368,7 +368,7 @@ static RESULT PIOS_USBHOOK_NoData_Setup(uint8_t RequestNo)
|
||||
switch (Type_Recipient) {
|
||||
case (CLASS_REQUEST | INTERFACE_RECIPIENT):
|
||||
switch (pInformation->USBwIndex0) {
|
||||
case 0: /* HID */
|
||||
case 2: /* HID */
|
||||
switch (RequestNo) {
|
||||
case SET_PROTOCOL:
|
||||
return PIOS_USBHOOK_SetProtocol();
|
||||
@ -378,7 +378,7 @@ static RESULT PIOS_USBHOOK_NoData_Setup(uint8_t RequestNo)
|
||||
break;
|
||||
|
||||
#if defined(PIOS_INCLUDE_USB_CDC)
|
||||
case 1: /* CDC Call Control Interface */
|
||||
case 0: /* CDC Call Control Interface */
|
||||
switch (RequestNo) {
|
||||
case SET_LINE_CODING:
|
||||
return PIOS_USB_CDC_SetLineCoding();
|
||||
|
@ -997,20 +997,21 @@ static const struct pios_usb_cfg pios_usb_main_cfg = {
|
||||
#include <pios_usb_hid_priv.h>
|
||||
|
||||
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
|
||||
.data_if = 0,
|
||||
.data_if = 2,
|
||||
.data_rx_ep = 1,
|
||||
.data_tx_ep = 1,
|
||||
};
|
||||
|
||||
#endif /* PIOS_INCLUDE_USB_HID */
|
||||
|
||||
#if defined(PIOS_INCLUDE_USB_CDC)
|
||||
#include <pios_usb_cdc_priv.h>
|
||||
|
||||
const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
|
||||
.ctrl_if = 1,
|
||||
.ctrl_if = 0,
|
||||
.ctrl_tx_ep = 2,
|
||||
|
||||
.data_if = 2,
|
||||
.data_if = 1,
|
||||
.data_rx_ep = 3,
|
||||
.data_tx_ep = 3,
|
||||
};
|
||||
|
@ -12,7 +12,7 @@
|
||||
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||
<field name="GPSSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||
<field name="ComUsbBridgeSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||
<field name="USB_DeviceType" units="descriptor" type="enum" elements="1" options="HID-only,HID+VCP,VCP-only" defaultvalue="HID-only"/>
|
||||
<field name="USB_DeviceType" units="descriptor" type="enum" elements="1" options="HID-only,HID+VCP,VCP-only" defaultvalue="HID+VCP"/>
|
||||
<field name="USB_HIDPort" units="function" type="enum" elements="1" options="USBTelemetry,Disabled" defaultvalue="USBTelemetry"/>
|
||||
<field name="USB_VCPPort" units="function" type="enum" elements="1" options="USBTelemetry,ComBridge,Disabled" defaultvalue="Disabled"/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user