feat(led): use the published esp-hal-smartled driver
Moves the whole esp stack to esp-hal 1.2 (see the zigbee-rs submodule), which lets esp-hal-smartled 0.18 be used unmodified from crates.io instead of a hand-rolled RMT driver.
This commit is contained in:
1 parent
1ec7408f8e
commit
ebc2f3be7a
5 files changed
+212
-132
No files matched your search
+1
-3
@@ -13,7 +13,6 @@ use esp_backtrace as _;
|
||||
use esp_hal::gpio::Input;
|
||||
use esp_hal::gpio::InputConfig;
|
||||
use esp_hal::gpio::Pull;
|
||||
use esp_hal::interrupt::software::SoftwareInterruptControl;
|
||||
use esp_hal::rmt::Rmt;
|
||||
use esp_hal::time::Rate;
|
||||
use esp_hal::timer::timg::TimerGroup;
|
||||
@@ -45,9 +44,8 @@ async fn main(spawner: embassy_executor::Spawner) -> ! {
|
||||
esp_println::logger::init_logger_from_env();
|
||||
let peripherals = esp_hal::init(esp_hal::Config::default());
|
||||
|
||||
let sw_int = SoftwareInterruptControl::new(peripherals.SW_INTERRUPT);
|
||||
let timg0 = TimerGroup::new(peripherals.TIMG0);
|
||||
esp_rtos::start(timg0.timer0, sw_int.software_interrupt0);
|
||||
esp_rtos::start(timg0.timer0, peripherals.FROM_CPU_INTR0);
|
||||
|
||||
esp_alloc::heap_allocator!(size: 32 * 1024);
|
||||
|
||||
|
||||
Reference in new issue
Block a user