/***************************************************************************/ /* Name : Error.C */ /* Uses : System error handeling */ /* Date : ??/??/2001 */ /* Author : Andrew Que */ /* Revisions : */ /* v1.0 - ??/??/2001 - QUE - Creation and implemtation */ /* */ /***************************************************************************/ #include "General.H" #include "DSP.H" #include "Hardware.H" #include "Int.H" #include "Error.H" //--------------------------------------------------------------------------- // Fatal error // Any number of hardware failures can cause this, but software can really // do nothing about it. An error status is flashed on the status LEDs and // the system is halted. // $$$DEBUG - Add your own LED code //--------------------------------------------------------------------------- void FatalError( enum FatalErrors ErrorType ) { uint Count; uint32 WaitCount; // Disable all interrupts DSP_REG( IMR ) = 0; while ( 1 ) { Count = (uint)ErrorType + 1; while ( Count-- ) { // $$$DEBUG - Here I turn on a status LED for ( WaitCount = 0; WaitCount < 100000; ++WaitCount ); // $$$DEBUG - Here I turn off the status LED for ( WaitCount = 0; WaitCount < 100000; ++WaitCount ); } for ( WaitCount = 0; WaitCount < 500000; ++WaitCount ); } }