/*
 * LCD.h
 *
 *  Created on: Nov 4, 2011
 *      Author: RomanM
 */

#ifndef LCD_H_
#define LCD_H_

typedef enum {
	LCD_Cursor_OFF		= 0,
	LCD_Cursor_Blink	= 1,
	LCD_Cursor_ON		= 2,
	LCD_Cursor_BlinkON	= 3
} LCD_CursorState_t;

#define LCD_IsBusy()	(LCD_ReadState() & 0x80)

void LCD_Init(void);

void LCD_PutC(char c);
void LCD_PutS(char *str);

uint8_t LCD_ReadState(void);

void LCD_Clear(void);
void LCD_On(uint8_t on);
void LCD_GotoXY(uint8_t x, uint8_t y);
void LCD_Cursor(LCD_CursorState_t state);
void LCD_DefineCharacter(uint8_t charNo, const uint8_t *layoutPtr);

void LCD_BackLight(uint16_t value);

#endif /* LCD_H_ */
