Skip to content

Support generic tasks or improve documentation on why it's not possible (and perhaps suggest workarounds) #2454

Open
@runfalk

Description

@runfalk

I was looking at #1837 which didn't really have a resolution, in my mind. So this feature request comes from a bit of ignorance as I don't know why this wouldn't be possible. The best work around for now seems to be to generate tasks using a macro.

What I basically want is the ability to hand a task any device like Spi, Pwm Uart, etc. It seems to me like the proc macro is making the function generic (on nightly) behind the scenes using RPIT, so some level of genericness seems possible at least? Based on the mentioned issue it seems like it was possible to bypass the macro check using TAIT in arguments to make it compile as well.

If there is a fundamental blocker I think it would be very helpful to have some documentation on how this can be worked around.

On a separate note, I've been trying out Embassy for a small project at work and it has been a breath of fresh air for embedded development. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind-questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions