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

📄 program9.c

📁 嵌入式系统基础课件
💻 C
字号:
#include "libepc.h"
#include "os_cpu.h"
#include "os_cfg.h"
#include "ucos_ii.h"
#include "inbound.h"
#include "elapsed.h"
#include "packet.h"
#include <dos.h>

#define	STACK_SIZE	1000

extern void OutboundThread() ;

PRIVATE OS_STK *CreateStack(void)
	{
	OS_STK *top = (OS_STK *) malloc(STACK_SIZE) + STACK_SIZE ;
	if (!top) for (;;) ;
	return top ;
	}

int main()
	{
	ClearScreen(0x07) ;
	SetCursorVisible(TRUE) ;

	OSInit() ;
	OSTaskCreate(ReceivePackets,	NULL, CreateStack(), 0) ;
	OSTaskCreate(InboundTime,	NULL, CreateStack(), 1) ;
	OSTaskCreate(InboundText,	NULL, CreateStack(), 2) ;
	OSTaskCreate(OutboundThread,	NULL, CreateStack(), 3) ;
	OSTaskCreate(ElapsedLocal,	NULL, CreateStack(), 4) ;
	OSStart() ;

	return 0 ;
	}

⌨️ 快捷键说明

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