#ifndef __COMMON
#define __COMMON

volatile unsigned int Statusword;

#include "hwdefs.h"
#include "hwinit.h"
#include "keyboard.h"
#include "sm621.h"
#include "hostcom.h"
#include "errors.h"

//Global consts

//Firmware version in MAJOR.MINOR form

#define FW_WER_MAJOR 1
#define FW_WER_MINOR 3

//GLobal defs

#define CHARSTOINT(h,l) ((h<<8)|(l))
#define STATUS_SET(attribute)	((Statusword) |= (attribute))
#define STATUS_RESET(attribute)	((Statusword) &= (~(attribute)))
#define STATUS_GET(attribute)	((Statusword) & (attribute))

#define LOWBYTE(attribute) ((uint8_t)((attribute)>>8))
#define HIGHBYTE(attribute) ((uint8_t)((attribute)))


#endif
