//------------< graphics.h >-----------
extern void LcdInit(void);
extern void WriteCommand(char adresa, char sdata);
extern void SetWindowsCoordinates(unsigned int xxstart, unsigned int yystart, unsigned int xxlength, unsigned int yylength);
extern void SetPixel(unsigned int xposition, unsigned int yposition,unsigned int color);
extern void CleanScreen(unsigned int color);
extern void DrawBox(unsigned int xstart, unsigned int ystart, unsigned int xlength, unsigned int ylength, unsigned int color);
extern void Horizontaline(signed int xstart, signed int ystart, unsigned int xlength, unsigned int width, unsigned int color);
extern void VerticalLine(signed int xstart, signed int ystart, unsigned int ylength, unsigned int width, unsigned int color);
extern unsigned int WriteCharacter(unsigned char character,unsigned int xstart,unsigned int ystart,unsigned int color,unsigned int color_screen,unsigned char size);
extern void DrawFreeLine(unsigned int startx, unsigned int starty, unsigned int endx, unsigned int endy,unsigned char width, unsigned int color);
extern void WriteText(unsigned char* line, unsigned short x, unsigned short y, unsigned int color,unsigned int color_screen, unsigned char size);
extern void WriteTextMenu(const unsigned char* line, unsigned short x, unsigned short y, unsigned int color,unsigned int color_screen, unsigned char size);
extern char ReadCommand(int adresa);
extern void DrawLine(unsigned int xstart,unsigned int ystart, unsigned char length,unsigned int uhel,unsigned char width, unsigned int color);
extern unsigned int LoadPicture(unsigned int xstart,unsigned int ystart,unsigned char picture,unsigned int color);
extern void SetFont(unsigned char font);
extern void LoadIcone(unsigned int xstart,unsigned int ystart,unsigned char icone);
extern void LoadMainMenu(unsigned char activ); 
extern const unsigned short Pictures[];
extern void DrawAxisX(unsigned int xstart, unsigned int ystart,unsigned int length, unsigned char krok);
extern void ChangeMenu(unsigned char activ);
extern unsigned int WriteTextB(unsigned char* line, unsigned short x, unsigned short y, unsigned int color,unsigned int color_screen, unsigned char size);
extern void ScrollH(unsigned char MaxHodnot,unsigned char ActualHodnota,unsigned char act);
extern void TrojB(unsigned int xstart, unsigned int ystart, signed char xlenght, unsigned char ylenght,unsigned int color);
extern void DrawAxisXT2(unsigned int xstart, unsigned int ystart,unsigned int length, unsigned char krok,unsigned char width);
extern void DrawAxisY(unsigned int xstart, unsigned int ystart,unsigned int length, unsigned char krok);
extern void ScrollV(unsigned char MaxHodnot,unsigned char ActualHodnota,unsigned char act);
extern void Troj(unsigned int xstart, unsigned int ystart, signed char xlenght, unsigned char ylenght,unsigned int color);
extern void ShowZoom(unsigned int xstart,unsigned int ystart,unsigned char activ,unsigned char Actual_Zoom);
extern void CircleClear(signed int xstart1, signed int ystart1,signed int xstart2,signed int ystart2,signed int xstart3, signed int ystart3,signed int xstart4,signed int ystart4,  unsigned char polomer,unsigned int color1,unsigned int color2);
extern void DrawLineEnd(signed int xstart,signed int ystart, unsigned int color);
extern void DrawCircle(unsigned int xstar,unsigned int ystart,unsigned int polomer,unsigned int color);
extern void DrawSipka(unsigned int xstart,unsigned int ystart,unsigned int uhel,unsigned int length,unsigned int color);
extern void Circle(unsigned int xstart, unsigned int ystart,unsigned char polomer,unsigned int color);
extern unsigned int WriteTranspaCharacterB(unsigned char character,unsigned int xstart,unsigned int ystart,unsigned int color,unsigned char size);
extern void DrawAxisYT2(unsigned int xstart, unsigned int ystart,unsigned int length, unsigned char krok);
extern unsigned int WriteCharacterB(unsigned char character,unsigned int xstart,unsigned int ystart,unsigned int color,unsigned int color_screen,unsigned char size);
extern void RadioButton(unsigned int xstart, unsigned int ystart, unsigned int color,unsigned int color_screen,unsigned char act);
extern void ScrollH2(unsigned char MaxHodnot,unsigned char ActualHodnota,unsigned char act);
extern unsigned int WriteTextMenuB(const unsigned char* line, unsigned short x, unsigned short y, unsigned int color,unsigned int color_screen, unsigned char size);
extern unsigned int WriteTextAligR(unsigned char* line, unsigned short x, unsigned short y, unsigned int color,unsigned int color_screen, unsigned char size);
extern void JoinText(unsigned char* Text1, unsigned char* Text2);
extern unsigned char FontHigh(unsigned char font);

//--------------< Glob.Var. >----------------------
unsigned char sloupec_bytu;
unsigned char font_height;
unsigned char font_number;
const unsigned char *character_table;
const unsigned char *width_table;
const unsigned int  *offset_table;

//-----------< Rozhrani SH7216 a S1D13742 >------------
#define LCD_wr      PB.DR.BIT.B0    // Akt. 0
#define LCD_rd      PA.DR.BIT.B17   // Akt. 0
#define LCD_cs      PA.DR.BIT.B0    // Akt. 0
#define LCD_dc      PA.DR.BIT.B13   // Data/Adresa (Adresa je v 0)
#define LCD_reset   PD.DR.BIT.B16   // Akt. 0
#define LCD_io      PD.DR.WORD.L    // I/O 
#define LCD_io_byte PD.DR.BYTE.LL   // I/O dolnich 8 bitu pro cteni
#define LCD_io_pfc  PFC.PDIORL.WORD // I/O smer

