mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Update esp32c6 example dependencies
This commit is contained in:
parent
90f475316f
commit
c6fbbaaae8
3 changed files with 59 additions and 33 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#[rtic::app(device = esp32c6, dispatchers=[FROM_CPU_INTR0, FROM_CPU_INTR1])]
|
||||
mod app {
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::gpio::{Event, Input, Pull};
|
||||
use esp_hal::gpio::{Event, Input, InputConfig, Pull};
|
||||
use esp_println::println;
|
||||
|
||||
#[shared]
|
||||
|
|
@ -20,7 +20,8 @@ mod app {
|
|||
fn init(_: init::Context) -> (Shared, Local) {
|
||||
println!("init");
|
||||
let peripherals = esp_hal::init(esp_hal::Config::default());
|
||||
let mut button = Input::new(peripherals.GPIO9, Pull::Up);
|
||||
let config = InputConfig::default().with_pull(Pull::Up);
|
||||
let mut button = Input::new(peripherals.GPIO9, config);
|
||||
button.listen(Event::FallingEdge);
|
||||
foo::spawn().unwrap();
|
||||
(Shared {}, Local { button })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue