Skip to content

Commit

Permalink
document conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Dec 15, 2020
1 parent 8da13fe commit 95e0914
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions book/src/panic.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ fn defmt_panic() -> ! {
If you are using the `panic-probe` crate then you should "abort" (call `cortex_m::asm::udf`) from `#[defmt::panic_handler]` to match its behavior.

NOTE: even if you don't run into the "double panic message printed" issue you may still want to use `#[defmt::panic_handler]` because this way `defmt::panic` and `defmt::assert` will *not* go through the `core::panic` machinery and that *may* reduce code size (we recommend you measure the effect of the change).

## Inter-operation with built-in attributes

The `#[panic_handler]` attribute cannot be used together with the `export_name` or `no_mangle` attributes
4 changes: 4 additions & 0 deletions book/src/timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ count: u64 <- (high1 << 32) | low
```

The loop should be kept as tight as possible and the read operations must be single-instruction operations.

## Inter-operation with built-in attributes

The `#[timestamp]` attribute cannot be used together with the `export_name` or `no_mangle` attributes
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ pub use defmt_macros::unwrap;
/// this macro. See [the manual] for details.
///
/// [the manual]: https://defmt.ferrous-systems.com/panic.html
///
/// # Inter-operation with built-in attributes
///
/// This attribute cannot be used together with the `export_name` or `no_mangle` attributes
pub use defmt_macros::panic_handler;

/// Creates an interned string ([`Str`]) from a string literal.
Expand Down Expand Up @@ -260,6 +264,10 @@ pub use defmt_macros::global_logger;
/// 0
/// }
/// ```
///
/// # Inter-operation with built-in attributes
///
/// This attribute cannot be used together with the `export_name` or `no_mangle` attributes
pub use defmt_macros::timestamp;

#[doc(hidden)] // documented as the `Format` trait instead
Expand Down

0 comments on commit 95e0914

Please sign in to comment.