/* Hlavickovy soubor k driveru LCD ---------------------------- */
#ifndef _LCD_HD44780_H
#define _LCD_HD44780_H

#include "PIN_config.h"
#include <stdint.h>

// Definice instrukci pro LCD
#define LCD_Instrukce_Clear		0x01
#define LCD_Instrukce_Home		0x02
#define LCD_Instrukce_CursorON	0x0F
#define LCD_Instrukce_CursorOFF	0x0C

// Definice konstant
#define LCD_instrukce	0
#define LCD_data		1

#define ON				1
#define OFF				0

// Definice maker
#define LCD_E_Delay		for(del=0;del<49;del++);	// Zpozdeni pro enable  ???ns	
#define LCD_E_Pulz		LCD_E_High(); LCD_E_Delay; LCD_E_Low();		// Pulz na Enable

// Prototypy funci ---------------------------------------
void LCD_HD44780_Init(void);
void LCD_HD44780_Write(uint8_t cmd, uint8_t typ);
void LCD_HD44780_Clear(void);
void LCD_HD44780_Home(void);
void LCD_HD44780_GoTo(uint8_t x, uint8_t y);
void LCD_HD44780_PutChar(uint8_t znak);
void LCD_HD44780_PutString(const char *s);
void LCD_HD44780_Cursor(uint8_t stav);
void LCD_HD44780_NahratZnak(uint8_t pozice, const uint8_t data[8]);
void LCD_HD44780_PutInt16(uint16_t cislo,uint8_t cifer);
void LCD_HD44780_PutBuildDate(void);
void LCD_HD44780_TeplotaNaLCD(int16_t hodnota);
void LCD_HD44780_TimeToLCD(void);
void BinToTFT(uint8_t cislo);
uint8_t BinToHex(uint8_t bin);
void LCD_HD44780_HexToLCD(uint8_t hex);

// Vlastni znaky
#define Char_SipkaVpravo		0
#define Char_SipkaVlevo			1
#define Char_SipkaNahoru		2
#define Char_SipkaDolu			3
#define Char_StupenCelsia		4


#endif
/* Konec souboru */
