Reverted descriptor changes pending HID restructuring
This commit is contained in:
parent
e490e6361f
commit
479b047618
@ -37,8 +37,8 @@ I2C_HandleTypeDef hi2c2;
|
|||||||
|
|
||||||
void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
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) {
|
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.Instance = I2C1;
|
||||||
hi2c2.Init.ClockSpeed = 100000;
|
hi2c2.Init.ClockSpeed = 100000;
|
||||||
hi2c2.Init.DutyCycle = I2C_DUTYCYCLE_2;
|
hi2c2.Init.DutyCycle = I2C_DUTYCYCLE_2;
|
||||||
|
@ -104,8 +104,7 @@ autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile
|
|||||||
--pid $(USB_PID)\
|
--pid $(USB_PID)\
|
||||||
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
|
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
|
||||||
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
|
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
|
||||||
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h\
|
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
|
||||||
--cdc_and_msc_only $(USB_CDC_AND_MSC_ONLY)
|
|
||||||
|
|
||||||
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"
|
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ parser.add_argument('--serial_number_length', type=int, default=32,
|
|||||||
help='length needed for the serial number in digits')
|
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_c_file', type=argparse.FileType('w'), required=True)
|
||||||
parser.add_argument('--output_h_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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -132,7 +131,7 @@ msc_interfaces = [
|
|||||||
bInterval=0),
|
bInterval=0),
|
||||||
standard.EndpointDescriptor(
|
standard.EndpointDescriptor(
|
||||||
description="MSC out",
|
description="MSC out",
|
||||||
bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT,
|
bEndpointAddress=0x1 | standard.EndpointDescriptor.DIRECTION_OUT,
|
||||||
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
||||||
bInterval=0)
|
bInterval=0)
|
||||||
]
|
]
|
||||||
@ -277,16 +276,14 @@ descriptor_list.extend(cdc_interfaces)
|
|||||||
descriptor_list.extend(msc_interfaces)
|
descriptor_list.extend(msc_interfaces)
|
||||||
# Only add the control interface because other audio interfaces are managed by it to ensure the
|
# Only add the control interface because other audio interfaces are managed by it to ensure the
|
||||||
# correct ordering.
|
# 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.
|
# Put the CDC IAD just before the CDC interfaces.
|
||||||
# There appears to be a bug in the Windows composite USB driver that requests the
|
# 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
|
# 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
|
# 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
|
# the Windows 7 Adafruit_usbser.inf file thinks CDC is at Interface 0, so we'll leave it
|
||||||
# there for backwards compatibility.
|
# there for backwards compatibility.
|
||||||
if not args.cdc_and_msc_only:
|
descriptor_list.extend(hid_interfaces)
|
||||||
descriptor_list.extend(hid_interfaces)
|
|
||||||
|
|
||||||
configuration = standard.ConfigurationDescriptor(
|
configuration = standard.ConfigurationDescriptor(
|
||||||
description="Composite configuration",
|
description="Composite configuration",
|
||||||
|
Loading…
Reference in New Issue
Block a user