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

📄 devinit.c

📁 uT Kernel os source code for AT91
💻 C
字号:
/* *---------------------------------------------------------------------- *    micro T-Kernel * *    Copyright (C) 2006-2007 by Ken Sakamura. All rights reserved. *    micro T-Kernel is distributed under the micro T-License. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2007/03/26. * *---------------------------------------------------------------------- *//* *	devinit.c (AT91) *	Device-Dependent Initialization */#include "sysinit.h"#include "kernel.h"#include <tk/sysdef.h>#include <sys/sysinfo.h>#include <libstr.h>Noinit(EXPORT	FP	knl_intvec[N_INTVEC]);EXPORT	W	knl_taskindp = 0;Noinit(EXPORT	UW	knl_taskmode);/* ------------------------------------------------------------------------ *//* * Initialization before micro T-Kernel starts */EXPORT ER knl_init_device( void ){	return E_OK;}/* ------------------------------------------------------------------------ *//* * Start processing after T-Kernel starts *	Called from the initial task contexts. */EXPORT ER knl_start_device( void ){	return E_OK;}#if USE_CLEANUP/* ------------------------------------------------------------------------ *//* * System finalization *	Called just before system shutdown. *	Execute finalization that must be done before system shutdown. */EXPORT ER knl_finish_device( void ){	return E_OK;}/* ------------------------------------------------------------------------ *//* *	Re-starting processing *//* * Re-starting processing *	mode = -1		Reset and re-start	(cold boot) *	mode = -2		Re-start		(warm boot) *	mode = -3		Reboot			(normal boot) *	mode = 0xFFhhmmss	Re-start at hh:mm:ss *				0 <= hh < 24, 0 <= mm,ss < 60 */EXPORT ER knl_restart_device( W mode ){	if ( mode == -1 ) {		/* Reset and re-start (cold boot) */#if USE_KERNEL_MESSAGE		tm_putstring((UB*)"\n<< SYSTEM RESTART >>\n");#endif		tm_exit(-1);  /* no return */		return E_OBJ;	}	if ( mode == -3 ) {		/* Reboot (normal boot) */#if USE_KERNEL_MESSAGE		tm_putstring((UB*)"\n<< SYSTEM REBOOT >>\n");#endif		return E_NOSPT;	}	if ( mode == -2 ) {		return E_NOSPT; /* Unsupported */	}	if ( (mode & 0xff000000U) == 0xff000000U ) {		/* Re-start at specified time */		return E_NOSPT;	/* Unsupported */	}	return E_PAR;}#endif /* USE_CLEANUP */

⌨️ 快捷键说明

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