forked from Jstudner/jcorp-nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay_ST7789.h
More file actions
32 lines (25 loc) · 1013 Bytes
/
Copy pathDisplay_ST7789.h
File metadata and controls
32 lines (25 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <Arduino.h>
#include <SPI.h>
#define LCD_WIDTH 172 //LCD width
#define LCD_HEIGHT 320 //LCD height
#define SPIFreq 80000000
#define EXAMPLE_PIN_NUM_MISO -1
#define EXAMPLE_PIN_NUM_MOSI 45
#define EXAMPLE_PIN_NUM_SCLK 40
#define EXAMPLE_PIN_NUM_LCD_CS 42
#define EXAMPLE_PIN_NUM_LCD_DC 41
#define EXAMPLE_PIN_NUM_LCD_RST 39
#define EXAMPLE_PIN_NUM_BK_LIGHT 46
#define Frequency 1000 // PWM frequencyconst
#define Resolution 10
#define VERTICAL 0
#define HORIZONTAL 1
#define Offset_X 34
#define Offset_Y 0
void LCD_SetCursor(uint16_t x1, uint16_t y1, uint16_t x2,uint16_t y2);
void LCD_Init(void);
void LCD_SetCursor(uint16_t Xstart, uint16_t Ystart, uint16_t Xend, uint16_t Yend);
void LCD_addWindow(uint16_t Xstart, uint16_t Ystart, uint16_t Xend, uint16_t Yend,uint16_t* color);
void Backlight_Init(void);
void Set_Backlight(uint8_t Light);