#ifndef __LCD_2INCH_H
#define __LCD_2INCH_H

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define LCD_W   240 //LCD width
#define LCD_H   320 //LCD height
  
#define PIN_RST  22   
#define PIN_DC   25   
#define PIN_BL   24   
#define TP_RST_PIN   27   
#define LCD_SIZE   (LCD_W*LCD_H*2)                  

void Lcd_Gpio_Init(void);
void Lcd_Init(void); 
void Lcd_Clear(u_int16_t Color);
void Display(u_int16_t *image);
void Draw_Point(u_int16_t x, u_int16_t y, u_int16_t Color);

void Spi_write_word(u_int16_t da);
void Set_Cursor(u_int16_t x, u_int16_t y);
void Set_Window(u_int16_t start_x, u_int16_t start_y, u_int16_t end_x, u_int16_t  end_y);
void LCD_Write_Block(u_int16_t x_start, u_int16_t y_start, u_int16_t w, u_int16_t h, u_int16_t color);

#endif
