J.P. Armstrong
/
IntToBinaryAssembly
Assembly procedure that represents binary using the LEDs on the mbed.
main.cpp
- Committer:
- jp
- Date:
- 2011-01-27
- Revision:
- 0:13e4e935bed6
- Child:
- 1:7490aeb7d770
File content as of revision 0:13e4e935bed6:
#include "mbed.h" // This program will blink LED1 and LED4 // using assembly language for LED1 and // API functions for LED4 // declare external assembly language function (in a *.s file) extern "C" int binasm(int value); // declare LED outputs � let C set them up as output bits DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); Timer t; Serial pc(USBTX, USBRX); // tx, rx int main() { int i = 1; while (true) { binasm(i % 16); wait(0.1); i++; } }