Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Setting Gpio alternate funcion is now an extension #8

Merged
merged 1 commit into from
Feb 7, 2018

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented Feb 6, 2018

Description

  • Extracted this from SetDriveMode to an extension.
  • Remove Alternate from GpioPinDriveMode enum.
  • Requires image v0.1.0-preview460.

Motivation and Context

  • Improves "separation of concerns" principle by separating the setting of the alternate function from the setting of the drive mode.
  • Provides the setting of the alternate function on a extension making it formally more clear its intent.
  • Fixes Gpio events do not behave as expected Home#282.

How Has This Been Tested?

  • Successfully running Gpio+Events app from samples repo.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • 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 change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: José Simões jose.simoes@eclo.solutions

- Extracted this from SetDriveMode to an extension
- Remove Alternate from GpioPinDriveMode enum
- Fixes nanoframework/Home#282
- Requires image v0.1.0-preview460

Signed-off-by: José Simões <jose.simoes@eclo.solutions>
@nfbot
Copy link
Member

nfbot commented Feb 6, 2018

Hi @josesimoes,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@josesimoes
Copy link
Member Author

josesimoes commented Feb 6, 2018

@MikroBusNet please validate that this implementation is usable with the current use case for what it was coded for.

@AdrianSoundy please confirm that this is usable as it is for interfacing with ESP32.

Copy link
Member

@AdrianSoundy AdrianSoundy left a comment

Choose a reason for hiding this comment

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

These changes fix in with ESP32 and make the setting of alternative functions on a gpiopin more explicit.
This function was never about drivemode.

@josesimoes josesimoes merged commit 4856d1c into nanoframework:develop Feb 7, 2018
@josesimoes josesimoes deleted the fix-282 branch February 7, 2018 08:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gpio events do not behave as expected
3 participants