#ifndef LCD_H
#define LCD_H

#include <stdio.h>
#include <inttypes.h>
#include "esp_log.h"
#include "spi.h"

#define LCD_CS  7
#define LCD_DS  6

#define USE_HORIZONTAL 2  //设置横屏或者竖屏显示 0或1为竖屏 2或3为横屏
#define LCD_WW  320
#define LCD_HH  240

// typedef struct{
//    uint16_t buf[LCD_WW*LCD_HH];
//    uint16_t fps_count;
//    uint16_t fps;
// }lcd_t;

// extern lcd_t lcd_main;


void lcd_set_window(uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2);
esp_err_t lcd_spi_send_data_any(uint8_t *data, uint32_t len);
void lcd_init();

// void lcd_clear_buf(uint16_t Color);
// void lcd_send_full_buf();
// void lcd_one_second_task();


#endif