el codigo de google maps

Dependencies:   GPS_G mbed

/media/uploads/tony63/tareagsm.png

DebouncedIn.h

Committer:
tony63
Date:
16 months ago
Revision:
3:0ef0f1632347
Parent:
0:b2a6aa7c0c8c

File content as of revision 3:0ef0f1632347:

#include "mbed.h"

    class DebouncedIn {
        public:      
             DebouncedIn(PinName in);

             int read (void);
             operator int();
              
             int rising(void);
             int falling(void);
             int steady(void);
              
        private :    
               // objects
               DigitalIn _in;    
               Ticker _ticker;

               // function to take a sample, and update flags
               void _sample(void);

               // counters and flags
               int _samples;
               int _output;
               int _output_last;
               int _rising_flag;
               int _falling_flag;
               int _state_counter;

    };