-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat(base_peripheral): make BasePeripheral a template on size of register address #151
Merged
Conversation
This file contains 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
…ster addresses * Update base peripheral component to be a template class whith template argument being the type for the register address (default uint8_t) * Updated all subclasses to include the required <> for using the default type of uint8_t
✅Static analysis result - no issues found! ✅ |
* Update how multi-byte registers are handled in base_peripheral and add additional logging for help debugging * Update gt911 and st25dv to subclass with register size 16 bit
* IT_STS is in DATA address space not SYST address space * Change IT_STS from class to bitfield struct so that we can use it when returning the interrupt status * Added priting and comparison for IT_STS * Update example to decrease logging in ST25, use new IT_STS logging, and update clock speed to 1MHz
* Added methods for updating specific members of the config or the config as a whole
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.
Description
gt911
andst25dv
classes to specialize withuint16_t
as theRegisterAddressType
bool BasePeripheral::probe(std::error_code&)
as public functionvoid BasePeripheral::set_address(uint8_t)
as public functionvoid BasePeripheral::set_probe(...)
as public functionvoid BasePeripheral::set_write(...)
as public functionvoid BasePeripheral::set_read(...)
as public functionvoid BasePeripheral::set_read_register(...)
as public functionvoid BasePeripheral::set_write_then_read(...)
as public functionvoid BasePeripheral::set_config(...)
as public functionst25dv
from Feature/base peripheral #150 which readIT_STS
register fromSYST
address space instead ofDATA
address spaceMotivation and Context
Improves the applicability and reuse of the base peripheral component to support peripherals which have 16 bit register addresses (such as the
st25dv
andgt911
components)How has this been tested?
gt911
examplest25dv
exampleScreenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Gt911:
St25dv:
Testing new i2c logging:
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.