-
Notifications
You must be signed in to change notification settings - Fork 983
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
The functions set_using_xosc(), set_using_lposc(), set_using_gpio_1khz(), set_using_gpio_1hz() in \src\rp235x\powman\regs.rs do not make sense #3789
Comments
Moreover IMHO, the function |
BTW.: it would be nice if the "Register" functions would support the non consuming Builder Pattern .
With Seems like a non breaking change to me. |
the PAC is autogenerated by chiptool. It's not possible to do ad-hoc changes to individual registers like that, they all have to work the same way. It's intentional that all fields are readable/writable. The "register value" structs are a copy of the register in memory. Think of it like a "u32 but with a nice wrapper to get/set all the fields". Chiptool intentionally doesn't support "chaining" method calls like that because it results in less readable code. |
Yep (it took me some trial and error but) I do understand the "nice wrapper" concept and it's perfectly OK. BTW.: Embassy is just GREAT ! |
Ahh, chiptool is part of the embasy-rp repository ! |
I found that the Builder Pattern does not make as much sense, as I supposed, because the write function's target needs to be repeated, even if it's a constant: It could be memorized from |
The functions
set_using_xosc(), set_using_lposc(), set_using_gpio_1khz(), set_using_gpio_1hz()
in\src\rp235x\powman\regs.rs
do not make senseas the appropriate bits in the
TIMER
register are read only.The text was updated successfully, but these errors were encountered: