Skip to content
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

Add support for sub-registers #22

Merged
merged 7 commits into from
Sep 11, 2018
Merged

Add support for sub-registers #22

merged 7 commits into from
Sep 11, 2018

Commits on Sep 11, 2018

  1. Prepare make_header for headers with sub-indices

    Currently, we only address whole registers, with no sub-indices.
    Therefore headers are always one byte long, and `make_header` could just
    return that byte.
    
    I'm currently working on support for the sub-registers that can only be
    addressed using sub-indices. For that I need to make `make_header` more
    flexible.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    f446f7c View commit details
    Browse the repository at this point in the history
  2. Rename function

    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    200557c View commit details
    Browse the repository at this point in the history
  3. Future-proof read method

    This is the only of the three access methods that needs to care about
    header length. Both `write` and `modify` use buffers that are provided
    by the `R`/`W` types and rely on those types to not mess up the buffer
    management.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    c74e007 View commit details
    Browse the repository at this point in the history
  4. Reformat register definition

    I'm about to add more information to the register definition, which adds
    more characters to the line. I don't have space for those, if the
    comments stay where they were before this commit (comments would have
    spilled into the next line).
    
    So yeah, my dream of keeping those comments lined up forever has
    officially died.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    0faef50 View commit details
    Browse the repository at this point in the history
  5. Define sub-index for all registers

    Currently, the sub-index is `0x00` for all defined registers, and the
    code only supports this value. The next steps will make the code more
    flexible, until registers with a real sub-index can be added.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    05c05ba View commit details
    Browse the repository at this point in the history
  6. Make macro-generated code generic over header len

    I think this leaves only `init_header` as the last piece of code that
    assumes an hard-coded header length of `1`.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    a42010e View commit details
    Browse the repository at this point in the history
  7. Extend init_header to support all header sizes

    This is the last change required to fully support sub-indices.
    hannobraun committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    08b1dec View commit details
    Browse the repository at this point in the history