ESE519 / Mbed 2 deprecated Part2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 //Initialize Digital Out and Interrupt
00004 InterruptIn pound(p25);
00005 DigitalOut myled(LED1);
00006 
00007 //Define Interrupt Functions
00008 void pON () {
00009         myled = 1;
00010     }
00011 void pOFF() {
00012         myled = 0;
00013     {
00014         
00015 int main() {
00016     myled = 0;
00017     //Initialize Interrupt for rising and falling edge
00018     pound.rise(&pON);
00019     pound.fall(&pOFF);
00020     while(1) {
00021     }
00022 }