新手入门
- 积分
- 10
- 金钱
- 10
- 注册时间
- 2020-7-7
- 在线时间
- 2 小时
|
time.c
#include "timer.h"
#include "led.h"
#include "GUI.h"
#include "usart.h"
void TIM4_PWM_Init(u16 arr,u16 psc)
{
GPIO_InitTypeDef GPIO_InitStructure;
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_OCInitTypeDef TIM_OCInitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE); //ê1Äü¶¨ê±Æ÷3ê±Öó
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE); //ê1ÄüGPIOíaéèoíAFIO¸′óÃ1|ÄüÄ£¿éê±Öó
//GPIO_PinRemapConfig(GPIO_Remap_TIM4, ENABLE); //Timer4ÖØó3éä TIM4_CH3->PB8
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; //TIM_CH3
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //¸′óÃíÆíìêä3ö
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);//3õê¼»ˉGPIO
//3õê¼»ˉTIM3
TIM_TimeBaseStructure.TIM_Period = arr; //éèÖÃÔúÏÂò»¸ö¸üDÂê¼t×°èë»î¶ˉμÄ×Ô¶ˉÖØ×°ÔؼÄ′æÆ÷ÖüÆúμÄÖμ
TIM_TimeBaseStructure.TIM_Prescaler =psc; //éèÖÃóÃà′×÷ÎaTIMxê±ÖóÆμÂê3yêyμÄÔ¤·ÖÆμÖμ
TIM_TimeBaseStructure.TIM_ClockDivision = 0; //éèÖÃê±Öó·Ö¸î:TDTS = Tck_tim
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; //TIMÏòéϼÆêyÄ£ê½
TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure); //¸ù¾YTIM_TimeBaseInitStructÖDÖ¸¶¨μÄ2Îêy3õê¼»ˉTIMxμÄê±¼ä»ùêyμ¥λ
//3õê¼»ˉTIM3 Channel2 PWMÄ£ê½
TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1; //Ñ¡Ôñ¶¨ê±Æ÷Ä£ê½:TIMÂö3å¿í¶èμ÷ÖÆÄ£ê½2
TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; //±è½Ïêä3öê1Äü
TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; //êä3ö¼«DÔ:TIMêä3ö±è½Ï¼«DÔ¸ß
TIM_OCInitStructure.TIM_Pulse = 8000; //Õ¼¿Õ±è
TIM_OC3Init(TIM4, &TIM_OCInitStructure); //3õê¼»ˉTIM4μÄCH3í¨μà
TIM_OC3PreloadConfig(TIM4, TIM_OCPreload_Enable); //ê1ÄüTIM4ÔúCH3í¨μàCCR3éÏμÄԤװÔÔ¼Ä′æÆ÷
TIM_ARRPreloadConfig(TIM4,ENABLE);//ê1ÄüTIM4ÔúCH3í¨μàARR3éÏμÄԤװÔú¼Ä′æÆ÷
TIM_Cmd(TIM4, ENABLE); //ê1ÄüTIM3
}
BUTTONUse.c
#include "DIALOG.h"
#include "ButtonUse.h"
#include "delay.h"
#include "led.h"
#include "beep.h"
#define ID_FRAMEWIN_0 (GUI_ID_USER + 0x00)
#define ID_BUTTON_0 (GUI_ID_USER + 0x01)
#define ID_BUTTON_1 (GUI_ID_USER + 0x02)
#define ID_BUTTON_2 (GUI_ID_USER + 0x03)
#define ID_BUTTON_3 (GUI_ID_USER + 0x04)
#define ID_BUTTON_4 (GUI_ID_USER + 0x05)
#define ID_BUTTON_5 (GUI_ID_USER + 0x06)
#define ID_BUTTON_6 (GUI_ID_USER + 0x07)
#define ID_BUTTON_7 (GUI_ID_USER + 0x08)
void TIM4_PWM_Init(u16 arr,u16 psc);
int buf[] = {1000,3000,5000,7000,9000,11000,13000,15000,17000,19000,};
unsigned char buf_change1[10] = {190,184,136,88,40,88,224,152,104};
unsigned char buf_change2[10] = {33,184,136,88,40,88,99,152,222};
unsigned char buf_change3[10] = {187,184,181,178,175, 171,168,164,161,158};
unsigned char buf_change4[10] ={247,6,38,74,93,136,184,38,11, 75 };
void buf_yin(unsigned char data[])
{ unsigned char ik;
for(ik=0;ik<3;ik++){
GPIO_Write(GPIOC,data[ik]);
delay_ms(1);
}
}
void buf_yue(unsigned char data[])
{ unsigned char ik;
for(ik=3;ik>0;ik++)
{
GPIO_Write(GPIOC,data[ik]);
delay_ms(1);
}
}
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] =
{
{ FRAMEWIN_CreateIndirect, "Simple electronic organ", ID_FRAMEWIN_0, -12, 0, 800, 483, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button1", ID_BUTTON_0, 116, 97, 97, 32, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button2", ID_BUTTON_1, 278, 95, 88, 33, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button3", ID_BUTTON_2, 427, 96, 90, 35, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button4", ID_BUTTON_3, 570, 98, 91, 32, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button5", ID_BUTTON_4, 109, 216, 102, 33, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button6", ID_BUTTON_5, 276, 210, 95, 40, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button7", ID_BUTTON_6, 421, 212, 97, 35, 0, 0x0, 0 },
{ BUTTON_CreateIndirect, "Button8", ID_BUTTON_7, 573, 209, 102, 38, 0, 0x0, 0 },
};
//¶Ô»°¿ò»Øμ÷oˉêy
static void _cbDialog(WM_MESSAGE * pMsg) {
WM_HWIN hItem;
int NCode;
int Id;
switch (pMsg->MsgId)
{
case WM_INIT_DIALOG:
//3õê¼»ˉ¶Ô»°¿ò
hItem = pMsg->hWin;
FRAMEWIN_SetTitleHeight(hItem, 30);
FRAMEWIN_SetText(hItem, "ALIENTE BUTTON USE");
FRAMEWIN_SetFont(hItem, GUI_FONT_24_ASCII);
FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
FRAMEWIN_SetTextColor(hItem, 0x00FFF00);
//3õê¼»ˉBUTTON0
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
BUTTON_SetText(hItem, "ONE");
//3õê¼»ˉBUTTON1
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
BUTTON_SetText(hItem, "TWO");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON2
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_2);
BUTTON_SetText(hItem, "THREE");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON3
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_3);
BUTTON_SetText(hItem, "FOUR");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON4
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_4);
BUTTON_SetText(hItem, "FIVE");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON5
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_5);
BUTTON_SetText(hItem, "SIX");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON6
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_6);
BUTTON_SetText(hItem, "SEVEN");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
//3õê¼»ˉBUTTON7
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_7);
BUTTON_SetText(hItem, "EIGHT");
BUTTON_SetFont(hItem, GUI_FONT_24_ASCII);
break;
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch(Id)
{
case ID_BUTTON_0: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
int buf[] = {1000,3000,50007000,9000,11000,13000,15000,17000,19000}; buf[] = {1000,3000}£»
for(n=0;n<3;n++){
uf_yin(buf_change1);
buf_yue( buf_change2);
TIM4_PWM_Init(buf[n],0);
delay_ms(30);}
//BEEP=!BEEP;
//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_1: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=288;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_2: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=288;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_3: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=320;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_4: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=341;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_5: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=384;
TIM_Cmd(TIM4,ENABLE);
// BEEP=!BEEP;///·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_6: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=4000;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
case ID_BUTTON_7: //BUTTON_0μÄí¨Öa′úÂ룬¿ØÖÆLED1
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED: //°′Å¥±»°′ÏÂ2¢êí·Å
TIM4->CCR3=480;
TIM_Cmd(TIM4,ENABLE);
//BEEP=!BEEP;//·äÃùÆ÷Ïì
break;
}
break;
}
break;
default:
WM_DefaultProc(pMsg);
break;
}
}
//′′½¨ò»¸ö¶Ô»°¿ò
WM_HWIN CreateFramewin(void)
{
WM_HWIN hWin;
hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
return hWin;
}
//BUTTOÑYê¾oˉêy
void ButtonUse_Demo(void)
{
WM_HWIN hWin;
hWin=CreateFramewin();
while(1)
{
GUI_Delay(100);
}
}
main.c
#include "led.h"
#include "beep.h"
#include "delay.h"
#include "key.h"
#include "sys.h"
#include "ILI93xx.h"
#include "usart.h"
#include "24cxx.h"
#include "flash.h"
#include "touch.h"
#include "sram.h"
#include "timer.h"
#include "sdio_sdcard.h"
#include "malloc.h"
#include "GUI.h"
#include "ff.h"
#include "exfuns.h"
#include "w25qxx.h"
#include "includes.h"
#include "ButtonUse.h"
#include "WM.h"
#include "DIALOG.h"
/************************************************
ALIENTEKÕ½½¢STM32¿a·¢°åSTemWinêμÑé
STemWin BUTTONê1óÃ
¼¼êõÖ§3Ö£owww.openedv.com
ìÔ±|μêÆì£ohttp://eboard.taobao.co
1Øע΢DÅ1«Öúƽì¨Î¢DÅoÅ£o"ÕyμãÔ-×ó"£¬Ãa·Ñ»ñè¡STM32×êáÏ¡£
1ãÖYêDDÇòíμç×ó¿Æ¼¼óDÏT1«Ë¾
×÷ÕߣoÕyμãÔ-×ó @ALIENTEK
************************************************/
//èÎÎñóÅÏ輶
#define START_TASK_PRIO 3
//èÎÎñ¶ÑÕ»′óD¡
#define START_STK_SIZE 1024
//èÎÎñ¿ØÖÆ¿é
OS_TCB StartTaskTCB;
//èÎÎñ¶ÑÕ»
CPU_STK START_TASK_STK[START_STK_SIZE];
//èÎÎñoˉêy
void start_task(void *p_arg);
//TOUCHèÎÎñ
//éèÖÃèÎÎñóÅÏ輶
#define TOUCH_TASK_PRIO 4
//èÎÎñ¶ÑÕ»′óD¡
#define TOUCH_STK_SIZE 128
//èÎÎñ¿ØÖÆ¿é
OS_TCB TouchTaskTCB;
//èÎÎñ¶ÑÕ»
CPU_STK TOUCH_TASK_STK[TOUCH_STK_SIZE];
//touchèÎÎñ
void touch_task(void *p_arg);
//LED0èÎÎñ
//éèÖÃèÎÎñóÅÏ輶
#define LED0_TASK_PRIO 5
//èÎÎñ¶ÑÕ»′óD¡
#define LED0_STK_SIZE 128
//èÎÎñ¿ØÖÆ¿é
OS_TCB Led0TaskTCB;
//èÎÎñ¶ÑÕ»
CPU_STK LED0_TASK_STK[LED0_STK_SIZE];
//led0èÎÎñ
void led0_task(void *p_arg);
//EMWINDEMOèÎÎñ
//éèÖÃèÎÎñóÅÏ輶
#define EMWINDEMO_TASK_PRIO 6
//èÎÎñ¶ÑÕ»′óD¡
#define EMWINDEMO_STK_SIZE 2048
//èÎÎñ¿ØÖÆ¿é
OS_TCB EmwindemoTaskTCB;
//èÎÎñ¶ÑÕ»
CPU_STK EMWINDEMO_TASK_STK[EMWINDEMO_STK_SIZE];
//emwindemo_taskèÎÎñ
void emwindemo_task(void *p_arg);
int main(void)
{
OS_ERR err;
CPU_SR_ALLOC();
delay_init(); //Ñóê±oˉêy3õê¼»ˉ
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //éèÖÃNVICÖD¶Ï·Ö×é2:2λÇàÕ¼óÅÏ輶£¬2λÏìó|óÅÏ輶
uart_init(115200); //′®¿ú3õê¼»ˉÎa115200
LED_Init(); //LED¶Ë¿ú3õê¼»ˉ
TFTLCD_Init(); //LCD3õê¼»ˉ
KEY_Init(); //°′¼ü3õê¼»ˉ
BEEP_Init(); //3õê¼»ˉ·äÃùÆ÷
FSMC_SRAM_Init(); //3õê¼»ˉSRAM
my_mem_init(SRAMIN); //3õê¼»ˉÄú2¿Äú′æ3Ø
my_mem_init(SRAMEX); //3õê¼»ˉía2¿Äú′æ3Ø
delay_init();
exfuns_init(); //ÎafatfsÎļtÏμí3·ÖÅäÄú′æ
f_mount(fs[0],"0:",1); //1òÔØSD¿¨
f_mount(fs[1],"1:",1); //1òÔØFLASH
TP_Init(); //′¥ÃtÆá3õê¼»ˉ
OSInit(&err); //3õê¼»ˉUCOSIII
OS_CRITICAL_ENTER(); //½øèëáù½çÇø
//′′½¨¿aê¼èÎÎñ
OSTaskCreate((OS_TCB * )&StartTaskTCB, //èÎÎñ¿ØÖÆ¿é
(CPU_CHAR * )"start task", //èÎÎñÃû×Ö
(OS_TASK_PTR )start_task, //èÎÎñoˉêy
(void * )0, //′«μY¸øèÎÎñoˉêyμÄ2Îêy
(OS_PRIO )START_TASK_PRIO, //èÎÎñóÅÏ輶
(CPU_STK * )&START_TASK_STK[0], //èÎÎñ¶ÑÕ»»ùμØÖ·
(CPU_STK_SIZE)START_STK_SIZE/10, //èÎÎñ¶ÑÕ»éî¶èÏTλ
(CPU_STK_SIZE)START_STK_SIZE, //èÎÎñ¶ÑÕ»′óD¡
(OS_MSG_QTY )0, //èÎÎñÄú2¿ÏûÏ¢¶óáDÄü1»½óêÕμÄ×î′óÏûÏ¢êyÄ¿,Îa0ê±½ûÖ1½óêÕÏûÏ¢
(OS_TICK )0, //μ±ê1Äüê±¼äƬÂÖ×aê±μÄê±¼äƬ3¤¶è£¬Îa0ê±ÎaĬèÏ3¤¶è£¬
(void * )0, //óû§213äμÄ′æ′¢Çø
(OS_OPT )OS_OPT_TASK_STK_CHK|OS_OPT_TASK_STK_CLR, //èÎÎñÑ¡Ïî
(OS_ERR * )&err); //′æ·Å¸Ãoˉêy′íÎóê±μÄ·μ»ØÖμ
OS_CRITICAL_EXIT(); //íË3öáù½çÇø
OSStart(&err); //¿aÆôUCOSIII
while(1);
}
//¿aê¼èÎÎñoˉêy
void start_task(void *p_arg)
{
OS_ERR err;
CPU_SR_ALLOC();
p_arg = p_arg;
CPU_Init();
#if OS_CFG_STAT_TASK_EN > 0u
OSStatTaskCPUUsageInit(&err); //í3¼ÆèÎÎñ
#endif
#ifdef CPU_CFG_INT_DIS_MEAS_EN //èç1ûê1ÄüáË2aá¿ÖD¶Ï1رÕê±¼ä
CPU_IntDisMeasMaxCurReset();
#endif
#if OS_CFG_SCHED_ROUND_ROBIN_EN //μ±ê1óÃê±¼äƬÂÖ×aμÄê±oò
//ê1Äüê±¼äƬÂÖ×aμ÷¶è1|Äü,ê±¼äƬ3¤¶èÎa1¸öÏμí3ê±Öó½úÅÄ£¬¼è1*5=5ms
OSSchedRoundRobinCfg(DEF_ENABLED,1,&err);
#endif
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC,ENABLE);//¿aÆôCRCê±Öó
WM_SetCreateFlags(WM_CF_MEMDEV); //Æô¶ˉËùóD′°¿úμÄ′æ′¢é豸
GUI_Init(); //STemWin3õê¼»ˉ
OS_CRITICAL_ENTER(); //½øèëáù½çÇø
//STemWin DemoèÎÎñ
OSTaskCreate((OS_TCB* )&EmwindemoTaskTCB,
(CPU_CHAR* )"Emwindemo task",
(OS_TASK_PTR )emwindemo_task,
(void* )0,
(OS_PRIO )EMWINDEMO_TASK_PRIO,
(CPU_STK* )&EMWINDEMO_TASK_STK[0],
(CPU_STK_SIZE)EMWINDEMO_STK_SIZE/10,
(CPU_STK_SIZE)EMWINDEMO_STK_SIZE,
(OS_MSG_QTY )0,
(OS_TICK )0,
(void* )0,
(OS_OPT )OS_OPT_TASK_STK_CHK|OS_OPT_TASK_STK_CLR,
(OS_ERR* )&err);
//′¥ÃtÆáèÎÎñ
OSTaskCreate((OS_TCB* )&TouchTaskTCB,
(CPU_CHAR* )"Touch task",
(OS_TASK_PTR )touch_task,
(void* )0,
(OS_PRIO )TOUCH_TASK_PRIO,
(CPU_STK* )&TOUCH_TASK_STK[0],
(CPU_STK_SIZE)TOUCH_STK_SIZE/10,
(CPU_STK_SIZE)TOUCH_STK_SIZE,
(OS_MSG_QTY )0,
(OS_TICK )0,
(void* )0,
(OS_OPT )OS_OPT_TASK_STK_CHK|OS_OPT_TASK_STK_CLR,
(OS_ERR* )&err);
//LED0èÎÎñ
OSTaskCreate((OS_TCB* )&Led0TaskTCB,
(CPU_CHAR* )"Led0 task",
(OS_TASK_PTR )led0_task,
(void* )0,
(OS_PRIO )LED0_TASK_PRIO,
(CPU_STK* )&LED0_TASK_STK[0],
(CPU_STK_SIZE)LED0_STK_SIZE/10,
(CPU_STK_SIZE)LED0_STK_SIZE,
(OS_MSG_QTY )0,
(OS_TICK )0,
(void* )0,
(OS_OPT )OS_OPT_TASK_STK_CHK|OS_OPT_TASK_STK_CLR,
(OS_ERR* )&err);
OS_TaskSuspend((OS_TCB*)&StartTaskTCB,&err); //1òÆe¿aê¼èÎÎñ
OS_CRITICAL_EXIT(); //íË3öáù½çÇø
}
//EMWINDEMOèÎÎñ
void emwindemo_task(void *p_arg)
{
//¸ü»»Æ¤·ô
BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
MENU_SetDefaultSkin(MENU_SKIN_FLEX);
MULTIPAGE_SetDefaultSkin(MULTIPAGE_SKIN_FLEX);
PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
SPINBOX_SetDefaultSkin(SPINBOX_SKIN_FLEX);
while(1)
{
ButtonUse_Demo();
}
}
//TOUCHèÎÎñ
void touch_task(void *p_arg)
{
OS_ERR err;
while(1)
{
GUI_TOUCH_Exec();
OSTimeDlyHMSM(0,0,0,5,OS_OPT_TIME_PERIODIC,&err);//Ñóê±5ms
}
}
//LED0èÎÎñ
void led0_task(void *p_arg)
{
OS_ERR err;
while(1)
{
//LED0 = !LED0;
OSTimeDlyHMSM(0,0,0,500,OS_OPT_TIME_PERIODIC,&err);//Ñóê±500ms
}
}
|
|