Skip to content

Add proc macro to derive pins and component #2

@jamwaffles

Description

@jamwaffles

Similar to the HAL component generator, a proc macro to set up pins, signals and the component would be super kool. Something like:

struct ThingState {
    // Whatever
}

#[derive(halcomp)]
#[halcomp("comp-name")]
pub struct MyComponent {
    #[halcomp(pin = "float-input", input)]
    some_float_input: f32,

    #[halcomp(pin = "a-flag", input)]
    some_flag: bool,

    #[halcomp(pin = "tell-lcnc-about-this", output)]
    out_value: u32,

    /// Some internal value to the component
    something_inside: ThingState
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions