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

Fix implementation of ESP32 sleep implementation #1852

Merged
merged 2 commits into from
Mar 8, 2021
Merged

Fix implementation of ESP32 sleep implementation #1852

merged 2 commits into from
Mar 8, 2021

Conversation

hbraasch
Copy link
Contributor

@hbraasch hbraasch commented Mar 8, 2021

Description

  • Fixes the bug that causes EnableWakeupByPin not waking up an ESP32.
  • Corrected method <<NativeEnableWakeupByPin>> not to directly use the pin mask value, but to firstly extracting the gpio pin number from the mask value.
    The <<esp_sleep_enable_ext0_wakeup>> method requires a pin number as a parameter, not the mask value.
  • Part of Fix issue with Sleep and wake from sleep nanoFramework.Hardware.Esp32#126.

Motivation and Context

How Has This Been Tested?

Tested by:

  • Building the target and uploading into ESP32.
  • Running a nanoFramework test app which execises the EnableWakeupByPin functionality.

This is a simple fix which does not affect other areas of code.

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)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)

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.

Fix the <<EnableWakeupByPin>> as reported in issue #705
Corrected method <<NativeEnableWakeupByPin>> not to directly use the pin mask value, but to firstly extracting the gpio pin number from the mask value.
The <<esp_sleep_enable_ext0_wakeup>> method requires a pin number as a parameter, not the mask value.
@nfbot nfbot added the Type: bug label Mar 8, 2021
@nfbot
Copy link
Member

nfbot commented Mar 8, 2021

@hbraasch there are issues with the code style on the source files.
A PR was submitted with the code style fixes. Please review and merge the changes. See https://github.com/hbraasch/nf-interpreter/pull/1.

Make sure you are using the project code style. Check the details here.

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! Thanks.

@josesimoes josesimoes added the Series: ESP32 Everything related specifically with ESP32 series targets label Mar 8, 2021
@josesimoes josesimoes merged commit b14d613 into nanoframework:develop Mar 8, 2021
@nfbot
Copy link
Member

nfbot commented Mar 8, 2021

@hbraasch there are issues with the code style on the source files.
A PR was submitted with the code style fixes. Please review and merge the changes. See https://github.com/hbraasch/nf-interpreter/pull/2.

Make sure you are using the project code style. Check the details here.

@josesimoes josesimoes changed the title Update nanoFramework_hardware_esp32_native_Hardware_Esp32_Sleep.cpp Fix implementation of ESP32 sleep implementation Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Series: ESP32 Everything related specifically with ESP32 series targets Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The EnableWakeupByPin not waking up ESP32
3 participants