devinit.c

来自「uT Kernel os source code for AT91」· C语言 代码 · 共 102 行

C
102
字号
/* *---------------------------------------------------------------------- *    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 (H8S2212) *	Device-Dependent Initialization */#include "sysinit.h"#include "kernel.h"#include <tk/sysdef.h>#include <sys/sysinfo.h>#include <libstr.h>/* ------------------------------------------------------------------------ *//* * 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 ) {#if USE_KERNEL_MESSAGE		tm_putstring((UB*)"\n<< SYSTEM REBOOT >>\n");#endif		return E_NOSPT;	}	if ( mode == -2 ) {		return E_NOSPT; /* Unsupported */	}	if ( (mode & 0xff000000) == 0xff000000 ) {		/* Re-start at specified time */		return E_NOSPT;	/* Unsupported */	}	return E_PAR;}#endif /* USE_CLEANUP */

⌨️ 快捷键说明

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