Feat enums and write only fn#73
Merged
Poofjunior merged 6 commits intoharp-tech:mainfrom Mar 23, 2026
Merged
Conversation
add notes disambiguating versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For larger projects, we're having name collision issues with the
#defined constants in this project. This PR cleans up some of these#definesand replaces them withinline constexprwhere appropriate. In cases where the#definesshould be local to the file scope only, these are moved into enum classes or integrated into the enums directly.Generally we also want to be able to track updates to this library with semantic versioning in a way that's independent of the Harp protocol version that the library best implements. To do that, I added a separate set of version constants.
Finally, I added a convenience handler function for reading from a register that should be "write-only."
PICO_CORE_VERSION_MAJOR,*_MINOR, and*_PATCHto track the version of this project independent of the Harp Protocol version that the project best implements.std::to_underlyingreg_type_tan enum class to reduce name collisions#defines which had a name collision with the etl libraryThis is a breaking change to the library API because projects that create Harp Apps will need to either:
reg_type_twith:reg_type_t:U8, etc. ORusing enum reg_type_tfrom reg_types.h at the top of function bodies or in class interfaces that want to use the enum without the namespace prefix.