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

defmt_brtt::init!() missing in init task #11

Open
90degs2infty opened this issue Jul 6, 2023 · 0 comments
Open

defmt_brtt::init!() missing in init task #11

90degs2infty opened this issue Jul 6, 2023 · 0 comments

Comments

@90degs2infty
Copy link

According to defmt_brtt's docs, one has to initialize defmt_brtt before using it:

You must also, somewhere in your code before calling any defmt logging function, call the defmt_brtt::init! macro.

fn main() {
    let _ = defmt_brtt::init!();
}

This template's init task currently reads:

#[init]
fn init(cx: init::Context) -> (Shared, Local) {
    defmt::info!("init");
    // ....
}

Is there a reason why the initialization is skipped? Or is it not necessary in the first place? It apparently works without the initialization, but I'm a little puzzled by the docs, still.

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

No branches or pull requests

1 participant