硬汉嵌入式论坛

 找回密码
 立即注册
查看: 3717|回复: 4
收起左侧

[客户分享] ThreadX GUIX移植到RA8875上的底层优化

[复制链接]

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107118
QQ
发表于 2020-6-28 00:14:34 | 显示全部楼层 |阅读模式

底层接口函数的关键就是下面这个_gx_display_driver_565rgb_setup的第3个参数my_buffer_toggle

UINT my_custom_565_display_driver(GX_DISPLAY *display)
{
   _gx_display_driver_565rgb_setup(display, GX_NULL,  my_buffer_toggle);
}

为了方便幕布里面的内容复制到RA8875上展示,直接在RA8875上开个窗口,这样就不需要每次换行时,重新指定坐标地址了。

  1.        x = canvas->gx_canvas_display_offset_x + Copy.gx_rectangle_left;
  2.                 y = canvas->gx_canvas_display_offset_y + Copy.gx_rectangle_top;        
  3.                 x1 = Copy.gx_rectangle_right + canvas->gx_canvas_display_offset_x;
  4.                 y1 = canvas->gx_canvas_display_offset_y + Copy.gx_rectangle_bottom;
  5.                
  6.                 RA8875_REG = 0x30; RA8875_RAM = x;
  7.                 RA8875_REG = 0x31; RA8875_RAM = x>>8;
  8.                
  9.                 RA8875_REG = 0x32; RA8875_RAM = y;
  10.                 RA8875_REG = 0x33; RA8875_RAM = y>>8;

  11.                 RA8875_REG = 0x34; RA8875_RAM = x1;
  12.                 RA8875_REG = 0x35; RA8875_RAM = x1>>8;

  13.                 RA8875_REG = 0x36; RA8875_RAM = y1;
  14.                 RA8875_REG = 0x37; RA8875_RAM = y1>>8;

  15.                 RA8875_REG = 0x46; RA8875_RAM = x;
  16.                 RA8875_REG = 0x47; RA8875_RAM = x>> 8;
  17.                 RA8875_REG = 0x48; RA8875_RAM = y;
  18.                 RA8875_REG = 0x49; RA8875_RAM = y >> 8;
  19.                                                   
  20.                 RA8875_REG = 0x02;        
  21.                
  22.                 for(row = 0; row < copy_height; row++)
  23.               {
  24.                      xxxxxxxxxxxxx
  25.               }
  26.                
  27.                 RA8875_REG = 0x30; RA8875_RAM = 0;
  28.                 RA8875_REG = 0x31; RA8875_RAM = 0;
  29.                
  30.                 RA8875_REG = 0x32; RA8875_RAM = 0;
  31.                 RA8875_REG = 0x33; RA8875_RAM = 0;

  32.                 RA8875_REG = 0x34; RA8875_RAM = g_LcdWidth;
  33.                 RA8875_REG = 0x35; RA8875_RAM = g_LcdWidth>>8;

  34.                 RA8875_REG = 0x36; RA8875_RAM = g_LcdHeight;
  35.                 RA8875_REG = 0x37; RA8875_RAM = g_LcdHeight>>8;
复制代码



回复

使用道具 举报

3

主题

1233

回帖

1242

积分

至尊会员

积分
1242
发表于 2020-6-28 08:43:37 | 显示全部楼层
回复

使用道具 举报

17

主题

88

回帖

139

积分

初级会员

积分
139
发表于 2020-10-23 15:29:38 | 显示全部楼层
看不懂这个xyx1y1.有没有这段代码的讲解?
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107118
QQ
 楼主| 发表于 2020-10-24 08:37:10 | 显示全部楼层
into 发表于 2020-10-23 15:29
看不懂这个xyx1y1.有没有这段代码的讲解?

GUIX会把要重绘的区域裁剪出来,这里就是在RA8875上绘制裁剪出来的区域。
回复

使用道具 举报

17

主题

88

回帖

139

积分

初级会员

积分
139
发表于 2020-10-24 10:16:26 | 显示全部楼层
eric2013 发表于 2020-10-24 08:37
GUIX会把要重绘的区域裁剪出来,这里就是在RA8875上绘制裁剪出来的区域。

嗯,我已经移植到RA8876,有一点区别,需要把gx_utility_rectangle_define的gx_canvas_x_resolution-1和gx_canvas_y_resolution-1的-1去掉,不然会乱。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-18 14:07 , Processed in 0.151100 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表