XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
driver.h
浏览该文件的文档.
1
23#ifndef __xwcd_peripheral_spi_lcd_st7735_driver_h__
24#define __xwcd_peripheral_spi_lcd_st7735_driver_h__
25
26#include <xwos/standard.h>
29
40 xwer_t (* write)(struct xwds_st7735 * /*st7735*/, xwu8_t /*reg*/,
41 const xwu8_t * /*data*/, xwsz_t * /*size*/,
42 xwtm_t /*to*/);
43 xwer_t (* read)(struct xwds_st7735 * /*st7735*/, xwu8_t /*reg*/,
44 xwu8_t * /*buf*/, xwsz_t * /*size*/,
45 xwtm_t /*to*/);
46 xwer_t (* set_brightness)(struct xwds_st7735 * /*st7735*/,
47 xwu32_t /*brightness*/);
48};
49
50/******** ******** base driver ******** ********/
55
60#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
61
66
71#endif
72
73/******** ******** ******** APIs ******** ******** ********/
89 xwu32_t * id,
90 xwtm_t to);
91
107 xwu8_t st[5],
108 xwtm_t to);
109
125 xwu8_t madctl[2],
126 xwtm_t to);
127
143 xwu8_t colmod[2],
144 xwtm_t to);
145
160
175
184xwer_t xwds_st7735_set_brightness(struct xwds_st7735 * st7735, xwu32_t brightness);
185
194void xwds_st7735_get_brightness(struct xwds_st7735 * st7735, xwu32_t * brightness);
195
210 xwu8_t orientation, xwtm_t to);
211
220void xwds_st7735_get_orientation(struct xwds_st7735 * st7735, xwu8_t * orientation);
221
238 xwtm_t to);
239
258 xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height,
259 xwtm_t to);
260
275xwer_t xwds_st7735_invert_color(struct xwds_st7735 * st7735, bool inv, xwtm_t to);
276
294 xwu8_t x, xwu8_t y,
295 xwu16_t color, xwtm_t to);
296
316 xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height,
317 xwu16_t color, xwtm_t to);
318
337xwer_t xwds_st7735_draw(struct xwds_st7735 * st7735,
338 xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height,
339 const xwu8_t img[], xwtm_t to);
340
345#endif /* xwcd/peripheral/spi/lcd/st7735/driver.h */
xws64_t xwtm_t
XWOS系统时间 (有符号)
Definition type.h:742
signed long xwer_t
Definition type.h:554
unsigned long xwsz_t
Definition type.h:339
uint8_t xwu8_t
Definition type.h:194
uint16_t xwu16_t
Definition type.h:230
uint32_t xwu32_t
Definition type.h:266
SPI LCD Controller ST7735 Device
xwer_t xwds_st7735_display_on(struct xwds_st7735 *st7735, xwtm_t to)
ST7735 API:开启显示
Definition driver.c:369
xwer_t xwds_st7735_drv_start(struct xwds_device *dev)
ST7735基本驱动:启动设备
Definition driver.c:104
xwer_t xwds_st7735_read_colmod(struct xwds_st7735 *st7735, xwu8_t colmod[2], xwtm_t to)
ST7735 API:读取RDDCOLMOD寄存器的值
Definition driver.c:347
void xwds_st7735_get_orientation(struct xwds_st7735 *st7735, xwu8_t *orientation)
ST7735 API:读取显示方向
Definition driver.c:472
xwer_t xwds_st7735_draw(struct xwds_st7735 *st7735, xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height, const xwu8_t img[], xwtm_t to)
ST7735 API:绘制位图
Definition driver.c:660
xwer_t xwds_st7735_set_cursor(struct xwds_st7735 *st7735, xwu8_t x, xwu8_t y, xwtm_t to)
ST7735 API:设置光标坐标
Definition driver.c:481
xwer_t xwds_st7735_drv_suspend(struct xwds_device *dev)
ST7735基本驱动:继续设备
Definition driver.c:275
xwer_t xwds_st7735_drv_resume(struct xwds_device *dev)
ST7735基本驱动:暂停设备
Definition driver.c:269
xwer_t xwds_st7735_drv_stop(struct xwds_device *dev)
ST7735基本驱动:停止设备
Definition driver.c:242
xwer_t xwds_st7735_invert_color(struct xwds_st7735 *st7735, bool inv, xwtm_t to)
ST7735 API:设置是否翻转颜色
Definition driver.c:572
xwer_t xwds_st7735_set_window(struct xwds_st7735 *st7735, xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height, xwtm_t to)
ST7735 API:设置窗口
Definition driver.c:525
xwer_t xwds_st7735_fill_rect(struct xwds_st7735 *st7735, xwu8_t x, xwu8_t y, xwu8_t width, xwu8_t height, xwu16_t color, xwtm_t to)
ST7735 API:绘制矩形
Definition driver.c:615
void xwds_st7735_get_brightness(struct xwds_st7735 *st7735, xwu32_t *brightness)
ST7735 API:读取亮度
Definition driver.c:409
xwer_t xwds_st7735_read_status(struct xwds_st7735 *st7735, xwu8_t st[5], xwtm_t to)
ST7735 API:读取状态
Definition driver.c:303
xwer_t xwds_st7735_display_off(struct xwds_st7735 *st7735, xwtm_t to)
ST7735 API:关闭显示
Definition driver.c:379
xwer_t xwds_st7735_read_id(struct xwds_st7735 *st7735, xwu32_t *id, xwtm_t to)
ST7735 API:读取ID
Definition driver.c:283
xwer_t xwds_st7735_set_brightness(struct xwds_st7735 *st7735, xwu32_t brightness)
ST7735 API:设置亮度
Definition driver.c:389
xwer_t xwds_st7735_read_madctl(struct xwds_st7735 *st7735, xwu8_t madctl[2], xwtm_t to)
ST7735 API:读取RDDMADCTL寄存器的值
Definition driver.c:325
xwer_t xwds_st7735_set_orientation(struct xwds_st7735 *st7735, xwu8_t orientation, xwtm_t to)
ST7735 API:设置显示方向
Definition driver.c:418
xwer_t xwds_st7735_set_pixel(struct xwds_st7735 *st7735, xwu8_t x, xwu8_t y, xwu16_t color, xwtm_t to)
ST7735 API:设置点的颜色
Definition driver.c:591
玄武设备栈:SPI:外设
设备(所有设备的基类)
Definition device.h:127
BSP中需要提供的SPI外设控制器驱动函数表
Definition peripheral.h:40
ST7735驱动函数表
Definition driver.h:38
xwer_t(* set_brightness)(struct xwds_st7735 *, xwu32_t)
Definition driver.h:46
xwer_t(* read)(struct xwds_st7735 *, xwu8_t, xwu8_t *, xwsz_t *, xwtm_t)
Definition driver.h:43
xwer_t(* write)(struct xwds_st7735 *, xwu8_t, const xwu8_t *, xwsz_t *, xwtm_t)
Definition driver.h:40
struct xwds_spip_driver spip
Definition driver.h:39
ST7735 设备
Definition device.h:167
XWOS的标准头文件