Skip to content

feat(base_peripheral): Add additional apis using std::vector and std::bitset. Add toggle_bits() functions as well. #316

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

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

finger563
Copy link
Contributor

Description

  • Add overloads to read/write which take std::vector<uint8_t>
  • Add overloads to set_bits and clear_bits which take std::bitset<8>
  • Add toggle_bits() functions

Motivation and Context

Adds additional utility functions to the API so that developers / subclasses have to do less work.

How has this been tested?

Building the examples in CI.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

…td::bitset`. Add `toggle_bits()` functions as well.
@finger563 finger563 self-assigned this Aug 26, 2024
@finger563 finger563 added enhancement New feature or request base peripheral labels Aug 26, 2024
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit de10667 into main Aug 26, 2024
67 of 68 checks passed
@finger563 finger563 deleted the feature/base-peripheral-apis branch August 26, 2024 15:12
SquaredPotato pushed a commit to smartknob-ha/espp that referenced this pull request Jan 27, 2025
…td::bitset`. Add `toggle_bits()` functions as well. (esp-cpp#316)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base peripheral enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant