Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 3 months 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.
1 Answer
6 years, 2 months 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.