⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex1.c

📁 三星2410的一些DEMO小例程
💻 C
字号:
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for UCOS-II                                    *
*                                                                         *
*   MODULE      : EX1.c                                                   *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   PROCESSOR   : Any processor                                           *
*                                                                         *
*   IDE         : Any IDE                                                 *
*                                                                         *
*   DESCRIPTION :                                                         *
*   This is a sample code to test UCOS-II.                                *
*                                                                         *
**************************************************************************/

#include "def.h"
//#include "lcd.h"
//#include "lcdchar.h"
//#include "lcdlib.h"
//#include "glib.h"
#include "includes.h"
#include "consol.h"



/* ********************************************************************* */
/* Global definitions */


/* ********************************************************************* */
/* File local definitions */


#define	STACKSIZE	1024*10

unsigned int Stack1[STACKSIZE];
unsigned int Stack2[STACKSIZE];
unsigned int Stack3[STACKSIZE];
void user_task1(void *p);
void user_task2(void *p);

int zhl;
int zhl1;

void user_task1(void *i)
{
			
		while(1){
		//Uart_Printf("Hello!!\n");		
				
		OSTimeDly(2*OS_TICKS_PER_SEC);
	  }
}

void user_task2(void *i)
{
			
		while(1){
		Uart_Printf("enter user task2\n");		
				
		OSTimeDly(OS_TICKS_PER_SEC/3);
	  }
}

OS_EVENT *RandomSem;

//void lcddisp(void);

/* ********************************************************************* */
/* Global functions */


void APP_vMain (void)
{
	

	OSInit();  	 
	OSTimeSet(0); 
 OSTaskCreate(user_task1, (void *)0, (void *)&Stack2[STACKSIZE - 1], 23); 
 	FRMWRK_vStartTicker(OS_TICKS_PER_SEC);  // os_cfg.h 
  OSStart();	
                  
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -