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

📄 main.c

📁 在AVR单片机上使用的一款RTOS
💻 C
字号:
/* *  iRTOS *  Copyright (C) 2008  Dmitriy Cherepanov * *  This file is part of IRTOS * *  This source is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * *  This file is public domain you may use it as you wish * *  Do not be lasy! For the latest version see http://irtos.sourceforge.net . */#include "iRTOS.h"#include "kernel/os.h"#include "kernel/thread.h"#include "src/tests/itests.h"#include "src/tests/queue_test.h"int data=34;/*\todo prototype to port thread and attribute naked*/void test_thread(int * test){	while (*test==34) {		ithread_yield();	}}/* This define new max clock counters flormula 	for example 59,59,23 is a standart clock formula with 60 sec 60 min and 24 hours*/iClockFull port_max_clock_values={ZERO_CLOCK_OVERFLOW_PERIOD-1,63,63,127};iarch freeRTOS_tests_start( void );int main(){int c;		/**create tests*///	itest_create ();//queue_tests_create (2);//proto_net_test_create(1);	/*ithread_create 	(NULL,			 &test_thread,			 &data,			 200,    			 1,			 0);	*/		 	freeRTOS_tests_start();	iRTOS_scheduler_start(NULL);	}

⌨️ 快捷键说明

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