summaryrefslogtreecommitdiff
path: root/Pad.h
blob: a9f3ea78f4c1fcbac9f696beda1fc1dde3c93637 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef PAD_H__
#define PAD_H__

/* **************************************
 *  Includes                            *
 * **************************************/

#include "Global_Inc.h"

/* **************************************
 *  Defines                             *
 * **************************************/

/* **************************************
 *  Structs and enums                   *
 * **************************************/
 /* BTN_A, BTN_B, BTN_C, BTN_UP, BTN_RIGHT, BTN_DOWN, BTN_LEFT. */

#ifdef __cplusplus
extern "C"
{
#endif /* cplusplus. */


typedef enum t_padbuttons
{
    PAD_A = BTN_A,
    PAD_B = BTN_B,
    PAD_C = BTN_C,
    PAD_LEFT = BTN_LEFT,
    PAD_RIGHT = BTN_RIGHT,
    PAD_UP = BTN_UP,
    PAD_DOWN = BTN_DOWN,
}PAD_BUTTONS;

/* **************************************
 *  Global prototypes                   *
 * **************************************/

bool PadButtonReleased(PAD_BUTTONS btn);
bool PadButtonPressed(PAD_BUTTONS btn);
bool PadButtonPressedFrames(PAD_BUTTONS btn, uint8_t frames);
bool PadDirectionKeyPressed(void);
bool PadAnyKeyPressed(void);

#ifdef __cplusplus
}
#endif /* cplusplus. */

#endif /* PAD_H__. */