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

Add GPIO ChangeCounter #1421

Merged
merged 8 commits into from
Jul 26, 2019
Merged

Add GPIO ChangeCounter #1421

merged 8 commits into from
Jul 26, 2019

Conversation

AdrianSoundy
Copy link
Member

@AdrianSoundy AdrianSoundy commented Jul 25, 2019

Description

Adds the Gpio ChangeCounter implementation for ESP32
Only as an input device using the internal hardware Counters available on the ESP32.
Output GPIO will give a NOT SUPPORTED exception.
Uses a 1 micro second timer for the relative timestamp thats available on ESP32.

For other devices have added empty file with the init returning NOT SUPPORTED exception.
Also requires change to Windows.Devices.Gpio

How Has This Been Tested?

Tested with a sample program with a PWM channel looped back on to the input pin.
As it implemented in hardware it supports a high frequency input signal.
Tested with 10Mhz & 1000hz

Have a sample program i will add later.

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: adriansoundy adriansoundy@gmail.com

@nfbot
Copy link
Member

nfbot commented Jul 25, 2019

Hi @AdrianSoundy,

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

A human will be reviewing it shortly. 😉

method_lookup,
"Windows.Devices.Gpio",
0xD7F65BB7,
method_lookup,
{ 100, 1, 0, 0 }
Copy link
Member

Choose a reason for hiding this comment

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

need version bumped

@josesimoes josesimoes added Area: Common libs Everything related with common libraries Series: ESP32 Everything related specifically with ESP32 series targets Type: enhancement labels Jul 25, 2019
@josesimoes josesimoes changed the title GPIO ChangeCounter Add GPIO ChangeCounter Jul 25, 2019
@josesimoes
Copy link
Member

Nice improvement!! 👏

@AdrianSoundy AdrianSoundy requested a review from josesimoes July 25, 2019 12:42
Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

LGTM!

@josesimoes josesimoes merged commit c5b419a into nanoframework:develop Jul 26, 2019
@AdrianSoundy AdrianSoundy deleted the ChangeCounter branch July 26, 2019 09:08
morali pushed a commit to morali/nf-interpreter that referenced this pull request Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common libs Everything related with common libraries Series: ESP32 Everything related specifically with ESP32 series targets Type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants