svd2rust
svd2rust copied to clipboard
[Corner Case] single bit field `MT` (Month Tens) of `RTC` should have `u8` type rather a `bool` type
In STM32 svds, there is a field called MT of DR register in RTC peripheral. MT means Month Tens and should have numeric type. But since it's a single bit field, svd2rust just map it to a BitWriter & BitReader, which make the .bit() method need a bool input. It's a little bit weird for me. So if there is any way we can defined the Rust type of a field?
There's no support for this in the current svd spec. Maybe we can enable a way to say periph RTC register DR field MT is a u8