Skip to content

Delay: Don't rely on EH traits #343

Closed
@David-OConnor

Description

@David-OConnor

File in question:

fn _delay_us(&mut self, us: u32) {

Typically, HALs implement their own Delay. Given it only uses cortex-m peripheral, there's no reason HALs need to keep this; this cortex-m library includes a delay.

However, it's dependent on embedded-hal::Delay. Can we make the implementation native, and add EH as an optional add-on? This way, you don't need to import the trait, or include it in your project. I'll do a PR if approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions