Skip to content

Commit 74cae10

Browse files
committed
style(firmware): apply clang format (2026.6.19.0-2DFC)
1 parent 2dfc5f1 commit 74cae10

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

pico-bridge/src/boot_mode_policy.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ typedef enum {
1818
// Which USB device the run-mode firmware presents. Latched at boot from
1919
// the stored persona byte; see boot_mode_run_persona().
2020
typedef enum {
21-
RUN_PERSONA_XINPUT = 0, // wired Xbox 360 / XInput (default)
22-
RUN_PERSONA_KEYBOARD = 1, // USB HID boot keyboard
23-
RUN_PERSONA_MAPLE = 2, // Xbox-compatible Dreamcast Maple adapter mode
24-
RUN_PERSONA_PS3 = 3, // Sony DualShock 3 / PS3 HID gamepad
25-
RUN_PERSONA_PS4 = 4, // Sony DualShock 4 / PS4 HID gamepad
26-
RUN_PERSONA_XBOXONE = 5, // Xbox One-compatible XGIP gamepad
27-
RUN_PERSONA_DEBUG = 6, // XInput shape with raw USB packet capture
21+
RUN_PERSONA_XINPUT = 0, // wired Xbox 360 / XInput (default)
22+
RUN_PERSONA_KEYBOARD = 1, // USB HID boot keyboard
23+
RUN_PERSONA_MAPLE = 2, // Xbox-compatible Dreamcast Maple adapter mode
24+
RUN_PERSONA_PS3 = 3, // Sony DualShock 3 / PS3 HID gamepad
25+
RUN_PERSONA_PS4 = 4, // Sony DualShock 4 / PS4 HID gamepad
26+
RUN_PERSONA_XBOXONE = 5, // Xbox One-compatible XGIP gamepad
27+
RUN_PERSONA_DEBUG = 6, // XInput shape with raw USB packet capture
2828
RUN_PERSONA_GENERIC_HID = 7, // Generic HID gamepad for unknown-HID adapters
2929
} run_persona_t;
3030

pico-bridge/src/flash_creds.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
// where the pad used to be all-zero, so a record written before this
2525
// field existed reads back as the XInput persona with its CRC still
2626
// valid -- no version bump or migration needed.
27-
#define FLASH_PERSONA_XINPUT 0 // wired Xbox 360 / XInput (default)
28-
#define FLASH_PERSONA_KEYBOARD 1 // USB HID boot keyboard
29-
#define FLASH_PERSONA_MAPLE 2 // Xbox-compatible Dreamcast Maple adapter mode
30-
#define FLASH_PERSONA_PS3 3 // Sony DualShock 3 / PS3 HID gamepad
31-
#define FLASH_PERSONA_PS4 4 // Sony DualShock 4 / PS4 HID gamepad
32-
#define FLASH_PERSONA_XBOXONE 5 // Xbox One-compatible XGIP gamepad
33-
#define FLASH_PERSONA_DEBUG 6 // XInput shape with raw USB packet capture
27+
#define FLASH_PERSONA_XINPUT 0 // wired Xbox 360 / XInput (default)
28+
#define FLASH_PERSONA_KEYBOARD 1 // USB HID boot keyboard
29+
#define FLASH_PERSONA_MAPLE 2 // Xbox-compatible Dreamcast Maple adapter mode
30+
#define FLASH_PERSONA_PS3 3 // Sony DualShock 3 / PS3 HID gamepad
31+
#define FLASH_PERSONA_PS4 4 // Sony DualShock 4 / PS4 HID gamepad
32+
#define FLASH_PERSONA_XBOXONE 5 // Xbox One-compatible XGIP gamepad
33+
#define FLASH_PERSONA_DEBUG 6 // XInput shape with raw USB packet capture
3434
#define FLASH_PERSONA_GENERIC_HID 7 // Generic HID gamepad for unknown-HID adapters
3535

3636
typedef struct __attribute__((packed)) {

pico-bridge/src/net_udp.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ static void apply_set_usb_capture(uint8_t persona, bool enabled) {
667667
}
668668

669669
reset_reason_request_usb_capture_after_reboot(want);
670-
diag_log_printf("net_udp: usb_capture persona=%u changed=%d; rebooting",
671-
(unsigned)want, changed ? 1 : 0);
670+
diag_log_printf("net_udp: usb_capture persona=%u changed=%d; rebooting", (unsigned)want,
671+
changed ? 1 : 0);
672672
watchdog_reboot(0, 0, 100);
673673
for (;;)
674674
tight_loop_contents();
@@ -747,10 +747,9 @@ static void on_recv(void *arg, struct udp_pcb *pcb_in, struct pbuf *p, const ip_
747747
set_usb_capture_enabled = (buf[5] != 0);
748748
set_usb_capture_pending = true;
749749
diag_log_printf("net_udp: usb_capture persona=%u enabled=%u requested by %u.%u.%u.%u:%u",
750-
(unsigned)set_usb_capture_persona,
751-
set_usb_capture_enabled ? 1u : 0u, ip4_addr1(ip_2_ip4(addr)),
752-
ip4_addr2(ip_2_ip4(addr)), ip4_addr3(ip_2_ip4(addr)),
753-
ip4_addr4(ip_2_ip4(addr)), (unsigned)port);
750+
(unsigned)set_usb_capture_persona, set_usb_capture_enabled ? 1u : 0u,
751+
ip4_addr1(ip_2_ip4(addr)), ip4_addr2(ip_2_ip4(addr)),
752+
ip4_addr3(ip_2_ip4(addr)), ip4_addr4(ip_2_ip4(addr)), (unsigned)port);
754753
} else if (type == TYPE_STATE || type == TYPE_HEARTBEAT || type == TYPE_KEY_STATE ||
755754
type == TYPE_KEY_HEARTBEAT) {
756755
if (!have_peer || !ip_addr_cmp(&peer_addr, addr) || peer_port != port) {

pico-bridge/src/usb_descriptors.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {
690690
arr_count = sizeof(string_desc_arr_ps4) / sizeof(string_desc_arr_ps4[0]);
691691
} else if (boot_mode_run_persona() == RUN_PERSONA_GENERIC_HID) {
692692
arr = string_desc_arr_generic_hid;
693-
arr_count = sizeof(string_desc_arr_generic_hid) / sizeof(string_desc_arr_generic_hid[0]);
693+
arr_count =
694+
sizeof(string_desc_arr_generic_hid) / sizeof(string_desc_arr_generic_hid[0]);
694695
} else if (boot_mode_run_persona() == RUN_PERSONA_XBOXONE) {
695696
arr = string_desc_arr_xboxone;
696697
arr_count = sizeof(string_desc_arr_xboxone) / sizeof(string_desc_arr_xboxone[0]);

0 commit comments

Comments
 (0)