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

How to override the default post_init function? #1698

Closed
konsulten opened this issue Jun 19, 2024 · 6 comments · Fixed by #2180
Closed

How to override the default post_init function? #1698

konsulten opened this issue Jun 19, 2024 · 6 comments · Fixed by #2180
Assignees
Milestone

Comments

@konsulten
Copy link
Contributor

Currently it seems the watchdogs are disabled by default in the __post_init function. Is there a possibility to override or modify this behaviour?

#763

@Dominaezzz
Copy link
Collaborator

I'm pretty sure you can just re-enable the watchdog in your main function. There should be an example as well.

@konsulten
Copy link
Contributor Author

konsulten commented Jun 19, 2024 via email

@MabezDev
Copy link
Member

We'd probably add this behind a configuration option. We don't have a complete story for this yet see #1111.

@Dominaezzz
Copy link
Collaborator

For this sort of thing, rather than a config option, which can only be specified once per crate. This should probably be part of the entry macro, which can be specified once per application/binary (of which there could be multiple in a crate).

#[entry(watchdog, psram(80))]
fn main() {
    // stuff
}

I would prefer never to disable it

Not that I think this is bad to want or something, I'm just curious what you're worried about happening between the disable and re-enable? Or is this a matter of principal?

@konsulten
Copy link
Contributor Author

konsulten commented Jun 21, 2024 via email

@MabezDev MabezDev added the status:blocked Unable to progress - dependent on another task label Jul 26, 2024
@MabezDev MabezDev removed the status:blocked Unable to progress - dependent on another task label Sep 16, 2024
@MabezDev MabezDev added this to the 0.21.0 milestone Sep 16, 2024
@MabezDev
Copy link
Member

With the changes to how we initialize the hal, we can now make this a global configuration option. (Bear in mind this issue on the esp32 when implementing: #2105)

@SergioGasquez SergioGasquez linked a pull request Sep 18, 2024 that will close this issue
6 tasks
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants