ch32-rs / ch32-rs-nightlies

PACs
3 stars 4 forks source link

CH32V103 has USB Type-C controle regiser? #3

Open nosuz opened 1 year ago

nosuz commented 1 year ago

Thank you for providing this Rust PAC for CH32V series MPUs. I am happy to writing program by using this crate.

But I found a code defining USB type-c controle register

///0x38 - USB type-C control
pub usb_type_c_ctrl: USB_TYPE_C_CTRL,

on line 46512 in ch32v1/src/ch32v103/mod.rs.

I can't find this register on the CH32x Datasheet ver. 1.30. I beleive both CH32V103 and CH32F103 don't support USB Type-C.

Do we need this code? I am happy to make a pull request to remove this.

Thank you

andelf commented 10 months ago

They are from the SVD files. As far as I know, SVD files from WCH are buggy. So they are not reliable.