Minimal(ish) changes needed to get the Pico Core working with Harp Regulator #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR shows the minimal(ish) changes needed to get the Pico Core working with Harp Regulator.
Ideally you probably want to tidy these things up.
In particular, the new registers need to be ratified (harp-tech/harp-regulator#2) and implemented in the core rather than
main.cpp.I think you also probably don't want the redundancy of the WhoAmI and firmware version all over the place. Ideally both of these should probably just be defined once in the CMakeLists.txt and propagated to where they're needed as appropriate.
I think I mentioned it elsewhere, but it is worth noting that the USB product name (iProduct) is effectively the only place that we can put info in the USB descriptor and have it be able to be read on Windows. The manufacturer and serial number strings simply aren't reliably exposed anywhere as far as I could find. (Manufacturer in particular I think is due to Windows preferring to show the vendor who made the driver. No idea why they don't expose the serial number.)
Also it's slightly more important that the Pico Core uses the flash ID on RP2040 and the chip ID on RP2350 as the serial number now. Harp Regulator relies on the serial number matching to tell that a BOOTSEL device is the same as the device it instructed to reboot. (Getting the flash ID via Picoboot was the most straightforward way to accomplish this.)