Emulation of the 1970's Chip-8 machine. The emulator has 7 games that are unmodified from the original Chip-8 format.

Dependencies:   mbed

GameInput.h

Committer:
taylorza
Date:
2015-02-08
Revision:
0:bc3f11b1b41f

File content as of revision 0:bc3f11b1b41f:

#include "mbed.h"

#ifndef __GAMEINPUT_H__
#define __GAMEINPUT_H__

class GameInput
{
    private:
        static DigitalIn _up;
        static DigitalIn _down;
        static DigitalIn _left;
        static DigitalIn _right;
        static DigitalIn _square;
        static DigitalIn _circle;
    
    public:
        static inline bool isUpPressed() { return !_up; }
        static inline bool isDownPressed() { return !_down; }
        static inline bool isLeftPressed() { return !_left; }
        static inline bool isRightPressed() { return !_right; }
        static inline bool isSquarePressed() { return !_square; }
        static inline bool isCirclePressed() { return !_circle; }
};

#endif //__GAMEINPUT_H__