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

0.5.0 #1

Closed
wants to merge 3 commits into from
Closed

0.5.0 #1

wants to merge 3 commits into from

Conversation

amcelroy
Copy link
Owner

0.5.0 Changes

The peripheral! macro now requires an additional argument, the type of the address - This is used to create a map of addresses vs. index. The arose with the Max17261 where the address space is non-liner, in this case the addressing skipped from 0x4F to 0xB0 and again from 0xBF to 0xD0. The peripheral! macro stores the registers contiguously in memory as they are listed, so an additional map of index vs. address was needed to correctly access the non-linearly addressed registers.
Replaced direct_update with direct_update_by_address - This utilized the new index / address array to find the correct register by address.
Added find_index_by_address which attempts to find index based on the address.
Updated examples and tests

The issue came up on the Max17261, where the addressing is
non-contiguous. In v0.4.0, accessing the registers by address caused a
buffer overflow because the address was larger than the indexable
register map. The solution is an array of addresses.
@amcelroy amcelroy added the bug Something isn't working label Oct 31, 2023
@amcelroy amcelroy requested a review from electronjohn October 31, 2023 13:01
@amcelroy amcelroy self-assigned this Oct 31, 2023
@amcelroy amcelroy closed this Nov 1, 2023
@amcelroy amcelroy deleted the 0.5.0 branch November 1, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant