Droni e Droidi / Mbed 2 deprecated EMF32_ShowKey

Dependencies:   EFM32_SegmentLCD IOFuncLib mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "EFM32_SegmentLCD.h"
00003 
00004 /******************** Define I/O *****************************/
00005 InterruptIn in0(PB9);
00006 InterruptIn in1(PB10);
00007 
00008 silabs::EFM32_SegmentLCD segmentDisplay;
00009 
00010 
00011 DigitalOut myled1(LED1);
00012 DigitalOut myled0(LED0);
00013 
00014 /***************** Define callback handlers *********************/
00015 void in0_handler();
00016 void in1_handler();
00017 
00018 
00019 //------------- variabili
00020 int kcount = 0;
00021 
00022 
00023 
00024 
00025 //------------ Funzioni -------------
00026 #include "midiFunctions.h"
00027 #include "Functions.h"
00028 
00029 
00030 
00031 int main()
00032 {
00033     // Initialize pushbutton handler
00034     in0.rise(NULL);
00035     in0.fall(in0_handler);
00036 
00037     in1.rise(NULL);
00038     in1.fall(in1_handler);
00039 
00040     printKey(kcount);
00041     while(1) {
00042         sleep();
00043     }
00044 }