-
Notifications
You must be signed in to change notification settings - Fork 152
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
Field writer has no impl when enumeratedValue is derived across peripherals #705
Comments
Please, add link on source |
An example of the bug is available on https://github.com/gd32-rust/gd32-rs for the gd32f1 timer peripheral (the gd32e1 is still a WIP). The generated source code is available on https://github.com/gd32-rust/gd32-rs-nightlies/tree/main/gd32f1. I attached the patched svd used by svd2rust for generation. On the svd file you can see lines 17899-17905 the derived I quoted earlier. |
Hello! Any updates on the issue? |
Hello,
I'm currently implementing a PAC/HAL for the GD32E103 device and set the SVD to derive TIMER*.CTL0.CEN registers to TIMER0.CTL0.CEN register:
The generated code reuses the CEN_A and CEN_R types from TIMER0 to every timer but not the CEN_W. The issue is that is defines the type (
pub type CEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTL0_SPEC, CEN_A, O>;
) but it does not provides its implementation (to set the variants) as it does on TIMER0.This issue appeared between svd2rust 0.24.0 and 0.25.0.
The text was updated successfully, but these errors were encountered: