Skip to content

Define at compile time in pico_asm! #63

Open
@dthelegend

Description

Is there any way of doing the following:

fn some_function<const N : u8> -> ! {
    let led_program = pio_proc::pio_asm!(
        ".define T1 42",
        ".wrap_target",
            "mov pins , 0 [T0]",
            "mov pins , 1 [T1]",
        ".wrap",
        define(T0 = N) // Add T0 defined to the value of compile constant N
    );
    ...
}

Essentially where you can add a define to a pio_asm at compile time? If not I would like to propose this addition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions