![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Extra problem 2 for HW 1
main.cpp
- Committer:
- lzzcd001
- Date:
- 2015-02-18
- Revision:
- 0:9b0b3bdf816e
File content as of revision 0:9b0b3bdf816e:
#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 my_asm(); // declare LED outputs – let C set them up as output bits DigitalIn sw(p5); DigitalOut led(p10); DigitalOut myled1(LED1); DigitalOut myled4(LED4); int main() { // loop forever while(1) { //call assembly language function to control LED1 my_asm(); wait(0.2); } }