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/aw9523 update #111

Merged
merged 5 commits into from
Sep 26, 2023
Merged

Conversation

SamAtBackbone
Copy link
Contributor

@SamAtBackbone SamAtBackbone commented Sep 26, 2023

Description

  • Separate constructor from initialization. This way the object can be used before the hardware can be initialized. The object can also be reinitialized later if necessary.
    ⚠️ This is a breaking change. You must call the "initialize()" method after construction for the configuration to take effect!
  • Add 'get_output' methods. Allows a read of the set output value.

Motivation and Context

We need to construct the object before the hardware can be initialized. Also, if the AW9523 is shut down and restarted (power rail switching for example) this way it can be reinitialized without deconstructing and reconstructing a new object.
The 'get_output' methods allow to check what the current state of the outputs is in case there is no internal tracking of the state.

How has this been tested?

Used example code to verify the initialization happens as designed.
image
In this example, the 3V3SW power rail is used to power the AW9523. The 15V enable line is part of the AW9523.
The AW9523 is constructed before the power rails are set. The initialization happens after the "3V3SW Enable" log.
The "port0&1: 255" log is from reading the output registers, showing that the port 0_5 (15V enable line) is high.

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

SamAtBackbone and others added 5 commits September 26, 2023 09:14
fix(adc): make AdcConfig operators static (esp-cpp#110)
-Separate constructor from initialization. This way the object can be used before the hardware can be initialized. The object can also be reinitialized later if necessary.
-Add 'get_output' methods. Allows a read of the set output value.
Update the example with the new initialization method
Update comments
@finger563 finger563 added enhancement New feature or request aw9523 labels Sep 26, 2023
@finger563 finger563 merged commit 975b537 into esp-cpp:main Sep 26, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aw9523 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants