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

Feature/base peripheral #150

Merged
merged 11 commits into from
Feb 12, 2024
Merged

Feature/base peripheral #150

merged 11 commits into from
Feb 12, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Feb 12, 2024

Description

  • Create new base_peripheral component (espp::BasePeripheral) which contains:
    • base_config_: address and raw I/O functions
    • base_mutex_: std::recursive_mutex for protecting I/O / access to the peripheral
    • Additional read/write functions which check the config and use the address for various typed operations
    • Inherited members from espp::BaseComponent (logger and associated functions)
  • Update all peripherals and affected examples

Motivation and Context

Similar to #149 - this PR creates a espp::BasePeripheral component with config, members, and helper functions for creating a thread-safe peripheral driver. It refactors the existing peripheral components to use this as the new base.

How has this been tested?

  • Building and running the bm8563 example
  • Building and running the bldc_motor example
  • Building and running the bldc_haptics example
  • Building and running the tt21100 example
  • Building and running the st25dv example
  • Building and running the drv2605 example
  • Building and running the tla2528 example
  • Building and running the aw9523 example
  • Building and running the max1704x example
  • Building and running the mcp23x17 example
  • Building and running the ads1x15 example
  • Building and running the gt911 example
  • Building and running the t_keyboard example

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.

Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit bd2353f into main Feb 12, 2024
49 checks passed
@finger563 finger563 deleted the feature/base-peripheral branch February 12, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant