1D-Pong game based on a LED strip with 150 LPD6803-controlled pixels. Game keeps score for 'best-of-21' game. Written for KL25Z

Dependencies:   MODSERIAL mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GameButton.h Source File

GameButton.h

00001 #ifndef _GAMEBUTTON_H_
00002 #define _GAMEBUTTON_H_
00003 
00004 #include "mbed.h"
00005 class GameButton
00006 {
00007     public:
00008     GameButton(){};
00009     GameButton(PinName pin, float time);
00010     bool pushflag;
00011     bool getTimeoutActive(void);
00012     protected:
00013     virtual void pushhandlercallback(void){};
00014     private:
00015     InterruptIn *intpin;
00016     Timeout     timeout;
00017     float m_time;
00018     bool    m_timeoutactive;
00019     void TimeOutHandler(void);
00020     virtual void PushHandler(void);
00021     private:
00022     PinName inpin;
00023 };
00024 
00025 
00026 #endif