tkernel_2/kernel/sysdepend/device/tef_em1d/patch.c | bare source | permlink (0.02 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * patch.c (EM1-D512) 17: * System-dependent initialize process 18: */ 19: 20: #include <basic.h> 21: #include <tk/tkernel.h> 22: #include "patch.h" 23: 24: #if USE_SYSDEPEND_PATCH1 25: /* 26: * Empty handler to ignore stray interrupts 27: */ 28: LOCAL void ignore_interrupt( UINT dintno ) 29: { 30: static INT ignore_interrupt_counter; 31: 32: ignore_interrupt_counter++; 33: } 34: 35: /* 36: * System-dependent processes (before start_system) 37: */ 38: EXPORT void sysdepend_patch1( void ) 39: { 40: T_DINT dint; 41: 42: /* register an empty handler to ignore stray interrupts */ 43: dint.intatr = TA_HLNG; 44: dint.inthdr = ignore_interrupt; 45: tk_def_int(DINTNO(IV_IRQ(95)), &dint); 46: } 47: #endif 48: 49: #if USE_SYSDEPEND_PATCH2 50: /* 51: * System-dependent processes (after start_system) 52: */ 53: EXPORT void sysdepend_patch2( void ) 54: { 55: /* Do nothing */ 56: } 57: #endif