1
0
Fork 0

Port action_* to mbed

This commit is contained in:
tmk 2014-06-17 00:57:59 +09:00
parent 04fe78ee0a
commit c67ae2a6b5
21 changed files with 92 additions and 64 deletions

View file

@ -30,16 +30,16 @@ extern "C" {
typedef struct {
uint8_t col;
uint8_t row;
} key_t;
} keypos_t;
/* key event */
typedef struct {
key_t key;
keypos_t key;
bool pressed;
uint16_t time;
} keyevent_t;
/* equivalent test of key_t */
/* equivalent test of keypos_t */
#define KEYEQ(keya, keyb) ((keya).row == (keyb).row && (keya).col == (keyb).col)
/* Rules for No Event:
@ -52,7 +52,7 @@ static inline bool IS_RELEASED(keyevent_t event) { return (!IS_NOEVENT(event) &&
/* Tick event */
#define TICK (keyevent_t){ \
.key = (key_t){ .row = 255, .col = 255 }, \
.key = (keypos_t){ .row = 255, .col = 255 }, \
.pressed = false, \
.time = (timer_read() | 1) \
}