OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3392|回复: 3

画UCGUI界面的过程中,STM32的定时器进不了中断服务函数!!!!!!

[复制链接]

22

主题

63

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
275
金钱
275
注册时间
2013-10-26
在线时间
17 小时
发表于 2015-4-8 16:30:26 | 显示全部楼层 |阅读模式
5金钱

如题,我注释了画UCGUI界面的函数,我的定时器中断服务函数就能进入了,但我在画UCGUI界面的过程中,我无法进入定时器中断服务函数!搞不懂这个是什么问题!

部分UCGUI画界面函数如下:

1.(画如下这个界面的过程中,无法进入定时器中断):
[mw_shl_code=c,true]void Draw_Check_Screen(void) { int rate = Heart_Rate; int height = Height; int west = West; int east = East; if(Screen_Change == 1) //??????????????±??? { GUI_ClearRect(0,0,128,128);//????±??°???????? } Draw_Header(); //???????? GUI_DrawBitmap(&bm30x30heart_rate,10,30);//??????????±ê GUI_DrawBitmap(&bm30x30navigation,10,80);//?????¨????±ê GUI_SetColor(GUI_BLUE); GUI_DrawLine(10,67,117,67);//???????????±?? GUI_SetColor(GUI_WHITE); GUI_SetFont(&GUI_Font8x8);//?è??×??? GUI_GotoXY(50,40);//?è???±?°??±????? GUI_DispDecMin(rate);//?????????? GUI_GotoXY(50,85);//?è???±?°??±????? GUI_DispDecMin(east);//?????????????? GUI_DispChars('E',1); GUI_GotoXY(90,85);//?è???±?°??±????? GUI_DispDecMin(west);//?????????????? GUI_DispChars('W',1); GUI_GotoXY(50,103);//?è???±?°??±????? GUI_DispDecMin(height);//?????????????? GUI_DispChars('H',1); }[/mw_shl_code]

2.(画如下这个界面的时候,进不了定时器中断服务函数):
[mw_shl_code=c,true]void Draw_Phone_Screen(void) { char string1[15] = "Calling..."; char string2[15] = "Your telegram"; char string3[15] = "On the phone"; char ac[] = "Select number:"; char xPosition1 = 20; char yPosition1 = 68; char xPosition2 = 20; char yPosition2 = 88; char xPosition3 = 20; char yPosition3 = 108; unsigned char i; char phone[11] ; //?????????????°???? for(i = 0;i <11;i++) { phone = Phone_Number; //???????°???? } if(Screen_Change == 1) //??????????????±??? { GUI_ClearRect(0,0,128,128);//????±??°???????? } Draw_Header();//???????? switch (K1_Count) { case PHONE_DIALING : //???????????? GUI_DrawBitmap(&bm30x30calling,50,30); //??????????±ê GUI_SetFont(&GUI_Font8x8); //?è??×??? GUI_GotoXY(4,70); //?è???±?°??±????? GUI_DispString(string1); GUI_GotoXY(20,100); //?è???±?°??±????? GUI_DispString(phone); //???????°???? break; case PHONE_COMING : //???????????? GUI_DrawBitmap(&bm30x30incoming,50,30); //??????????±ê GUI_SetFont(&GUI_Font8x8); //?è??×??? GUI_GotoXY(4,70); //?è???±?°??±????? GUI_DispString(string2); GUI_GotoXY(20,100); //?è???±?°??±????? GUI_DispString(phone); //???????°???? break; case PHONE_CALLING : //?????¨?°?????? GUI_DrawBitmap(&bm30x30ontheline,50,30); //??????????±ê GUI_SetFont(&GUI_Font8x8); //?è??×??? GUI_GotoXY(4,70); //?è???±?°??±????? GUI_DispString(string3); GUI_GotoXY(20,100); //?è???±?°??±????? GUI_DispString(phone); //???????°???? break; case PHONE_SCREEN : //?????¨?°???????? ???????????? GUI_SetFont(&GUI_Font8x8); GUI_GotoXY(7,40); //?è???±?°??±????? GUI_DispString(ac); GUI_GotoXY(30,70); //?è???±?°??±????? GUI_DispString(number1); GUI_GotoXY(30,90); //?è???±?°??±????? GUI_DispString(number2); GUI_GotoXY(30,110); //?è???±?°??±????? GUI_DispString(number3); GUI_ClearRect(0,60,29,128);//????±??°?????????????????ò //????????????????????±ê if(K2_Count == PHONE_NUMBER_1) GUI_AA_FillPolygon(Number_Select,GUI_COUNTOF(Number_Select),4 * (xPosition1),4 * (yPosition1)); else if(K2_Count == PHONE_NUMBER_2) GUI_AA_FillPolygon(Number_Select,GUI_COUNTOF(Number_Select),4 * (xPosition2),4 * (yPosition2)); else if(K2_Count == PHONE_NUMBER_3) GUI_AA_FillPolygon(Number_Select,GUI_COUNTOF(Number_Select),4 * (xPosition3),4 * (yPosition3)); break; default : break; } }[/mw_shl_code]


请各位大神支招!万分感谢!

Love life, love the electrons!
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165309
金钱
165309
注册时间
2010-12-1
在线时间
2108 小时
发表于 2015-4-8 22:35:25 | 显示全部楼层
回复

使用道具 举报

22

主题

63

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
275
金钱
275
注册时间
2013-10-26
在线时间
17 小时
 楼主| 发表于 2015-4-9 10:21:31 | 显示全部楼层
找到产生这个问题的原因了,是如下这个函数导致的问题:

GUI_AA_FillPolygon();

定位的到这个函数,函数的原型如下:

[mw_shl_code=c,true]/********************************************************************* * * GUI_AA_FillPolygon */ void GUI_AA_FillPolygon(/*const*/ GUI_POINT* pPoints, int NumPoints, int x0, int y0) { GUI_LOCK(); #if (GUI_WINSUPPORT) WM_ADDORG_AA(x0,y0); WM_ITERATE_START(NULL); { #endif /* Variables in MEMDEV module (with memory devices only) */ #if GUI_SUPPORT_MEMDEV if (GUI_Context.pDeviceAPI->pfFillPolygonAA) GUI_Context.pDeviceAPI->pfFillPolygonAA(pPoints, NumPoints, x0, y0); else #endif _FillPolygonAA (pPoints, NumPoints, x0, y0); #if (GUI_WINSUPPORT) } WM_ITERATE_END(); #endif GUI_UNLOCK(); }[/mw_shl_code]
我的 GUI_WINSUPPORT 定义为 0,GUI_SUPPORT_MEMDEV 定义为 1 ,但我的是 裸机UCGUI,所以里面的 GUI_LOCK(); 和 GUI_UNLOCK(); 是空函数体,不影响!
唯一会影响的就是GUI_SUPPORT_MEMDEV 这个定义!
请问各位大神,具体是什么原因?
Love life, love the electrons!
回复

使用道具 举报

22

主题

63

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
275
金钱
275
注册时间
2013-10-26
在线时间
17 小时
 楼主| 发表于 2015-4-9 16:02:03 | 显示全部楼层
只要我使用了抗锯齿函数,都无法进入中断服务函数,但改成非抗锯齿函数画界面,都可以进入定时器中断服务函数!

现在还是不知道为什么会这样!
Love life, love the electrons!
回复

使用道具 举报

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

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-23 08:56

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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