Main header file for the ST7735R LCD chip.
More...
#include "main.h"
Go to the source code of this file.
Main header file for the ST7735R LCD chip.
pinkeee @ j.t0d.nosp@m.d@pr.nosp@m.otonm.nosp@m.ail..nosp@m.com
- Note
- See README for contributing guides and info.
- Copyright
- See License file.
Definition in file st7735r.h.
◆ ST7735R_RET_FAIL
| #define ST7735R_RET_FAIL 0 |
◆ ST7735R_RET_OK
◆ ST7735R_SPI_TIMEOUT
| #define ST7735R_SPI_TIMEOUT 100 |
◆ ST7735R_Return
◆ ST7735R_Backlight_Off()
Turn backlight off.
- Returns
- either ST7735R_RET_OK or ST7735R_RET_FAIL
Definition at line 74 of file st7735r.c.
82 HAL_GPIO_WritePin(A0_GPIO_Port, A0_Pin, GPIO_PIN_RESET);
84 HAL_SPI_Transmit(self->
SPI_Handler, tx,
sizeof(tx), 100);
static uint8_t ST7735R_DISPOFF_CMD
DISPOFF command.
void ST7735R_CS_Low(void)
Bring low SPI1 CS pin.
void ST7735R_CS_High(void)
Set SPI1 CS pin.
SPI_HandleTypeDef * SPI_Handler
◆ ST7735R_CS_High()
| void ST7735R_CS_High |
( |
void |
| ) |
|
Set SPI1 CS pin.
- Parameters
-
- Returns
- Void N/A
Definition at line 16 of file st7735r.c.
18 HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_SET);
◆ ST7735R_CS_Low()
| void ST7735R_CS_Low |
( |
void |
| ) |
|
Bring low SPI1 CS pin.
- Parameters
-
- Returns
- Void N/A
Definition at line 26 of file st7735r.c.
28 HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_RESET);
◆ ST7735R_Write_Command()
Write command on device.
- Parameters
-
| cmd | what command to write to |
- Returns
- either ST7735R_RET_OK or ST7735R_RET_FAIL
Definition at line 36 of file st7735r.c.
38 HAL_GPIO_WritePin(A0_GPIO_Port, A0_Pin, GPIO_PIN_RESET);
void ST7735R_CS_Low(void)
Bring low SPI1 CS pin.
#define ST7735R_SPI_TIMEOUT
void ST7735R_CS_High(void)
Set SPI1 CS pin.
SPI_HandleTypeDef * SPI_Handler
◆ ST7735R_Write_Data()
Write data to RAM on device.
- Parameters
-
| data | what command to write to |
| size | size of data buffer |
- Returns
- either ST7735R_RET_OK or ST7735R_RET_FAIL
Definition at line 56 of file st7735r.c.
58 HAL_GPIO_WritePin(A0_GPIO_Port, A0_Pin, GPIO_PIN_SET);
void ST7735R_CS_Low(void)
Bring low SPI1 CS pin.
#define ST7735R_SPI_TIMEOUT
void ST7735R_CS_High(void)
Set SPI1 CS pin.
SPI_HandleTypeDef * SPI_Handler
◆ ST7735R_CASET_CMD
| uint8_t ST7735R_CASET_CMD = 0x2A |
|
static |
CASET command.
Column address set
- Returns
- 0x2A
Definition at line 153 of file st7735r.h.
◆ ST7735R_COLMOD_CMD
| uint8_t ST7735R_COLMOD_CMD = 0x3A |
|
static |
COLMOD command.
Interface pixel format
- Returns
- 0x3A
Definition at line 230 of file st7735r.h.
◆ ST7735R_DISPOFF_CMD
| uint8_t ST7735R_DISPOFF_CMD = 0x28 |
|
static |
DISPOFF command.
Display off
- Returns
- 0x28
Definition at line 139 of file st7735r.h.
◆ ST7735R_DISPON_CMD
| uint8_t ST7735R_DISPON_CMD = 0x29 |
|
static |
DISPON command.
Display on
- Returns
- 0x29
Definition at line 146 of file st7735r.h.
◆ ST7735R_GAMSET_CMD
| uint8_t ST7735R_GAMSET_CMD = 0x26 |
|
static |
GAMSET command.
Gamma curve select
- Returns
- 0x26
Definition at line 132 of file st7735r.h.
◆ ST7735R_IDMOFF_CMD
| uint8_t ST7735R_IDMOFF_CMD = 0x38 |
|
static |
IDMOFF command.
Idle mode off
- Returns
- 0x38
Definition at line 216 of file st7735r.h.
◆ ST7735R_IDMON_CMD
| uint8_t ST7735R_IDMON_CMD = 0x39 |
|
static |
IDMON command.
Idle mode on
- Returns
- 0x39
Definition at line 223 of file st7735r.h.
◆ ST7735R_INVOFF_CMD
| uint8_t ST7735R_INVOFF_CMD = 0x20 |
|
static |
INVOFF command.
Display inversion off
- Returns
- 0x20
Definition at line 118 of file st7735r.h.
◆ ST7735R_INVON_CMD
| uint8_t ST7735R_INVON_CMD = 0x21 |
|
static |
INVON command.
Display inversion on
- Returns
- 0x21
Definition at line 125 of file st7735r.h.
◆ ST7735R_MADCTL_CMD
| uint8_t ST7735R_MADCTL_CMD = 0x36 |
|
static |
MADCTL command.
Memory data access control
- Returns
- 0x36
Definition at line 209 of file st7735r.h.
◆ ST7735R_NOP_CMD
| uint8_t ST7735R_NOP_CMD = 0x00 |
|
static |
NOP command.
This command is empty command.
- Returns
- 0x00
Definition at line 27 of file st7735r.h.
◆ ST7735R_NORON_CMD
| uint8_t ST7735R_NORON_CMD = 0x13 |
|
static |
NORON command.
Partial off (Normal)
- Returns
- 0x13
Definition at line 111 of file st7735r.h.
◆ ST7735R_PTLAR_CMD
| uint8_t ST7735R_PTLAR_CMD = 0x30 |
|
static |
PTLAR command.
Partial start/end address set
- Returns
- 0x30
Definition at line 188 of file st7735r.h.
◆ ST7735R_PTLON_CMD
| uint8_t ST7735R_PTLON_CMD = 0x12 |
|
static |
PTLON command.
Partial mode on
- Returns
- 0x12
Definition at line 104 of file st7735r.h.
◆ ST7735R_RAMRD_CMD
| uint8_t ST7735R_RAMRD_CMD = 0x2E |
|
static |
RAMRD command.
Memory read
- Returns
- 0x2E
Definition at line 181 of file st7735r.h.
◆ ST7735R_RAMWR_CMD
| uint8_t ST7735R_RAMWR_CMD = 0x2C |
|
static |
RAMWR command.
Memory write
- Returns
- 0x2C
Definition at line 167 of file st7735r.h.
◆ ST7735R_RASET_CMD
| uint8_t ST7735R_RASET_CMD = 0x2B |
|
static |
RASET command.
Row address set
- Returns
- 0x2B
Definition at line 160 of file st7735r.h.
◆ ST7735R_RDDCOLMOD_CMD
| uint8_t ST7735R_RDDCOLMOD_CMD = 0xC0 |
|
static |
RDDCOLMOD command.
Read Display Pixel
- Returns
- 0xC0
Definition at line 69 of file st7735r.h.
◆ ST7735R_RDDID_CMD
| uint8_t ST7735R_RDDID_CMD = 0x04 |
|
static |
RDDID command.
Read Display ID
- Returns
- 0x04
Definition at line 41 of file st7735r.h.
◆ ST7735R_RDDIM_CMD
| uint8_t ST7735R_RDDIM_CMD = 0xD0 |
|
static |
RDDIM command.
Read Display Image
- Returns
- 0xD0
Definition at line 76 of file st7735r.h.
◆ ST7735R_RDDMADCTL_CMD
| uint8_t ST7735R_RDDMADCTL_CMD = 0xB0 |
|
static |
RDDMADCTL command.
Read Display
- Returns
- 0xB0
Definition at line 62 of file st7735r.h.
◆ ST7735R_RDDPM_CMD
| uint8_t ST7735R_RDDPM_CMD = 0xA0 |
|
static |
RDDPM command.
Read Display Power
- Returns
- 0xA0
Definition at line 55 of file st7735r.h.
◆ ST7735R_RDDSM_CMD
| uint8_t ST7735R_RDDSM_CMD = 0xE0 |
|
static |
RDDSM command.
Read Display Signal
- Returns
- 0xE0
Definition at line 83 of file st7735r.h.
◆ ST7735R_RDDST_CMD
| uint8_t ST7735R_RDDST_CMD = 0x09 |
|
static |
RDDST command.
Read Display Status
- Returns
- 0x09
Definition at line 48 of file st7735r.h.
◆ ST7735R_RDID1_CMD
| uint8_t ST7735R_RDID1_CMD = 0xDA |
|
static |
RDID1 command.
Read ID1
- Returns
- 0xDA
Definition at line 237 of file st7735r.h.
◆ ST7735R_RDID2_CMD
| uint8_t ST7735R_RDID2_CMD = 0xDB |
|
static |
RDID2 command.
Read ID2
- Returns
- 0xDB
Definition at line 244 of file st7735r.h.
◆ ST7735R_RDID3_CMD
| uint8_t ST7735R_RDID3_CMD = 0xDC |
|
static |
RDID3 command.
Read ID3
- Returns
- 0xDC
Definition at line 251 of file st7735r.h.
◆ ST7735R_RGBSET_CMD
| uint8_t ST7735R_RGBSET_CMD = 0x2D |
|
static |
RGBSET command.
LUT for 4k,65k,262k color
- Returns
- 0x2D
Definition at line 174 of file st7735r.h.
◆ ST7735R_SLPIN_CMD
| uint8_t ST7735R_SLPIN_CMD = 0x10 |
|
static |
SLPIN command.
Sleep in & booster off
- Returns
- 0x10
Definition at line 90 of file st7735r.h.
◆ ST7735R_SLPOUT_CMD
| uint8_t ST7735R_SLPOUT_CMD = 0x11 |
|
static |
SLPOUT command.
Sleep out & booster on
- Returns
- 0x11
Definition at line 97 of file st7735r.h.
◆ ST7735R_SWRESET_CMD
| uint8_t ST7735R_SWRESET_CMD = 0x01 |
|
static |
SWRESET command.
Software reset
- Returns
- 0x01
Definition at line 34 of file st7735r.h.
◆ ST7735R_TEOFF_CMD
| uint8_t ST7735R_TEOFF_CMD = 0x34 |
|
static |
TEOFF command.
Tearing effect line off
- Returns
- 0x34
Definition at line 195 of file st7735r.h.
◆ ST7735R_TEON_CMD
| uint8_t ST7735R_TEON_CMD = 0x35 |
|
static |
TEON command.
Tearing effect mode set & on
- Returns
- 0x35
Definition at line 202 of file st7735r.h.