-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ports/esp32: Use capability defines to configure features. #15862
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
Changes from all commits
File filter
Filter by extension
Conv 8000 ersations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ | |
#define MICROPY_PY_MACHINE_SDCARD_ENTRY | ||
#endif | ||
|
||
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 | ||
#if SOC_TOUCH_SENSOR_SUPPORTED | ||
#define MICROPY_PY_MACHINE_TOUCH_PAD_ENTRY { MP_ROM_QSTR(MP_QSTR_TouchPad), MP_ROM_PTR(&machine_touchpad_type) }, | ||
#else | ||
#define MICROPY_PY_MACHINE_TOUCH_PAD_ENTRY | ||
|
@@ -147,30 +147,34 @@ static void machine_sleep_helper(wake_type_t wake_type, size_t n_args, const mp_ | |
esp_sleep_enable_timer_wakeup(((uint64_t)expiry) * 1000); | ||
} | ||
|
||
#if !(CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6) | ||
|
||
#if SOC_PM_SUPPORT_EXT0_WAKEUP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should leave this for an additional PR, but should we also do more filtering in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah that's a good point. Pin irq / sleep settings that do / don't work seem to come up in issues regularly so a concerted effort to clean up and test these would be valuable. This arguably applies to all ports though, just just esp32... |
||
if (machine_rtc_config.ext0_pin != -1 && (machine_rtc_config.ext0_wake_types & wake_type)) { | ||
esp_sleep_enable_ext0_wakeup(machine_rtc_config.ext0_pin, machine_rtc_config.ext0_level ? 1 : 0); | ||
} | ||
#endif | ||
|
||
#if SOC_PM_SUPPORT_EXT1_WAKEUP | ||
if (machine_rtc_config.ext1_pins != 0) { | ||
esp_sleep_enable_ext1_wakeup( | ||
machine_rtc_config.ext1_pins, | ||
machine_rtc_config.ext1_level ? ESP_EXT1_WAKEUP_ANY_HIGH : ESP_EXT1_WAKEUP_ALL_LOW); | ||
} | ||
#endif | ||
|
||
#if SOC_TOUCH_SENSOR_SUPPORTED | ||
if (machine_rtc_config.wake_on_touch) { | ||
if (esp_sleep_enable_touchpad_wakeup() != ESP_OK) { | ||
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("esp_sleep_enable_touchpad_wakeup() failed")); | ||
} | ||
} | ||
#endif | ||
|
||
#if SOC_ULP_SUPPORTED | ||
if (machine_rtc_config.wake_on_ulp) { | ||
if (esp_sleep_enable_ulp_wakeup() != ESP_OK) { | ||
mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("esp_sleep_enable_ulp_wakeup() failed")); | ||
} | ||
} | ||
|
||
#endif | ||
|
||
switch (wake_type) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.