硬汉嵌入式论坛

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

[μCGUI] UCOS-III+UCGUI移植触摸后卡顿

[复制链接]

1

主题

4

回帖

1

积分

新手上路

努力学习UCOS-III+UCGUI

积分
1
QQ
发表于 2015-8-26 23:27:21 | 显示全部楼层 |阅读模式
用的是UCOS-III3.03+UCGUI3.98,不带触摸时基本没问题,high speed有330W,但是加了触摸之后,光标可以跟随移动,但是很卡,而且high speed掉到7W多,请问哪里可以做优化吗,百度不到相关信息,希望可以得到小伙伴的倾情帮助,谢谢!
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107157
QQ
发表于 2015-8-26 23:40:32 | 显示全部楼层
方便的话,我看下你做的UCGUI底层接口文件,优化的话,只需优化这几个地方,看我们的60期emWin教程这个部分,
跟UCGUI是差不多,大概也是这几个点
===============================================================
4.jpg
回复

使用道具 举报

1

主题

4

回帖

1

积分

新手上路

努力学习UCOS-III+UCGUI

积分
1
QQ
 楼主| 发表于 2015-8-26 23:50:04 | 显示全部楼层

这是不带触摸跑的

这是不带触摸跑的
QQ截图20150826234806.jpg QQ截图20150826234824.jpg QQ截图20150826234840.jpg QQ截图20150826234907.jpg QQ截图20150826234918.jpg
回复

使用道具 举报

1

主题

4

回帖

1

积分

新手上路

努力学习UCOS-III+UCGUI

积分
1
QQ
 楼主| 发表于 2015-8-26 23:51:09 | 显示全部楼层

回 eric2013 的帖子

eric2013:方便的话,我看下你做的UCGUI底层接口文件,优化的话,只需优化这几个地方,看我们的60期emWin教程这个部分,
跟UCGUI是差不多,大概也是这几个点
===============================================================


.......(2015-08-26 23:40)嬀/color]
eric大神,你要的底层接口是不是我图片上传的那些
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107157
QQ
发表于 2015-8-27 00:21:00 | 显示全部楼层
有一个非常重要的地方你好像忘记修改了,就是绘制16bpp的地方,这个地方优化后你显示对话框等控件的时候,速度才快。
2.jpg

这里有以前做的uCGUI3.98工程,你可以参考下底层接口部分:
http://www.armbbs.cn/forum.php?mod=viewthread&tid=2133
==================================================
我这里其单独整理出来了:
bsp_tft_ucgui.rar (3 KB, 下载次数: 57)
  1. /*
  2. *********************************************************************************************************
  3. *                                      
  4. *    模块名称 : uCGUI底层驱动接口
  5. *    文件名称 : bsp_tft_ucgui.h
  6. *    版    本 : V1.0
  7. *    说    明 : uCGUI底层驱动接口
  8. *********************************************************************************************************
  9. */
  10. #include "LCD_Private.h"      /* private modul definitions & config */
  11. #include "GUI_Private.h"
  12. #include "GUIDebug.h"
  13. #include "LCD_RA8875.h"
  14. #include "stm32f4xx.h"
  15. #define BKCOLOR LCD_BKCOLORINDEX
  16. #define   COLOR LCD_COLORINDEX
  17. __IO uint8_t s_ucRA8875BusyNow = 0;
  18. int LCD_L0_Init(void)
  19. {  
  20.     return 0;
  21. }
  22. void LCD_L0_SetPixelIndex(int x, int y, int PixelIndex)
  23. {
  24.     s_ucRA8875BusyNow = 1;
  25.     LCD_PutPixel(x,y,PixelIndex);
  26.     s_ucRA8875BusyNow = 0;
  27. }
  28. unsigned int LCD_L0_GetPixelIndex(int x, int y)
  29. {
  30.     unsigned int PixelIndex;
  31.     s_ucRA8875BusyNow = 1;
  32.     PixelIndex = LCD_GetPixel(x, y);
  33.     s_ucRA8875BusyNow = 0;
  34.     return PixelIndex;
  35. }
  36. void LCD_L0_SetOrg(int x,int y)
  37. {
  38. }
  39. void LCD_L0_XorPixel(int x, int y)
  40. {
  41.     LCD_PIXELINDEX Index;
  42.     s_ucRA8875BusyNow = 1;
  43.     Index = LCD_GetPixel(x,y);
  44.     s_ucRA8875BusyNow = 0;
  45.     LCD_PutPixel(x,y,LCD_NUM_COLORS-1-Index);
  46. }
  47. void LCD_L0_DrawHLine  (int x0, int y,  int x1)
  48. {
  49.     LCD_DrawLineH(x0, y, x1, LCD_COLORINDEX);
  50. }
  51. void LCD_L0_DrawVLine (int x, int y0,  int y1)
  52. {
  53.     LCD_DrawLineV(x, y0, y1, LCD_COLORINDEX);
  54. }
  55. void LCD_L0_FillRect(int x0, int y0, int x1, int y1) {
  56.     s_ucRA8875BusyNow = 1;
  57.     BTE_SetTarBlock(x0, y0, y1-y0+1, x1-x0+1, 0);    /* 设置BTE位置和宽度高度 */
  58.     BTE_SetOperateCode(0x0C);                        /* 设定BTE 操作码和光栅运算码  REG[51h] Bit[3:0] = 0Ch */
  59.     RA8875_SetFrontColor(LCD_COLORINDEX);            /* 设置BTE前景色 */
  60.     BTE_Start();                                    /* 开启BTE 功能 */
  61.     BTE_Wait();                                        /* 等待操作结束 */
  62.     s_ucRA8875BusyNow = 0;
  63. }
  64. void DrawBitLine1BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans)
  65. {
  66.   LCD_PIXELINDEX pixels;
  67.   LCD_PIXELINDEX Index0 = *(pTrans+0);
  68.   LCD_PIXELINDEX Index1 = *(pTrans+1);
  69. /*
  70. // Jump to right entry point
  71. */
  72.   pixels = *p;
  73.   switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS|LCD_DRAWMODE_XOR)) {
  74.   case 0:
  75.     #if defined (SETNEXTPIXEL)   /* Optimization ! */
  76.       x+=Diff;
  77.       LCD_PutPixel(x,y);
  78.     #endif
  79.     switch (Diff&7) {
  80.     case 0:   
  81.       goto WriteBit0;
  82.     case 1:   
  83.       goto WriteBit1;
  84.     case 2:
  85.       goto WriteBit2;
  86.     case 3:
  87.       goto WriteBit3;
  88.     case 4:
  89.       goto WriteBit4;
  90.     case 5:   
  91.       goto WriteBit5;
  92.     case 6:   
  93.       goto WriteBit6;
  94.     case 7:   
  95.       goto WriteBit7;
  96.     }
  97.     break;
  98.   case LCD_DRAWMODE_TRANS:
  99.     switch (Diff&7) {
  100.     case 0:
  101.       goto WriteTBit0;
  102.     case 1:
  103.       goto WriteTBit1;
  104.     case 2:
  105.       goto WriteTBit2;
  106.     case 3:
  107.       goto WriteTBit3;
  108.     case 4:
  109.       goto WriteTBit4;
  110.     case 5:   
  111.       goto WriteTBit5;
  112.     case 6:   
  113.       goto WriteTBit6;
  114.     case 7:   
  115.       goto WriteTBit7;
  116.     }
  117.     break;
  118.   case LCD_DRAWMODE_XOR:
  119.     switch (Diff&7) {
  120.     case 0:   
  121.       goto WriteXBit0;
  122.     case 1:   
  123.       goto WriteXBit1;
  124.     case 2:
  125.       goto WriteXBit2;
  126.     case 3:
  127.       goto WriteXBit3;
  128.     case 4:
  129.       goto WriteXBit4;
  130.     case 5:   
  131.       goto WriteXBit5;
  132.     case 6:   
  133.       goto WriteXBit6;
  134.     case 7:   
  135.       goto WriteXBit7;
  136.     }
  137.   }
  138. /*
  139.         Write with transparency
  140. */
  141.   WriteTBit0:
  142.    if (pixels&(1<<7)) LCD_PutPixel(x+0, y, Index1);
  143.     if (!--xsize)
  144.       return;
  145.   WriteTBit1:
  146.     if (pixels&(1<<6)) LCD_PutPixel(x+1, y, Index1);
  147.     if (!--xsize)
  148.       return;
  149.   WriteTBit2:
  150.     if (pixels&(1<<5)) LCD_PutPixel(x+2, y, Index1);
  151.     if (!--xsize)
  152.       return;
  153.   WriteTBit3:
  154.     if (pixels&(1<<4)) LCD_PutPixel(x+3, y, Index1);
  155.     if (!--xsize)
  156.       return;
  157.   WriteTBit4:
  158.     if (pixels&(1<<3)) LCD_PutPixel(x+4, y, Index1);
  159.     if (!--xsize)
  160.       return;
  161.   WriteTBit5:
  162.     if (pixels&(1<<2)) LCD_PutPixel(x+5, y, Index1);
  163.     if (!--xsize)
  164.       return;
  165.   WriteTBit6:
  166.     if (pixels&(1<<1)) LCD_PutPixel(x+6, y, Index1);
  167.     if (!--xsize)
  168.       return;
  169.   WriteTBit7:
  170.     if (pixels&(1<<0)) LCD_PutPixel(x+7, y, Index1);
  171.     if (!--xsize)
  172.       return;
  173.     x+=8;
  174.     pixels = *(++p);
  175.     goto WriteTBit0;
  176. /*
  177.         Write without transparency
  178. */
  179.   WriteBit0:
  180.     LCD_PutPixel(x+0, y, (pixels&(1<<7)) ? Index1 : Index0);
  181.     if (!--xsize)
  182.       return;
  183.   WriteBit1:
  184.     LCD_PutPixel(x+1, y, (pixels&(1<<6)) ? Index1 : Index0);
  185.     if (!--xsize)
  186.       return;
  187.   WriteBit2:
  188.     LCD_PutPixel(x+2, y, (pixels&(1<<5)) ? Index1 : Index0);
  189.     if (!--xsize)
  190.       return;
  191.   WriteBit3:
  192.     LCD_PutPixel(x+3, y, (pixels&(1<<4)) ? Index1 : Index0);
  193.     if (!--xsize)
  194.       return;
  195.   WriteBit4:
  196.     LCD_PutPixel(x+4, y, (pixels&(1<<3)) ? Index1 : Index0);
  197.     if (!--xsize)
  198.       return;
  199.   WriteBit5:
  200.     LCD_PutPixel(x+5, y, (pixels&(1<<2)) ? Index1 : Index0);
  201.     if (!--xsize)
  202.       return;
  203.   WriteBit6:
  204.     LCD_PutPixel(x+6, y, (pixels&(1<<1)) ? Index1 : Index0);
  205.     if (!--xsize)
  206.       return;
  207.   WriteBit7:
  208.     LCD_PutPixel(x+7, y, (pixels&(1<<0)) ? Index1 : Index0);
  209.     if (!--xsize)
  210.       return;
  211.     x+=8;
  212.     pixels = *(++p);
  213.     goto WriteBit0;
  214. /*
  215.         Write XOR mode
  216. */
  217.   WriteXBit0:
  218.     if (pixels&(1<<7))
  219.       LCD_L0_XorPixel(x+0, y);
  220.     if (!--xsize)
  221.       return;
  222.   WriteXBit1:
  223.     if (pixels&(1<<6))
  224.       LCD_L0_XorPixel(x+1, y);
  225.     if (!--xsize)
  226.       return;
  227.   WriteXBit2:
  228.     if (pixels&(1<<5))
  229.       LCD_L0_XorPixel(x+2, y);
  230.     if (!--xsize)
  231.       return;
  232.   WriteXBit3:
  233.     if (pixels&(1<<4))
  234.       LCD_L0_XorPixel(x+3, y);
  235.     if (!--xsize)
  236.       return;
  237.   WriteXBit4:
  238.     if (pixels&(1<<3))
  239.       LCD_L0_XorPixel(x+4, y);
  240.     if (!--xsize)
  241.       return;
  242.   WriteXBit5:
  243.     if (pixels&(1<<2))
  244.       LCD_L0_XorPixel(x+5, y);
  245.     if (!--xsize)
  246.       return;
  247.   WriteXBit6:
  248.     if (pixels&(1<<1))
  249.       LCD_L0_XorPixel(x+6, y);
  250.     if (!--xsize)
  251.       return;
  252.   WriteXBit7:
  253.     if (pixels&(1<<0))
  254.       LCD_L0_XorPixel(x+7, y);
  255.     if (!--xsize)
  256.       return;
  257.     x+=8;
  258.     pixels = *(++p);
  259.     goto WriteXBit0;
  260.    
  261. }
  262. static void  DrawBitLine2BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  263.   LCD_PIXELINDEX pixels;
  264. /*
  265. // Jump to right entry point
  266. */
  267.   pixels = *p;
  268.   if (pTrans) {
  269.     /*
  270.       with palette
  271.     */
  272.     if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) {
  273.     case 0:
  274.       goto WriteTBit0;
  275.     case 1:
  276.       goto WriteTBit1;
  277.     case 2:
  278.       goto WriteTBit2;
  279.     default:
  280.       goto WriteTBit3;
  281.     } else switch (Diff&3) {
  282.     case 0:
  283.       goto WriteBit0;
  284.     case 1:
  285.       goto WriteBit1;
  286.     case 2:
  287.       goto WriteBit2;
  288.     default:
  289.       goto WriteBit3;
  290.     }
  291.   /*
  292.           Write without transparency
  293.   */
  294.   WriteBit0:
  295.     LCD_PutPixel(x+0, y, *(pTrans+(pixels>>6)));
  296.     if (!--xsize)
  297.       return;
  298.   WriteBit1:
  299.     LCD_PutPixel(x+1, y, *(pTrans+(3&(pixels>>4))));
  300.     if (!--xsize)
  301.       return;
  302.   WriteBit2:
  303.     LCD_PutPixel(x+2, y, *(pTrans+(3&(pixels>>2))));
  304.     if (!--xsize)
  305.       return;
  306.   WriteBit3:
  307.     LCD_PutPixel(x+3, y, *(pTrans+(3&(pixels))));
  308.     if (!--xsize)
  309.       return;
  310.     pixels = *(++p);
  311.     x+=4;
  312.     goto WriteBit0;
  313.   /*
  314.           Write with transparency
  315.   */
  316.   WriteTBit0:
  317.     if (pixels&(3<<6))
  318.       LCD_PutPixel(x+0, y, *(pTrans+(pixels>>6)));
  319.     if (!--xsize)
  320.       return;
  321.   WriteTBit1:
  322.     if (pixels&(3<<4))
  323.       LCD_PutPixel(x+1, y, *(pTrans+(3&(pixels>>4))));
  324.     if (!--xsize)
  325.       return;
  326.   WriteTBit2:
  327.     if (pixels&(3<<2))
  328.       LCD_PutPixel(x+2, y, *(pTrans+(3&(pixels>>2))));
  329.     if (!--xsize)
  330.       return;
  331.   WriteTBit3:
  332.     if (pixels&(3<<0))
  333.       LCD_PutPixel(x+3, y, *(pTrans+(3&(pixels))));
  334.     if (!--xsize)
  335.       return;
  336.     pixels = *(++p);
  337.     x+=4;
  338.     goto WriteTBit0;
  339.   } else {
  340.     /*
  341.       without palette
  342.     */
  343.     if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) {
  344.     case 0:
  345.       goto WriteDDPTBit0;
  346.     case 1:
  347.       goto WriteDDPTBit1;
  348.     case 2:
  349.       goto WriteDDPTBit2;
  350.     default:
  351.       goto WriteDDPTBit3;
  352.     } else switch (Diff&3) {
  353.     case 0:
  354.       goto WriteDDPBit0;
  355.     case 1:
  356.       goto WriteDDPBit1;
  357.     case 2:
  358.       goto WriteDDPBit2;
  359.     default:
  360.       goto WriteDDPBit3;
  361.     }
  362.   /*
  363.           Write without transparency
  364.   */
  365.   WriteDDPBit0:
  366.     LCD_PutPixel(x+0, y, (pixels>>6));
  367.     if (!--xsize)
  368.       return;
  369.   WriteDDPBit1:
  370.     LCD_PutPixel(x+1, y, (3&(pixels>>4)));
  371.     if (!--xsize)
  372.       return;
  373.   WriteDDPBit2:
  374.     LCD_PutPixel(x+2, y, (3&(pixels>>2)));
  375.     if (!--xsize)
  376.       return;
  377.   WriteDDPBit3:
  378.     LCD_PutPixel(x+3, y, (3&(pixels)));
  379.     if (!--xsize)
  380.       return;
  381.     pixels = *(++p);
  382.     x+=4;
  383.     goto WriteDDPBit0;
  384.   /*
  385.           Write with transparency
  386.   */
  387.   WriteDDPTBit0:
  388.     if (pixels&(3<<6))
  389.       LCD_PutPixel(x+0, y, (pixels>>6));
  390.     if (!--xsize)
  391.       return;
  392.   WriteDDPTBit1:
  393.     if (pixels&(3<<4))
  394.       LCD_PutPixel(x+1, y, (3&(pixels>>4)));
  395.     if (!--xsize)
  396.       return;
  397.   WriteDDPTBit2:
  398.     if (pixels&(3<<2))
  399.       LCD_PutPixel(x+2, y, (3&(pixels>>2)));
  400.     if (!--xsize)
  401.       return;
  402.   WriteDDPTBit3:
  403.     if (pixels&(3<<0))
  404.       LCD_PutPixel(x+3, y, (3&(pixels)));
  405.     if (!--xsize)
  406.       return;
  407.     pixels = *(++p);
  408.     x+=4;
  409.     goto WriteDDPTBit0;
  410.   }
  411. }
  412. static void  DrawBitLine4BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans)
  413. {
  414.   LCD_PIXELINDEX pixels;
  415.   pixels = *p;
  416.   if (pTrans)
  417.   {
  418.     if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS)
  419.     {
  420.       if ((Diff&1) ==0)
  421.         goto WriteTBit0;
  422.         goto WriteTBit1;
  423.     }
  424.     else
  425.     {
  426.       if ((Diff&1) ==0)
  427.         goto WriteBit0;
  428.         goto WriteBit1;
  429.     }
  430.   WriteBit0:
  431.     LCD_PutPixel(x+0, y, *(pTrans+(pixels>>4)));
  432.     if (!--xsize)
  433.       return;
  434.   WriteBit1:
  435.     LCD_PutPixel(x+1, y, *(pTrans+(pixels&0xf)));
  436.     if (!--xsize)
  437.       return;
  438.     x+=2;
  439.     pixels = *(++p);
  440.     goto WriteBit0;
  441.   /*
  442.           Write with transparency
  443.   */
  444.   WriteTBit0:
  445.     if (pixels>>4)
  446.       LCD_PutPixel(x+0, y, *(pTrans+(pixels>>4)));
  447.     if (!--xsize)
  448.       return;
  449.   WriteTBit1:
  450.     if (pixels&0xf)
  451.       LCD_PutPixel(x+1, y, *(pTrans+(pixels&0xf)));
  452.     if (!--xsize)
  453.       return;
  454.     x+=2;
  455.     pixels = *(++p);
  456.     goto WriteTBit0;
  457.   } else {
  458.     /*
  459.       without palette
  460.     */
  461.     if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) {
  462.       if ((Diff&1) ==0)
  463.         goto WriteDDPTBit0;
  464.       goto WriteDDPTBit1;
  465.     } else {
  466.       if ((Diff&1) ==0)
  467.         goto WriteDDPBit0;
  468.       goto WriteDDPBit1;
  469.     }
  470.   /*
  471.           Write without transparency
  472.   */
  473.   WriteDDPBit0:
  474.     LCD_PutPixel(x+0, y, (pixels>>4));
  475.     if (!--xsize)
  476.       return;
  477.   WriteDDPBit1:
  478.     LCD_PutPixel(x+1, y, (pixels&0xf));
  479.     if (!--xsize)
  480.       return;
  481.     x+=2;
  482.     pixels = *(++p);
  483.     goto WriteDDPBit0;
  484.   /*
  485.           Write with transparency
  486.   */
  487.   WriteDDPTBit0:
  488.     if (pixels>>4)
  489.       LCD_PutPixel(x+0, y, (pixels>>4));
  490.     if (!--xsize)
  491.       return;
  492.   WriteDDPTBit1:
  493.     if (pixels&0xf)
  494.       LCD_PutPixel(x+1, y, (pixels&0xf));
  495.     if (!--xsize)
  496.       return;
  497.     x+=2;
  498.     pixels = *(++p);
  499.     goto WriteDDPTBit0;
  500.   }
  501. }
  502. void DrawBitLine8BPP(int x, int y, U8 const*p, int xsize, const LCD_PIXELINDEX*pTrans) {
  503.   LCD_PIXELINDEX pixel;
  504.   if ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS)==0) {
  505.     if (pTrans) {
  506.       for (;xsize > 0; xsize--,x++,p++) {
  507.         pixel = *p;
  508.         LCD_PutPixel(x, y, *(pTrans+pixel));
  509.       }
  510.     } else {
  511.       for (;xsize > 0; xsize--,x++,p++) {
  512.         LCD_PutPixel(x, y, *p);
  513.       }
  514.     }
  515.   } else {   /* Handle transparent bitmap */
  516.     if (pTrans) {
  517.       for (; xsize > 0; xsize--, x++, p++) {
  518.         pixel = *p;
  519.         if (pixel) {
  520.           LCD_PutPixel(x+0, y, *(pTrans+pixel));
  521.         }
  522.       }
  523.     } else {
  524.       for (; xsize > 0; xsize--, x++, p++) {
  525.         pixel = *p;
  526.         if (pixel) {
  527.           LCD_PutPixel(x+0, y, pixel);
  528.         }
  529.       }
  530.     }
  531.   }
  532. }
  533. void DrawBitLine16BPP(int x, int y, U16 const*p, int xsize)
  534. {
  535.   LCD_PIXELINDEX Index;
  536.   int j = 0;
  537.   if ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS)==0)
  538.   {
  539. //    for (;xsize > 0; xsize--,x++,p++)
  540. //    {
  541. //      LCD_PutPixel(x, y, *p);
  542. //    }
  543.     s_ucRA8875BusyNow = 1;
  544.     RA8875_SetCursor(x,y);
  545.     RA8875_REG = 0x02;
  546.     for (;xsize > 0; xsize--,p++)
  547.     {
  548.         RA8875_RAM = *p;
  549.     }
  550.     s_ucRA8875BusyNow = 0;
  551.   }
  552.   else
  553.   {   /* Handle transparent bitmap */
  554. //    for (; xsize > 0; xsize--, x++, p++)
  555. //    {
  556. //      Index = *p;
  557. //      if (Index)
  558. //      {
  559. //        LCD_PutPixel(x+0, y, Index);
  560. //      }
  561. //    }
  562.     s_ucRA8875BusyNow = 1;
  563.     RA8875_SetCursor(x,y);
  564.     RA8875_REG = 0x02;
  565.     for (;xsize > 0; xsize--,p++,j++)
  566.     {
  567.         Index = *p;
  568.         if(Index)
  569.         {
  570.              RA8875_RAM = *p;
  571.         }
  572.         else
  573.         {
  574.             RA8875_SetCursor(x+j,y);
  575.             RA8875_REG = 0x02;            
  576.             RA8875_RAM = *p;
  577.         }
  578.     }
  579.     s_ucRA8875BusyNow = 0;
  580.   }
  581. }
  582. void LCD_L0_DrawBitmap   (int x0, int y0,
  583.                        int xsize, int ysize,
  584.                        int BitsPerPixel,
  585.                        int BytesPerLine,
  586.                        const U8* pData, int Diff,
  587.                        const LCD_PIXELINDEX* pTrans)
  588. {
  589.   int i;
  590.   switch (BitsPerPixel)
  591.   {
  592.   case 1:
  593.     for (i=0; i<ysize; i++)
  594.     {
  595.       DrawBitLine1BPP(x0, i+y0, pData, Diff, xsize, pTrans);
  596.       pData += BytesPerLine;
  597.     }
  598.     break;
  599.   case 2:
  600.     for (i=0; i<ysize; i++)
  601.     {
  602.       DrawBitLine2BPP(x0, i+y0, pData, Diff, xsize, pTrans);
  603.       pData += BytesPerLine;
  604.     }
  605.     break;
  606.   case 4:
  607.     for (i=0; i<ysize; i++)
  608.     {
  609.       DrawBitLine4BPP(x0, i+y0, pData, Diff, xsize, pTrans);
  610.       pData += BytesPerLine;
  611.     }
  612.     break;
  613.   case 8:
  614.     for (i=0; i<ysize; i++)
  615.     {
  616.       DrawBitLine8BPP(x0, i+y0, pData, xsize, pTrans);
  617.       pData += BytesPerLine;
  618.     }
  619.     break;
  620.   case 16:
  621.     for (i=0; i<ysize; i++)
  622.     {
  623.       DrawBitLine16BPP(x0, i+y0, (U16*)pData, xsize);
  624.       pData += BytesPerLine;
  625.     }
  626.     break;
  627.   }
  628. }
  629. void LCD_L0_SetLUTEntry(U8 Pos, LCD_COLOR color){}
  630. void LCD_L0_On(void){}
  631. void * LCD_L0_GetDevFunc(int Index) {
  632.   GUI_USE_PARA(Index);
  633.   return 0;
  634. }
复制代码
回复

使用道具 举报

1

主题

4

回帖

1

积分

新手上路

努力学习UCOS-III+UCGUI

积分
1
QQ
 楼主| 发表于 2015-8-27 00:24:37 | 显示全部楼层

回 eric2013 的帖子

eric2013:有一个非常重要的地方你好像忘记修改了,就是绘制16bpp的地方,这个地方优化后你显示对话框等控件的时候,速度才快。


这里有以前做的uCGUI3.98工程,你可以参考下底层接口部分:
http://www.armbbs.cn/forum.php?mod=viewthread&tid=2133
.......(2015-08-27 00:21)嬀/color]
感激不尽,我明天再看看,大神早点休息啊[s:143]
回复

使用道具 举报

1

主题

4

回帖

1

积分

新手上路

努力学习UCOS-III+UCGUI

积分
1
QQ
 楼主| 发表于 2015-8-27 09:46:15 | 显示全部楼层

回 eric2013 的帖子

eric2013:有一个非常重要的地方你好像忘记修改了,就是绘制16bpp的地方,这个地方优化后你显示对话框等控件的时候,速度才快。


这里有以前做的uCGUI3.98工程,你可以参考下底层接口部分:
http://www.armbbs.cn/forum.php?mod=viewthread&tid=2133
.......(2015-08-27 00:21)嬀/color]
有FSMC的都用FSMC了  不过我的这块MiniSTM32似乎是直接用IO驱动的   那个写RAM地址的是不是跟FSMC有关的
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107157
QQ
发表于 2015-8-28 09:27:27 | 显示全部楼层

回 wuwenjie 的帖子

wuwenjie:有FSMC的都用FSMC了  不过我的这块MiniSTM32似乎是直接用IO驱动的   那个写RAM地址的是不是跟FSMC有关的 (2015-08-27 09:46) 
是的。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-20 23:45 , Processed in 0.281576 second(s), 28 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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