Lab that has to do with basic IO on mbed.
Dependencies: DebounceIn mbed PinDetect
GeorgesLab1/AssemblyMain.cpp
- Committer:
- Jesse Baker
- Date:
- 2016-01-24
- Revision:
- 53:1c8235c49b70
- Parent:
- 49:f2081d0f5eec
File content as of revision 53:1c8235c49b70:
/* CODE NO LONGER IN USE #include "mbed.h" #include "PinDetect.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(int value); // declare LED outputs – let C set them up as output bits DigitalOut myled1(p30); //DigitalOut myled4(LED4); PinDetect pb(p28); int main() { pb.mode(PullUp); //int value = pb; // loop forever while(1) { //call assembly language function to control LED1 my_asm(!pb); //API function to control LED4 //myled4 = value; // flip value and wait //value = ~ pb; //wait(0.2); } } */