My attempt at using the mbed without the mbed libraries.
Here is a main.cpp, that uses the registers library.
main.cpp
- Committer:
- elevatorguy
- Date:
- 2012-12-21
- Revision:
- 0:5fa5046f2ff5
- Child:
- 2:e26c096f1946
File content as of revision 0:5fa5046f2ff5:
#include "registers.h" // oneliner: ain't that sexy! DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalIn switch1(p21); int main() { switch1.mode(PULLDOWN); while(1) { led1 = switch1; led2 = !led1; } }