Skip to content

Improve API to allow having an array of Analog pins #154

@pum-purum-pum-pum

Description

@pum-purum-pum-pum

It would be great to be able to store analog pins in the array and process them sequentially.
If one needs to have multiple analog pins in the array it's not possible -- types are different and Channel trait has type-associated function.

Currently, Adc implements OneShot trait which accepts pin.

impl<WORD, PIN> OneShot<Adc, WORD, PIN> for Adc

The pin argument itself is not used, but the associated function of its type channel (which is the channel id) is used instead.

Perhaps we can change the function to fn channel(&self) but it might break some assumptions. Would be great to hear some input

Metadata

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