Here's what we did for an embedded system in another crate: https://github.com/embed-rs/stm32f7-discovery/commit/2b247cfe771b75bc08ba7c35efff8b231c6256c4