Skip to main content

task

Function task 

Source
pub fn task(
    ledc: LEDC<'static>,
    pin: GPIO7<'static>,
) -> Result<SpawnToken<impl Sized>, SpawnError>
Expand description

Runs the status-LED effect loop, owning the LEDC peripheral.

Configure the LEDC timer/channel once, then apply set statuses at will — the loop picks up every change on its next 10 ms tick.

§Panics

Panics if the LEDC timer or channel fails to configure (should not happen on a healthy peripheral).