Skip to content

Commit 0b80ef7

Browse files
authored
info: move functions into assoicated structs/enums
1 parent e717996 commit 0b80ef7

File tree

4 files changed

+175
-158
lines changed

4 files changed

+175
-158
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Added
9-
- Added `info::CORE` to get the CPU core at compile time.
10-
- Added `info::core()` to get the CPU core at runtime.
9+
- Added `info::Core::CT` to get the CPU core at compile time.
10+
- Added `info::Core::from_cpuid()` to get the CPU core at runtime.
1111
- Added a `flash` module with erase and program functionality.
1212
- Added `defmt::Format` for all types declared in the BSPs.
13+
- Added `info::uid::PTR`.
1314

1415
### Changed
1516
- Changed minimum rust version from 1.56 to 1.57 for `const_panic`.
17+
- `info::UID64`
18+
- Moved to `info::Uid64::PTR`.
19+
- Changed the type from `*const u8` to `*const u32`.
20+
- Moved `info::uid64` to `info::Uid64::from_device`.
21+
- Moved `info::uid64_devnum` to `info::Uid64::read_devnum`.
22+
- Moved `info::package` to `info::Package::from_device`.
23+
- Moved `info::uid` to `info::Uid::from_device`.
1624

1725
## [0.2.1] - 2021-11-20
1826
### Fixed

examples/examples/info.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55

66
use defmt_rtt as _; // global logger
77
use panic_probe as _; // panic handler
8-
use stm32wlxx_hal::{self as hal, info};
8+
use stm32wlxx_hal::{
9+
self as hal,
10+
info::{self, Package, Uid, Uid64},
11+
};
912

1013
#[hal::cortex_m_rt::entry]
1114
fn main() -> ! {
1215
defmt::info!("Flash size: {} KiB", info::flash_size_kibibyte());
13-
defmt::info!("Package: {:?}", info::package());
14-
defmt::info!("UID64: {}", info::uid64());
15-
defmt::info!("UID: {}", info::uid());
16+
defmt::info!("Package: {:?}", Package::from_device());
17+
defmt::info!("UID64: {}", Uid64::from_device());
18+
defmt::info!("UID: {}", Uid::from_device());
1619

1720
loop {
1821
hal::cortex_m::asm::bkpt();

0 commit comments

Comments
 (0)