#pragma once

#include "GLCD.h"
#include "OS.h"
#include "Applications.h"

#ifdef PCSIM
#include "resource.h"
extern unsigned short videoRam[MAX_X*MAX_Y];
extern unsigned short videoStore[MAX_X*MAX_Y];
void initPHY(void);
void initSerial(void);
int GetSerialData(OS_CONNECT com, unsigned char* buffer);
int GetSerialDataCount(OS_CONNECT com);
unsigned char* GetSerialData(OS_CONNECT com);
int SendSerialData(OS_CONNECT com, unsigned char* buffer);
ANSWER CheckSerialBuffer(OS_CONNECT com);
ANSWER CheckSerialSendComplete(void);

#else

#define initSerial() ;
#define initSerial() ;
unsigned char* GetSerialData(OS_CONNECT com);
int GetSerialData(OS_CONNECT com, unsigned char* buffer);
int GetSerialDataCount(OS_CONNECT com);
int SendSerialData(OS_CONNECT com, unsigned char* buffer);
ANSWER CheckSerialBuffer(OS_CONNECT com);
void ClearSerialBuffer(OS_CONNECT com);
ANSWER CheckSerialSendComplete(void);
#endif
