main.c

来自「在AVR单片机上使用的一款RTOS」· C语言 代码 · 共 46 行

C
46
字号
/*
 *  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"

#include "kernel/clock.h"
#include <stdio.h>

/* 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};
iClockFull port_max_clock_values2=
	{THREAD_DEFAULT_SWITCH_PERIOD,
	iCPU_RATE_HZ,
	iZERO_CLOCK_DIV,
	THREAD_DEFAULT_SWITCH_RATE_HZ};
int main(void)
{

	printf ("Sizeof_timeout %d",sizeof(iTimeout));
	/**create tests*/
//	itest_create ();
//queue_tests_create (2);
//proto_net_test_create(1);
	freeRTOS_tests_start();
	iRTOS_scheduler_start(NULL);	
}

⌨️ 快捷键说明

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