mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-12 04:40:58 +00:00
1f2b1dedcc
* Install dependencies before executing unit tests. * Split out UTF-8 decoder. * Fixup python formatting rules. * Add documentation for QGF/QFF and the RLE format used. * Add CLI commands for converting images and fonts. * Add stub rules.mk for QP. * Add stream type. * Add base driver and comms interfaces. * Add support for SPI, SPI+D/C comms drivers. * Include <qp.h> when enabled. * Add base support for SPI+D/C+RST panels, as well as concrete implementation of ST7789. * Add support for GC9A01. * Add support for ILI9341. * Add support for ILI9163. * Add support for SSD1351. * Implement qp_setpixel, including pixdata buffer management. * Implement qp_line. * Implement qp_rect. * Implement qp_circle. * Implement qp_ellipse. * Implement palette interpolation. * Allow for streams to work with either flash or RAM. * Image loading. * Font loading. * QGF palette loading. * Progressive decoder of pixel data supporting Raw+RLE, 1-,2-,4-,8-bpp monochrome and palette-based images. * Image drawing. * Animations. * Font rendering. * Check against 256 colours, dump out the loaded palette if debugging enabled. * Fix build. * AVR is not the intended audience. * `qmk format-c` * Generation fix. * First batch of docs. * More docs and examples. * Review comments. * Public API documentation.
52 lines
2.4 KiB
C
52 lines
2.4 KiB
C
// Copyright 2021 Paul Cotter (@gr1mr3aver)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Quantum Painter ST77XX command opcodes
|
|
|
|
// System function commands
|
|
#define ST77XX_CMD_NOP 0x00 // No operation
|
|
#define ST77XX_CMD_RESET 0x01 // Software reset
|
|
#define ST77XX_GET_ID_INFO 0x04 // Get ID information
|
|
#define ST77XX_GET_STATUS 0x09 // Get status
|
|
#define ST77XX_GET_PWR_MODE 0x0A // Get power mode
|
|
#define ST77XX_GET_MADCTL 0x0B // Get mem access ctl
|
|
#define ST77XX_GET_PIX_FMT 0x0C // Get pixel format
|
|
#define ST77XX_GET_IMG_FMT 0x0D // Get image format
|
|
#define ST77XX_GET_SIG_MODE 0x0E // Get signal mode
|
|
#define ST77XX_CMD_SLEEP_ON 0x10 // Enter sleep mode
|
|
#define ST77XX_CMD_SLEEP_OFF 0x11 // Exist sleep mode
|
|
#define ST77XX_CMD_PARTIAL_ON 0x12 // Enter partial mode
|
|
#define ST77XX_CMD_NORMAL_ON 0x13 // Exit partial mode
|
|
#define ST77XX_CMD_INVERT_OFF 0x20 // Exit inverted mode
|
|
#define ST77XX_CMD_INVERT_ON 0x21 // Enter inverted mode
|
|
#define ST77XX_SET_GAMMA 0x26 // Set gamma params
|
|
#define ST77XX_CMD_DISPLAY_OFF 0x28 // Disable display
|
|
#define ST77XX_CMD_DISPLAY_ON 0x29 // Enable display
|
|
#define ST77XX_SET_COL_ADDR 0x2A // Set column address
|
|
#define ST77XX_SET_ROW_ADDR 0x2B // Set page (row) address
|
|
#define ST77XX_SET_MEM 0x2C // Set memory
|
|
#define ST77XX_GET_MEM 0x2E // Get memory
|
|
#define ST77XX_SET_PARTIAL_AREA 0x30 // Set partial area
|
|
#define ST77XX_CMD_TEARING_OFF 0x34 // Tearing line disabled
|
|
#define ST77XX_CMD_TEARING_ON 0x35 // Tearing line enabled
|
|
#define ST77XX_SET_MADCTL 0x36 // Set mem access ctl
|
|
#define ST77XX_CMD_IDLE_OFF 0x38 // Exit idle mode
|
|
#define ST77XX_CMD_IDLE_ON 0x39 // Enter idle mode
|
|
#define ST77XX_SET_PIX_FMT 0x3A // Set pixel format
|
|
#define ST77XX_GET_ID1 0xDA // Get ID1
|
|
#define ST77XX_GET_ID2 0xDB // Get ID2
|
|
#define ST77XX_GET_ID3 0xDC // Get ID3
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// MADCTL Flags
|
|
#define ST77XX_MADCTL_MY 0b10000000
|
|
#define ST77XX_MADCTL_MX 0b01000000
|
|
#define ST77XX_MADCTL_MV 0b00100000
|
|
#define ST77XX_MADCTL_ML 0b00010000
|
|
#define ST77XX_MADCTL_RGB 0b00000000
|
|
#define ST77XX_MADCTL_BGR 0b00001000
|
|
#define ST77XX_MADCTL_MH 0b00000100
|