Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WIP: rp2: Make GPIO wakeup from lightsleep consistent.#16442

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
projectgus wants to merge1 commit intomicropython:master
base:master
Choose a base branch
Loading
fromprojectgus:bugfix/rp2_lightsleep_indefinite_wake
Draft
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletionsports/rp2/machine_pin.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,6 +134,7 @@ void machine_pin_deinit(void) {
continue;
}
gpio_set_irq_enabled(i, GPIO_IRQ_ALL, false);
gpio_set_dormant_irq_enabled(i, GPIO_IRQ_ALL, false);
}
irq_remove_handler(IO_IRQ_BANK0, gpio_irq);
}
Expand DownExpand Up@@ -445,16 +446,19 @@ void mp_hal_pin_interrupt(mp_hal_pin_obj_t pin, mp_obj_t handler, mp_uint_t trig

// Disable all IRQs while data is updated.
gpio_set_irq_enabled(pin, GPIO_IRQ_ALL, false);
gpio_set_dormant_irq_enabled(pin, GPIO_IRQ_ALL, false);

// Update IRQ data.
irq->base.handler = handler;
irq->base.ishard = hard;
irq->flags = 0;
irq->trigger = trigger;

// Enable IRQifa handler is given.
if(handler!= mp_const_none && trigger != MP_HAL_PIN_TRIGGER_NONE) {
if(trigger != MP_HAL_PIN_TRIGGER_NONE) {
// Enable IRQ evenifnohandleris set, so pin can wake CPU from WFI/WFE
gpio_set_irq_enabled(pin, trigger, true);
// Also have the IRQ wake us from indefinite lightsleep
gpio_set_dormant_irq_enabled(pin, trigger, true);
}
}

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp