Bugfix and improvements for async GPIO
This commit is contained in:
@ -27,8 +27,8 @@ embassy-executor = { version = "0.7", features = [
|
||||
"executor-interrupt"
|
||||
]}
|
||||
|
||||
va108xx-hal = "0.9"
|
||||
va108xx-embassy = "0.1"
|
||||
va108xx-hal = { version = "0.9", path = "../../va108xx-hal" }
|
||||
va108xx-embassy = { version = "0.1", path = "../../va108xx-embassy" }
|
||||
|
||||
[features]
|
||||
default = ["ticks-hz-1_000", "va108xx-embassy/irq-oc30-oc31"]
|
||||
|
@ -14,7 +14,9 @@ use embedded_hal_async::digital::Wait;
|
||||
use panic_rtt_target as _;
|
||||
use rtt_target::{rprintln, rtt_init_print};
|
||||
use va108xx_embassy::embassy;
|
||||
use va108xx_hal::gpio::{on_interrupt_for_asynch_gpio, InputDynPinAsync, InputPinAsync, PinsB};
|
||||
use va108xx_hal::gpio::{
|
||||
on_interrupt_for_async_gpio_for_port, InputDynPinAsync, InputPinAsync, PinsB, Port,
|
||||
};
|
||||
use va108xx_hal::{
|
||||
gpio::{DynPin, PinsA},
|
||||
pac::{self, interrupt},
|
||||
@ -244,15 +246,16 @@ async fn output_task(
|
||||
}
|
||||
|
||||
// PB22 to PB23 can be handled by both OC10 and OC11 depending on configuration.
|
||||
|
||||
#[interrupt]
|
||||
#[allow(non_snake_case)]
|
||||
fn OC10() {
|
||||
on_interrupt_for_asynch_gpio();
|
||||
on_interrupt_for_async_gpio_for_port(Port::A);
|
||||
on_interrupt_for_async_gpio_for_port(Port::B);
|
||||
}
|
||||
|
||||
// This interrupt only handles PORT B interrupts.
|
||||
#[interrupt]
|
||||
#[allow(non_snake_case)]
|
||||
fn OC11() {
|
||||
on_interrupt_for_asynch_gpio();
|
||||
on_interrupt_for_async_gpio_for_port(Port::B);
|
||||
}
|
||||
|
Reference in New Issue
Block a user