Reverted descriptor changes pending HID restructuring

This commit is contained in:
Hierophect 2019-09-04 13:58:18 -04:00
parent e490e6361f
commit 479b047618
3 changed files with 6 additions and 10 deletions

View File

@ -37,8 +37,8 @@ I2C_HandleTypeDef hi2c2;
void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
const mcu_pin_obj_t* scl, const mcu_pin_obj_t* sda, uint32_t frequency, uint32_t timeout) {
//TODO: Rework this entire section to use LL, alongside MSP removal
//TODO: Rework this entire section to use LL so we can properly assign pins
// This will also be bundled with MSP removal
hi2c2.Instance = I2C1;
hi2c2.Init.ClockSpeed = 100000;
hi2c2.Init.DutyCycle = I2C_DUTYCYCLE_2;

View File

@ -104,8 +104,7 @@ autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile
--pid $(USB_PID)\
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h\
--cdc_and_msc_only $(USB_CDC_AND_MSC_ONLY)
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"

View File

@ -21,7 +21,6 @@ parser.add_argument('--serial_number_length', type=int, default=32,
help='length needed for the serial number in digits')
parser.add_argument('--output_c_file', type=argparse.FileType('w'), required=True)
parser.add_argument('--output_h_file', type=argparse.FileType('w'), required=True)
parser.add_argument('--cdc_and_msc_only', nargs='?',const=0, type=int)
args = parser.parse_args()
@ -132,7 +131,7 @@ msc_interfaces = [
bInterval=0),
standard.EndpointDescriptor(
description="MSC out",
bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT,
bEndpointAddress=0x1 | standard.EndpointDescriptor.DIRECTION_OUT,
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
bInterval=0)
]
@ -277,16 +276,14 @@ descriptor_list.extend(cdc_interfaces)
descriptor_list.extend(msc_interfaces)
# Only add the control interface because other audio interfaces are managed by it to ensure the
# correct ordering.
if not args.cdc_and_msc_only:
descriptor_list.append(audio_control_interface)
descriptor_list.append(audio_control_interface)
# Put the CDC IAD just before the CDC interfaces.
# There appears to be a bug in the Windows composite USB driver that requests the
# HID report descriptor with the wrong interface number if the HID interface is not given
# first. However, it still fetches the descriptor anyway. We could reorder the interfaces but
# the Windows 7 Adafruit_usbser.inf file thinks CDC is at Interface 0, so we'll leave it
# there for backwards compatibility.
if not args.cdc_and_msc_only:
descriptor_list.extend(hid_interfaces)
descriptor_list.extend(hid_interfaces)
configuration = standard.ConfigurationDescriptor(
description="Composite configuration",