XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
device.h
浏览该文件的文档.
1
27#ifndef __xwcd_peripheral_spi_lcd_st7735_device_h__
28#define __xwcd_peripheral_spi_lcd_st7735_device_h__
29
30#include <xwos/standard.h>
32
42#define XWDS_ST7735_ID 0x5CU
43
47#define XWDS_ST7735_WIDTH 132U
48#define XWDS_ST7735_HEIGHT 162U
49
54 XWDS_ST7735_NOP = 0x00U, /* No Operation: NOP */
55 XWDS_ST7735_SWRESET = 0x01U, /* Software reset: SWRESET */
56 XWDS_ST7735_RDDID = 0x04U, /* Read Display ID: RDDID */
57 XWDS_ST7735_RDDST = 0x09U, /* Read Display Statu: RDDST */
58 XWDS_ST7735_RDDPM = 0x0AU, /* Read Display Power: RDDPM */
59 XWDS_ST7735_RDDMADCTL = 0x0BU, /* Read Display: RDDMADCTL */
60 XWDS_ST7735_RDDCOLMOD = 0x0CU, /* Read Display Pixel: RDDCOLMOD */
61 XWDS_ST7735_RDDIM = 0x0DU, /* Read Display Image: RDDIM */
62 XWDS_ST7735_RDDSM = 0x0EU, /* Read Display Signal: RDDSM */
63 XWDS_ST7735_SLPIN = 0x10U, /* Sleep in & booster off: SLPIN */
64 XWDS_ST7735_SLPOUT = 0x11U, /* Sleep out & booster on: SLPOUT */
65 XWDS_ST7735_PTLON = 0x12U, /* Partial mode on: PTLON */
66 XWDS_ST7735_NORON = 0x13U, /* Partial off (Normal): NORON */
67 XWDS_ST7735_INVOFF = 0x20U, /* Display inversion off: INVOFF */
68 XWDS_ST7735_INVON = 0x21U, /* Display inversion on: INVON */
69 XWDS_ST7735_GAMSET = 0x26U, /* Gamma curve select: GAMSET */
70 XWDS_ST7735_DISPOFF = 0x28U, /* Display off: DISPOFF */
71 XWDS_ST7735_DISPON = 0x29U, /* Display on: DISPON */
72 XWDS_ST7735_CASET = 0x2AU, /* Column address set: CASET */
73 XWDS_ST7735_RASET = 0x2BU, /* Row address set: RASET */
74 XWDS_ST7735_RAMWR = 0x2CU, /* Memory write: RAMWR */
75 XWDS_ST7735_RGBSET = 0x2DU, /* LUT for 4k,65k,262k color: RGBSET */
76 XWDS_ST7735_RAMRD = 0x2EU, /* Memory read: RAMRD */
77 XWDS_ST7735_PTLAR = 0x30U, /* Partial start/end address set: PTLAR */
78 XWDS_ST7735_TEOFF = 0x34U, /* Tearing effect line off: TEOFF */
79 XWDS_ST7735_TEON = 0x35U, /* Tearing effect mode set & on: TEON */
80 XWDS_ST7735_MADCTL = 0x36U, /* Memory data access control: MADCTL */
81 XWDS_ST7735_IDMOFF = 0x38U, /* Idle mode off: IDMOFF */
82 XWDS_ST7735_IDMON = 0x39U, /* Idle mode on: IDMON */
83 XWDS_ST7735_COLMOD = 0x3AU, /* Interface pixel format: COLMOD */
84 XWDS_ST7735_FRMCTR1 = 0xB1U, /* In normal mode (Full colors): FRMCTR1 */
85 XWDS_ST7735_FRMCTR2 = 0xB2U, /* In Idle mode (8-colors): FRMCTR2 */
86 XWDS_ST7735_FRMCTR3 = 0xB3U, /* In partial mode + Full colors: FRMCTR3 */
87 XWDS_ST7735_INVCTR = 0xB4U, /* Display inversion control: INVCTR */
88 XWDS_ST7735_PWCTR1 = 0xC0U, /* Power control setting: PWCTR1 */
89 XWDS_ST7735_PWCTR2 = 0xC1U, /* Power control setting: PWCTR2 */
90 XWDS_ST7735_PWCTR3 = 0xC2U, /* In normal mode (Full colors): PWCTR3 */
91 XWDS_ST7735_PWCTR4 = 0xC3U, /* In Idle mode (8-colors): PWCTR4 */
92 XWDS_ST7735_PWCTR5 = 0xC4U, /* In partial mode + Full colors: PWCTR5 */
93 XWDS_ST7735_VMCTR1 = 0xC5U, /* VCOM control 1: VMCTR1 */
94 XWDS_ST7735_VMOFCTR = 0xC7U, /* Set VCOM offset control: VMOFCTR */
95 XWDS_ST7735_WRID2 = 0xD1U, /* Set LCM version code: WRID2 */
96 XWDS_ST7735_WRID3 = 0xD2U, /* Customer Project code: WRID3 */
97 XWDS_ST7735_NVCTR1 = 0xD9U, /* NVM control status: NVCTR1 */
98 XWDS_ST7735_RDID1 = 0xDAU, /* Read ID1: RDID1 */
99 XWDS_ST7735_RDID2 = 0xDBU, /* Read ID2: RDID2 */
100 XWDS_ST7735_RDID3 = 0xDCU, /* Read ID3: RDID3 */
101 XWDS_ST7735_NVCTR2 = 0xDEU, /* NVM Read Command: NVCTR2 */
102 XWDS_ST7735_NVCTR3 = 0xDFU, /* NVM Write Command: NVCTR3 */
103 XWDS_ST7735_GMCTRP1 = 0xE0U, /* Set Gamma adjustment (+ polarity): GMCTRP1 */
104 XWDS_ST7735_GMCTRN1 = 0xE1U, /* Set Gamma adjustment (- polarity): GMCTRN1 */
105 XWDS_ST7735_PWCTR6 = 0xFCU, /* In partial mode + Idle mode: PWCTR6 */
106};
107
114};
115
124};
125
131};
132
139};
140
147};
148
162};
163
170 /* attributes */
172};
173
178void xwds_st7735_construct(struct xwds_st7735 * st7735);
179
184void xwds_st7735_destruct(struct xwds_st7735 * st7735);
185
192static __xwds_inline
194{
195 return xwds_spip_grab(&st7735->spip);
196}
197
204static __xwds_inline
206{
207 return xwds_spip_put(&st7735->spip);
208}
209
214#endif /* xwcd/peripheral/spi/lcd/st7735/device.h */
xwer_t xwds_spip_grab(struct xwds_spip *spip)
XWDS API:增加对象的引用计数
Definition peripheral.c:70
xwer_t xwds_spip_put(struct xwds_spip *spip)
XWDS API:减少对象的引用计数
Definition peripheral.c:76
#define __xwds_inline
Definition standard.h:34
xwds_st7735_inversion_em
ST7735 反色枚举
Definition device.h:136
xwds_st7735_bgr_em
ST7735 RGB颜色顺序枚举
Definition device.h:144
static xwer_t xwds_st7735_put(struct xwds_st7735 *st7735)
ST7735 API:减少对象的引用计数
Definition device.h:205
static xwer_t xwds_st7735_grab(struct xwds_st7735 *st7735)
ST7735 API:增加对象的引用计数
Definition device.h:193
xwds_st7735_datatype_em
ST7735 数据类型枚举
Definition device.h:111
void xwds_st7735_destruct(struct xwds_st7735 *st7735)
ST7735 API:ST7735对象的析构函数
Definition device.c:30
xwds_st7735_format_em
ST7735 像素数据格式枚举
Definition device.h:129
xwds_st7735_reg_em
ST7735 寄存器枚举
Definition device.h:53
xwds_st7735_orientation_em
ST7735 LCD定向枚举
Definition device.h:119
void xwds_st7735_construct(struct xwds_st7735 *st7735)
ST7735 API:ST7735对象的构造函数
Definition device.c:24
@ XWDS_ST7735_INVERSION_OFF
Definition device.h:137
@ XWDS_ST7735_INVERSION_ON
Definition device.h:138
@ XWDS_ST7735_RGBSEQ_BGR
Definition device.h:146
@ XWDS_ST7735_RGBSEQ_RGB
Definition device.h:145
@ XWDS_ST7735_DTYPE_DATA
Definition device.h:113
@ XWDS_ST7735_DTYPE_CMD
Definition device.h:112
@ XWDS_ST7735_FORMAT_RBG565
Definition device.h:130
@ XWDS_ST7735_RDID2
Definition device.h:99
@ XWDS_ST7735_WRID3
Definition device.h:96
@ XWDS_ST7735_PWCTR5
Definition device.h:92
@ XWDS_ST7735_RDDIM
Definition device.h:61
@ XWDS_ST7735_IDMON
Definition device.h:82
@ XWDS_ST7735_SWRESET
Definition device.h:55
@ XWDS_ST7735_RDID3
Definition device.h:100
@ XWDS_ST7735_PWCTR3
Definition device.h:90
@ XWDS_ST7735_PTLON
Definition device.h:65
@ XWDS_ST7735_PWCTR6
Definition device.h:105
@ XWDS_ST7735_FRMCTR1
Definition device.h:84
@ XWDS_ST7735_WRID2
Definition device.h:95
@ XWDS_ST7735_GMCTRN1
Definition device.h:104
@ XWDS_ST7735_VMOFCTR
Definition device.h:94
@ XWDS_ST7735_PTLAR
Definition device.h:77
@ XWDS_ST7735_MADCTL
Definition device.h:80
@ XWDS_ST7735_RDDCOLMOD
Definition device.h:60
@ XWDS_ST7735_INVON
Definition device.h:68
@ XWDS_ST7735_GMCTRP1
Definition device.h:103
@ XWDS_ST7735_TEON
Definition device.h:79
@ XWDS_ST7735_IDMOFF
Definition device.h:81
@ XWDS_ST7735_RAMRD
Definition device.h:76
@ XWDS_ST7735_DISPOFF
Definition device.h:70
@ XWDS_ST7735_RDDMADCTL
Definition device.h:59
@ XWDS_ST7735_VMCTR1
Definition device.h:93
@ XWDS_ST7735_RDDST
Definition device.h:57
@ XWDS_ST7735_TEOFF
Definition device.h:78
@ XWDS_ST7735_FRMCTR3
Definition device.h:86
@ XWDS_ST7735_NVCTR2
Definition device.h:101
@ XWDS_ST7735_RASET
Definition device.h:73
@ XWDS_ST7735_PWCTR1
Definition device.h:88
@ XWDS_ST7735_INVCTR
Definition device.h:87
@ XWDS_ST7735_NVCTR1
Definition device.h:97
@ XWDS_ST7735_RDDPM
Definition device.h:58
@ XWDS_ST7735_RDID1
Definition device.h:98
@ XWDS_ST7735_NORON
Definition device.h:66
@ XWDS_ST7735_SLPOUT
Definition device.h:64
@ XWDS_ST7735_FRMCTR2
Definition device.h:85
@ XWDS_ST7735_RDDID
Definition device.h:56
@ XWDS_ST7735_CASET
Definition device.h:72
@ XWDS_ST7735_NVCTR3
Definition device.h:102
@ XWDS_ST7735_RAMWR
Definition device.h:74
@ XWDS_ST7735_NOP
Definition device.h:54
@ XWDS_ST7735_GAMSET
Definition device.h:69
@ XWDS_ST7735_RGBSET
Definition device.h:75
@ XWDS_ST7735_INVOFF
Definition device.h:67
@ XWDS_ST7735_PWCTR4
Definition device.h:91
@ XWDS_ST7735_DISPON
Definition device.h:71
@ XWDS_ST7735_SLPIN
Definition device.h:63
@ XWDS_ST7735_COLMOD
Definition device.h:83
@ XWDS_ST7735_RDDSM
Definition device.h:62
@ XWDS_ST7735_PWCTR2
Definition device.h:89
@ XWDS_ST7735_ORIENTATION_LANDSCAPE_ROT180
Definition device.h:123
@ XWDS_ST7735_ORIENTATION_LANDSCAPE
Definition device.h:122
@ XWDS_ST7735_ORIENTATION_PORTRAIT_ROT180
Definition device.h:121
@ XWDS_ST7735_ORIENTATION_PORTRAIT
Definition device.h:120
signed long xwer_t
Definition type.h:554
uint8_t xwu8_t
Definition type.h:194
uint32_t xwu32_t
Definition type.h:266
玄武设备栈:SPI:外设
SPI外设控制器
Definition peripheral.h:47
ST7735 参数
Definition device.h:152
ST7735 设备
Definition device.h:167
struct xwds_spip spip
Definition device.h:168
struct xwds_st7735_parameter parameter
Definition device.h:171
XWOS的标准头文件