Skip to content
Snippets Groups Projects
Commit 439e31cd authored by Per Lindgren's avatar Per Lindgren
Browse files

dropped nightly requiremet, README

parent 017ee7d8
Branches
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@
Adds debug to volatile register when compiled with `--features debug-fmt`.
## Caveats
Notice, the current implementation of `array-debug` (see `examples/example2.rs`) requires a nightly toolchain (`#![feature(unsize)]`). This is however an "opt-in", and needed to support `#[derive(Debug)]` for cases with (register) arrays larger than 32 elements.
``` rust
extern crate volatile_register;
......@@ -39,7 +43,7 @@ Nvic { iser: [0xB618860, 0x7FFE, 0x20, 0x0, 0x0, 0x7F70, 0x30, 0x0], reserved0:
Registers will be formatted under `UpperHex`, notice in the example that arrays are of size less than 32, hence `Debug` of array (`[T; N]`) is implemented by default. Notice that the `reserved` fields falls back to the default integer formatting (as not wrapped by the `volatile-register` abstraction).
For register arrays with more then 32 items, `array-debug` provides a newtype over array, replicating the array behavior while providing `Debug`.
For register arrays with more then 32 elements, `array-debug` provides a newtype over array, replicating the array behavior while providing `Debug`.
``` rust
extern crate array_debug;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment