Report
2 weeks, 5 days ago.

Initialization list of InterruptIn

How can a list of InterruptIn pins be defined without explicitly setting each as a separate name?

``` class Test { InterruptIn pins[3]; Test(PinName p1, PinName p2, PinName p3): pins{p1, p2, p3} {} }; ```

The fact that they're NonCopyable seems to prevent this on debug builds.

Comment on this question

1 Answer

1 week, 4 days ago.

Hi there,

do you mean something like this?

include the mbed library with this snippet

InterruptIn pins[]= {InterruptIn(A0), InterruptIn(A1), InterruptIn(A2)};

BR J.


You need to log in to post a question