Skip to content

Conversation

@lwaern-intel
Copy link
Contributor

In particular, added documentation to note what the relevant template is to override the write_register/read_register implementations (which are no longer internal).

…rridable

In particular, added documentation to note what the relevant template is to
override the `write_register`/`read_register` implementations (which are no
longer internal).

template _reg_read_as_field is (register, read_register, read_field) {

template read_register_via_read_field is (register, read_register,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to polish naming convention a bit. It is correct that write_register is instantiated via write_field, but the result of that is that the write_field method is called via the read_register method, i.e. an instance of "via" with reverse direction.

I haven't thought of a better name yet.

Copy link
Contributor Author

@lwaern-intel lwaern-intel Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eliminating the ambiguity can be done by read_register_impl_via_read_field or read_register_impl_from_read_field. These are long and unwieldy... but at the same time, we don't expect people to use reference these very often, and having the name be documentation on its own has its virtue. I'm leaning towards this (specifically the one using "from"). Your opinion?

@syssimics
Copy link
Contributor

PR Verification: ✅ success

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants