Files
hantai_project/code/esp32c3_arduino/lcd.h
T
2026-02-18 20:08:58 +08:00

34 lines
568 B
C

#ifndef LCD_H
#define LCD_H
#include <arduino.h>
//硬件spi貌似接错线了
#define LCD_SDA 3
#define LCD_SCL 2
#define LCD_CS 7
#define LCD_DS 6
#define USE_HORIZONTAL 2 //设置横屏或者竖屏显示 0或1为竖屏 2或3为横屏
#define LCD_W 320
#define LCD_H 240
#define OLED_CMD 0 //写命令
#define OLED_DATA 1 //写数据
#define VSPI FSPI
static const long spiClk = 80000000; // 80 MHz
void lcd_init();
void LCD_Clear(uint16_t Color);
void LCD_fillRect(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
#endif