Skip to content

Commit 5e22c09

Browse files
authored
convert unlikely panic to hard_assert to not waste space for string (#826)
1 parent 4e62c26 commit 5e22c09

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ static void hw_enumeration_fix_force_ls_j(void) {
9090
// DM must be 0 for this to work. This is true if it is selected
9191
// to any other function. fn 8 on this pin is only for debug so shouldn't
9292
// be selected
93-
if (gpio_get_function(dm) == 8) {
94-
panic("Not expecting DM to be function 8");
95-
}
93+
hard_assert(gpio_get_function(dm) != 8);
9694

9795
// Before changing any pin state, take a copy of the current gpio control register
9896
gpio_ctrl_prev = iobank0_hw->io[dp].ctrl;

0 commit comments

Comments
 (0)