Skip to content

Commit 479b047

Browse files
committed
Reverted descriptor changes pending HID restructuring
1 parent e490e63 commit 479b047

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

ports/stm32f4/common-hal/busio/I2C.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ I2C_HandleTypeDef hi2c2;
3737

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

supervisor/supervisor.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile
104104
--pid $(USB_PID)\
105105
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
106106
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
107-
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h\
108-
--cdc_and_msc_only $(USB_CDC_AND_MSC_ONLY)
107+
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
109108

110109
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"
111110

tools/gen_usb_descriptor.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
help='length needed for the serial number in digits')
2222
parser.add_argument('--output_c_file', type=argparse.FileType('w'), required=True)
2323
parser.add_argument('--output_h_file', type=argparse.FileType('w'), required=True)
24-
parser.add_argument('--cdc_and_msc_only', nargs='?',const=0, type=int)
2524

2625
args = parser.parse_args()
2726

@@ -132,7 +131,7 @@ def strings_in_order(cls):
132131
bInterval=0),
133132
standard.EndpointDescriptor(
134133
description="MSC out",
135-
bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT,
134+
bEndpointAddress=0x1 | standard.EndpointDescriptor.DIRECTION_OUT,
136135
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
137136
bInterval=0)
138137
]
@@ -277,16 +276,14 @@ def strings_in_order(cls):
277276
descriptor_list.extend(msc_interfaces)
278277
# Only add the control interface because other audio interfaces are managed by it to ensure the
279278
# correct ordering.
280-
if not args.cdc_and_msc_only:
281-
descriptor_list.append(audio_control_interface)
279+
descriptor_list.append(audio_control_interface)
282280
# Put the CDC IAD just before the CDC interfaces.
283281
# There appears to be a bug in the Windows composite USB driver that requests the
284282
# HID report descriptor with the wrong interface number if the HID interface is not given
285283
# first. However, it still fetches the descriptor anyway. We could reorder the interfaces but
286284
# the Windows 7 Adafruit_usbser.inf file thinks CDC is at Interface 0, so we'll leave it
287285
# there for backwards compatibility.
288-
if not args.cdc_and_msc_only:
289-
descriptor_list.extend(hid_interfaces)
286+
descriptor_list.extend(hid_interfaces)
290287

291288
configuration = standard.ConfigurationDescriptor(
292289
description="Composite configuration",

0 commit comments

Comments
 (0)