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

Mcp23xxx updates #397

Merged
merged 36 commits into from
Aug 19, 2022
Merged

Mcp23xxx updates #397

merged 36 commits into from
Aug 19, 2022

Conversation

adrianstevens
Copy link
Contributor

No description provided.

lamebrain and others added 30 commits July 18, 2020 22:38
Partial classes weren't providing any benefit and were hindering testing. Code is a lot simpler without them
Involved a bit of rework to add more interfaces for testability
Tests cover Constructor, Properties, Initialize, Read methods.
Todo: Write methods, Interrupts
This in theory should work, but I'm still having trouble getting the device to respond. Will come back to this once interrupts are working with I2C
- Use "edgefalling" instead of "edgerising" for interrupt. (Default configured setting for device)
- Inputports now have their initial values set
- Whole lot of logging added
- Interrupt ports do work, but only once
- Any interrupt mode can be used now, as long as the same mode is used for all interrupt ports.
- Interrupt handling for `McpDigitalInputPort`s now alerts if the pin is interrupted or if the pin's value does not match last state. This compensates for missed interrupts a lot more consistently.
- Logging is now limited to init and port creation, which is where most important things happen anyway.
  - Also Logging SPI activity, but this a is bit more careful so as to not slow down with logging when it isnt needed.
- Logging is now done via `McpLogger` static class, which has methods to enable/disable and change the output destination of logging. By default logging is disabled.

namespace ICs.IOExpanders.Mcp23x08_Input_Sample
{
public class MeadowApp : App<F7FeatherV1>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to v2

@jorgedevs jorgedevs merged commit 32f55d1 into develop Aug 19, 2022
@jorgedevs jorgedevs deleted the Mcp23xxx branch August 19, 2022 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants