Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rom_reset_usb_boot_extra which supports >32 pins and ACTIVE_LOW #2084

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

kilograham
Copy link
Contributor

I noticed this in passing - this change also adds relevant PICO_CONFIG to specify the ACTIVE_LOW default (note if the ACTIVITY_LED is not specified, the OTP defaults will be used on RP2350)

@kilograham kilograham added this to the 2.1.0 milestone Nov 21, 2024
Copy link
Contributor

@peterharperuk peterharperuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work!

* - 2 To disable the USB PICOBOOT Interface
* \param usb_activity_gpio_pin_active_low Activity GPIO is active low (ignored on RP2040)
*/
void __attribute__((noreturn)) rom_reset_usb_boot_extra(int usb_activity_gpio_pin, uint32_t disable_interface_mask, bool usb_activity_gpio_pin_active_low);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rom_reset_usb_boot has uint32_t usb_activity_gpio_pin_mask, whereas rom_reset_usb_boot_extra has int usb_activity_gpio_pin. This might be a stupid question, but given the similarity of these two functions, would it make sense to modify rom_reset_usb_boot_extra to accept a pin_mask value too?

@lurch
Copy link
Contributor

lurch commented Nov 21, 2024

(note if the ACTIVITY_LED is not specified, the OTP defaults will be used on RP2350)

Given that the OTP BOOTSEL_LED_CFG has both PIN and ACTIVELOW fields, should we make PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED_ACTIVE_LOW and PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW optional-and-unset-by-default (just like their _ACTIVITY_LED counterparts), rather than forcing them to default to 0 ?

@kilograham
Copy link
Contributor Author

(note if the ACTIVITY_LED is not specified, the OTP defaults will be used on RP2350)

Given that the OTP BOOTSEL_LED_CFG has both PIN and ACTIVELOW fields, should we make PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED_ACTIVE_LOW and PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW optional-and-unset-by-default (just like their _ACTIVITY_LED counterparts), rather than forcing them to default to 0 ?

they are only used when the corresponding PIN define is set

@kilograham kilograham merged commit 5a98889 into develop Nov 21, 2024
8 checks passed
@kilograham kilograham deleted the reset_usb_boot_upgrades branch November 21, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants