Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Corner Case] single bit field MT (Month Tens) of RTC should have u8 type rather a bool type #719

Open
eZioPan opened this issue May 29, 2023 · 1 comment

Comments

@eZioPan
Copy link
Contributor

eZioPan commented May 29, 2023

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?

@Emilgardis
Copy link
Member

Emilgardis commented May 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants