-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglobals.h
37 lines (31 loc) · 863 Bytes
/
globals.h
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
/******************************************************************************
* Filename: globals.h
*
* Created: 2013/02/18 23:35
* Author: Ladislav Láska
* e-mail: laska@kam.mff.cuni.cz
*
******************************************************************************/
#ifndef __GLOBALS_H__
#define __GLOBALS_H__
#include <stdint.h>
/* Command flags */
extern volatile unsigned char flags;
#define FL_DISPLAY BIT0
#define FL_BEEP BIT1
#define FL_BUTTON BIT5
#define FL_GAME_LISTEN BIT6
#define FL_STONE_LISTEN BIT7
/* Event queue */
extern volatile unsigned char evlist;
#define EV_RED_BLINK BIT0
#define EV_YELLOW_BLINK BIT1
#define EV_GREEN_BLINK BIT2
#define EV_SHORT_POLL BIT3
#define EV_LONG_POLL BIT4
#define EV_TICK_POLL BIT5
#define EV_LISTEN BIT6
extern volatile uint16_t _digits;
#define DIGIT_DOTL 0x200
#define DIGIT_DOTR 0x100
#endif