Skip to content

Commit 3e2236b

Browse files
committed
missed an uncrustify
1 parent d2b5589 commit 3e2236b

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

supervisor/shared/usb/usb_desc.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ static const uint8_t configuration_descriptor_template[] = {
115115
static void usb_build_device_descriptor(uint16_t vid, uint16_t pid) {
116116
device_descriptor_allocation =
117117
allocate_memory(align32_size(sizeof(device_descriptor_template)),
118-
/*high_address*/ false, /*movable*/ false);
119-
uint8_t *device_descriptor = (uint8_t *) device_descriptor_allocation->ptr;
118+
/*high_address*/ false, /*movable*/ false);
119+
uint8_t *device_descriptor = (uint8_t *)device_descriptor_allocation->ptr;
120120
memcpy(device_descriptor, device_descriptor_template, sizeof(device_descriptor_template));
121121

122122
device_descriptor[DEVICE_VID_LO_INDEX] = vid & 0xFF;
@@ -142,38 +142,38 @@ static void usb_build_configuration_descriptor(void) {
142142

143143
// CDC should be first, for compatibility with Adafruit Windows 7 drivers.
144144
// In the past, the order has been CDC, MSC, MIDI, HID, so preserve that order.
145-
#if CIRCUITPY_USB_CDC
145+
#if CIRCUITPY_USB_CDC
146146
if (usb_cdc_repl_enabled()) {
147147
total_descriptor_length += usb_cdc_descriptor_length();
148148
}
149149
if (usb_cdc_data_enabled()) {
150150
total_descriptor_length += usb_cdc_descriptor_length();
151151
}
152-
#endif
152+
#endif
153153

154-
#if CIRCUITPY_USB_MSC
154+
#if CIRCUITPY_USB_MSC
155155
if (storage_usb_enabled()) {
156156
total_descriptor_length += storage_usb_descriptor_length();
157157
}
158-
#endif
158+
#endif
159159

160-
#if CIRCUITPY_USB_HID
160+
#if CIRCUITPY_USB_HID
161161
if (usb_hid_enabled()) {
162162
total_descriptor_length += usb_hid_descriptor_length();
163163
}
164-
#endif
164+
#endif
165165

166-
#if CIRCUITPY_USB_MIDI
166+
#if CIRCUITPY_USB_MIDI
167167
if (usb_midi_enabled()) {
168168
total_descriptor_length += usb_midi_descriptor_length();
169169
}
170-
#endif
170+
#endif
171171

172172
// Now we now how big the configuration descriptor will be, so we can allocate space for it.
173173
configuration_descriptor_allocation =
174174
allocate_memory(align32_size(total_descriptor_length),
175-
/*high_address*/ false, /*movable*/ false);
176-
uint8_t *configuration_descriptor = (uint8_t *) configuration_descriptor_allocation->ptr;
175+
/*high_address*/ false, /*movable*/ false);
176+
uint8_t *configuration_descriptor = (uint8_t *)configuration_descriptor_allocation->ptr;
177177

178178
// Copy the template, which is the first part of the descriptor, and fix up its length.
179179

@@ -189,7 +189,7 @@ static void usb_build_configuration_descriptor(void) {
189189

190190
uint8_t *descriptor_buf_remaining = configuration_descriptor + sizeof(configuration_descriptor_template);
191191

192-
#if CIRCUITPY_USB_CDC
192+
#if CIRCUITPY_USB_CDC
193193
if (usb_cdc_repl_enabled()) {
194194
// Concatenate and fix up the CDC REPL descriptor.
195195
descriptor_buf_remaining += usb_cdc_add_descriptor(
@@ -200,31 +200,31 @@ static void usb_build_configuration_descriptor(void) {
200200
descriptor_buf_remaining += usb_cdc_add_descriptor(
201201
descriptor_buf_remaining, &current_interface, &current_endpoint, &current_interface_string, false);
202202
}
203-
#endif
203+
#endif
204204

205-
#if CIRCUITPY_USB_MSC
205+
#if CIRCUITPY_USB_MSC
206206
if (storage_usb_enabled()) {
207207
// Concatenate and fix up the MSC descriptor.
208208
descriptor_buf_remaining += storage_usb_add_descriptor(
209209
descriptor_buf_remaining, &current_interface, &current_endpoint, &current_interface_string);
210210
}
211-
#endif
211+
#endif
212212

213-
#if CIRCUITPY_USB_HID
213+
#if CIRCUITPY_USB_HID
214214
if (usb_hid_enabled()) {
215215
descriptor_buf_remaining += usb_hid_add_descriptor(
216216
descriptor_buf_remaining, &current_interface, &current_endpoint, &current_interface_string,
217217
usb_hid_report_descriptor_length());
218218
}
219-
#endif
219+
#endif
220220

221-
#if CIRCUITPY_USB_MIDI
221+
#if CIRCUITPY_USB_MIDI
222222
if (usb_midi_enabled()) {
223223
// Concatenate and fix up the MIDI descriptor.
224224
descriptor_buf_remaining += usb_midi_add_descriptor(
225225
descriptor_buf_remaining, &current_interface, &current_endpoint, &current_interface_string);
226226
}
227-
#endif
227+
#endif
228228

229229
// Now we know how many interfaces have been used.
230230
configuration_descriptor[CONFIG_NUM_INTERFACES_INDEX] = current_interface;
@@ -251,8 +251,8 @@ static void usb_build_interface_string_table(void) {
251251
// Space needed is 2 bytes for String Descriptor header, then 2 bytes for each character
252252
string_descriptors_allocation =
253253
allocate_memory(align32_size(current_interface_string * 2 + collected_interface_strings_length * 2),
254-
/*high_address*/ false, /*movable*/ false);
255-
uint16_t *string_descriptors = (uint16_t *) string_descriptors_allocation->ptr;
254+
/*high_address*/ false, /*movable*/ false);
255+
uint16_t *string_descriptors = (uint16_t *)string_descriptors_allocation->ptr;
256256

257257

258258
uint16_t *string_descriptor = string_descriptors;
@@ -268,7 +268,7 @@ static void usb_build_interface_string_table(void) {
268268
for (uint8_t string_index = 1; string_index < current_interface_string; string_index++) {
269269
const char *str = collected_interface_strings[string_index].char_str;
270270
const size_t str_len = strlen(str);
271-
uint8_t descriptor_size = 2 + (str_len * 2);
271+
uint8_t descriptor_size = 2 + (str_len * 2);
272272
string_descriptor[0] = 0x0300 | descriptor_size;
273273

274274
// Convert to le16.
@@ -311,15 +311,15 @@ void usb_build_descriptors(void) {
311311
// Invoked when GET DEVICE DESCRIPTOR is received.
312312
// Application return pointer to descriptor
313313
uint8_t const *tud_descriptor_device_cb(void) {
314-
return (uint8_t *) device_descriptor_allocation->ptr;
314+
return (uint8_t *)device_descriptor_allocation->ptr;
315315
}
316316

317317
// Invoked when GET CONFIGURATION DESCRIPTOR is received.
318318
// Application return pointer to descriptor
319319
// Descriptor contents must exist long enough for transfer to complete
320320
uint8_t const *tud_descriptor_configuration_cb(uint8_t index) {
321321
(void)index; // for multiple configurations
322-
return (uint8_t *) configuration_descriptor_allocation->ptr;
322+
return (uint8_t *)configuration_descriptor_allocation->ptr;
323323
}
324324

325325
// Invoked when GET STRING DESCRIPTOR request is received.

0 commit comments

Comments
 (0)