#ifndef __GLOBAL_VARS
#define __GLOBAL_VARS
#define DEBUG_LEVEL 0
#define DEBUG_CC
//CC modes
#define CC1 0
#define CC2 1
#define CC3 2
#define CC4 3

#define CC_TEXT 0
#define CC_COMMAND 1

//screen size
#define CC_HEIGHT 15
#define CC_WIDTH 32

//color indexes
#define WHITE		0
#define GREEN		1
#define BLUE		2
#define CYAN		3
#define RED			4
#define YELLOW	5
#define MAGENTA	6
#define BLACK		7

#define OSD_FREQ			50
#define RECEIVER_FREQ	50

int time_ms(void);

#endif //__GLOBALS

#ifdef DEBUG_CC

#define dprint(level, format, args...) if(level <= DEBUG_LEVEL) {char msg[100]; sprintf(msg,format,##args);printf("[CC: %dms] %s\n", time_ms(), msg); fflush(stdout);}
#else
#define dprint(args...)
#endif
