In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about how to achieve a LCD interface in AWTK. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
1. LCD based on register
On the low-end embedded platform, there is only a few dozen KB of memory, and there is not enough memory to use framebuffer, so coordinate and color data are usually written directly to the register. Lcd_reg.inc provides register-based LCD. When using it to implement LCD for different platforms, you only need to provide two macros:
Set_window_func sets the area in which color data is to be written, which can greatly improve work efficiency compared to setting coordinates each time.
Write_data_func writes color data.
Here is the implementation of LCD on STMF103ze. Here, set_window_func is defined as TFT_SetWindow and write_data_func is defined as TFT_WriteData:
# include "tftlcd.h" # include "tkc/mem.h" # include "lcd/lcd_reg.h" typedef uint16_t pixel_t # define LCD_FORMAT BITMAP_FMT_BGR565#define pixel_from_rgb (r, g) B)\ (r) > 3) > 2) > 3)) # define pixel_to_rgba (p)\ {(0xff & (p > 11) > 5) 3) > 2) > 3)) # define pixel_to_rgba (p) \ {(0xff & (p > > 11) > 5)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.