jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

Add a function for reading the device address to rubble-nrf52 #89

Closed jonas-schievink closed 4 years ago

jonas-schievink commented 4 years ago

Currently the demo has to manually piece the device address together by reading FICR:

https://github.com/jonas-schievink/rubble/blob/05517e6657b1d248bfa5fca150a001c8656c8ed2/demos/nrf52-demo/src/main.rs#L134-L151

This code should be moved into a little helper function in rubble-nrf52.

AFAIK FICR is completely read-only, so we can use unsafe { *FICR::ptr() } to access it.

jonas-schievink commented 4 years ago

Added in https://github.com/jonas-schievink/rubble/pull/113