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

feat(reset): Added restart return type #383

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

stabl-gjn
Copy link
Contributor

Related issue: #382

Explicitly set the return type of reset::restart as the never type.
This is already correctly set on the generated ffi bindings:

extern "C" {
    #[doc = " @brief  Restart PRO and APP CPUs.\n\n This function can be called both from PRO and APP CPUs.\n After successful restart, CPU reset reason will be SW_CPU_RESET.\n Peripherals (except for WiFi, BT, UART0, SPI1, and legacy timers) are not reset.\n This function does not return."]
    pub fn esp_restart() -> !;
}

@ivmarkov
Copy link
Collaborator

Yes, why not? Thanks!

@ivmarkov ivmarkov merged commit 9e364d5 into esp-rs:master Feb 26, 2024
8 checks passed
@stabl-gjn stabl-gjn deleted the fixes/never-return-restart branch February 26, 2024 09:05
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.

2 participants