Closed simonschmidt closed 3 years ago
Thanks for the patch! I think it'd be better to see if we can come up with an API that more honestly represents what the SVD tells us re: read/write access on field-by-field basis. I once I had to debug a bad register API and don't want to risk inflicting that on anyone who might be writing to a read-only register and then wondering why nothing is happening =D
Let's discuss in https://github.com/lynaghk/svd2zig/issues/2
In the SVD for stm32f103[1] there are registers where the
<access>
is declared per-field rather than for the whole register.This caused
nil
instead of Register to be emitted:This change makes those register be treated like read-write even though some of the contained fields are read-only.
[1] https://www.st.com/resource/en/svd/stm32f1_svd.zip