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.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi all, After reading the port, I need to use "pins"as a 4 bit binary number,
PortIn p(Port0, 0x00000C30);
pins=p.read();
I'm using C to compile.
1. Define Binary : Which type should I define the "pins" as? Is that int?
2. Fetch 1 bit from (int?): And after that how can I fetch each bit from the 4 bits. Should I write like pins[0],pins[1],etc