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

📄 inbound.c

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

PRIVATE OS_EVENT *display_queue = NULL ;

PRIVATE void InboundCreateQ(void)
	{
	if (!display_queue)
		{
		static void *display_q[20] ;
		display_queue = OSQCreate(display_q, ENTRIES(display_q)) ;
		}
	}

void PostText(BYTE8 *bfr)
	{
	InboundCreateQ() ;
	OSQPost(display_queue, bfr) ;
	}

void InboundText(void)
	{
	WINDOW *remote ;

	remote = WindowCreate("Remote", 14, 24, 0, 79) ;
	InboundCreateQ() ;

	for (;;)
		{
		char *bfr ;
		BYTE8 err ;

		bfr = OSQPend(display_queue, 0, &err) ;
		WindowPutChar(remote, *bfr) ;
		free(bfr) ;
		}
	}

⌨️ 快捷键说明

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