#ifndef _LCD_H
#define _LCD_H

#include <p24FJ128GA006.h>

#include "../mcu/types.h"

#define	LCD_RS	LATBbits.LATB4
#define	LCD_E	LATBbits.LATB5

#define LCD_MAX_COL		16
#define LCD_MAX_ROW		2

// LCD Command Write Register
void LcdCommandW(uint8 x);

// LCD Data Write Register
void LcdDataW(uint8 x);

char lcd_ready(void);			// Check for LCD to be ready
char lcd_ready2(void);			// Check for LCD to be ready
void lcd_clrscr(void);			// Clear LCD. 
char lcd_init(void);			// LCD Init
void lcd_gotoxy(u_char x, u_char y);	// Output character string in current Cursor.
char* lcd_puts(char* str);		// Output character stream in current Cursor.
void lcd_putch(char ch);		// Output 1 character in current Cursor.

#endif
