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

📄 patch.c

📁 日本著名的的嵌入式实时操作系统T-Kernel的源码及用户手册。
💻 C
字号:
/* *---------------------------------------------------------------------- *    T-Kernel * *    Copyright (C) 2004 by Ken Sakamura. All rights reserved. *    T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * *    Version:   1.01.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2004/6/28. * *---------------------------------------------------------------------- *//* *	patch.c (S1C38K) *	System-dependant initialize process */#include <basic.h>#include <tk/tkernel.h>#include <tk/sysdef.h>#include "patch.h"/* * Dummy interrupt handler to ignore invalid interrupt */LOCAL void ignore_interrupt( UINT dintno ){	WaitUsec(10);	if ( dintno == DINTNO(IV_IRQ(31)) ) {		/* IRQ31 */	} else {		/* GPIO-B7 */		/* Wait until invalid interrupt is cleared */		if ( (in_w(GPIO_IRC) & 1) == 0 ) {			/* Port A, B independent */			while ( in_w(GPB_STS) == 0				&& (in_w(IRQ_STS) & (1 << 11)) != 0 );		} else {			/* Port A, B shared */			while ( in_w(GPA_STS) == 0 && in_w(GPB_STS) == 0				&& (in_w(IRQ_STS) & (1 << 10)) != 0 );		}	}}#if USE_SYSDEPEND_PATCH1/* * System-dependant processes (before start_system) */EXPORT void sysdepend_patch1( void ){	T_DINT	dint;	dint.intatr = TA_HLNG;	dint.inthdr = ignore_interrupt;	tk_def_int(DINTNO(IV_IRQ(31)), &dint);	tk_def_int(DINTNO(IV_GPB(7)), &dint);}#endif#if USE_SYSDEPEND_PATCH2/* * System-dependant processes (after start_system) */EXPORT void sysdepend_patch2( void ){	/* Do nothing */}#endif

⌨️ 快捷键说明

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