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

fix rom_table_lookup #20

Merged
merged 2 commits into from
Feb 21, 2021
Merged

fix rom_table_lookup #20

merged 2 commits into from
Feb 21, 2021

Commits on Feb 15, 2021

  1. fix rom_table_lookup

    It seems like the rom_table_lookup missed one level of
    pointer dereferencing.
    
    After comparing it to the working call to reset_usb_boot() in
    https://github.com/jannic/rp-microcontroller-rs/blob/master/util/rp2040-panic-usb-boot/src/lib.rs,
    I changed the code until it generated basically the same assembly.
    
    With that change, I was able to successfully call rom_data::reset_to_usb_boot()
    
    I still don't like the type RomTableLookupFn, which just returns
    some generic T without any checks, and I think rom_table_lookup
    should be unsafe. But as none of those are pub, it doesn't matter too
    much. So I just made the changes necessary to make the code work.
    jannic committed Feb 15, 2021
    Configuration menu
    Copy the full SHA
    d6231bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5494ce7 View commit details
    Browse the repository at this point in the history