00001 /* FreeEMS - the open source engine management system 00002 * 00003 * Copyright 2010 Sean Keys, Fred Cooke 00004 * 00005 * This file is part of the FreeEMS project. 00006 * 00007 * FreeEMS software is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * FreeEMS software is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/ 00019 * 00020 * We ask that if you make any changes to this file you email them upstream to 00021 * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com! 00022 * 00023 * Thank you for choosing FreeEMS to run your engine! 00024 */ 00025 00026 #ifndef FILE_XGATEVECTORS_H_SEEN 00027 #define FILE_XGATEVECTORS_H_SEEN 00028 00029 00030 #ifdef EXTERN 00031 #warning "EXTERN already defined by another header, please sort it out!" 00032 #undef EXTERN /* If fail on warning is off, remove the definition such that we can redefine correctly. */ 00033 #endif 00034 00035 00036 #ifdef XGATEVECTORS_C 00037 #define EXTERN 00038 #else 00039 #define EXTERN extern 00040 #endif 00041 00042 00043 typedef struct { 00044 unsigned short programCounterValue; /* This data is forced into the XGATE PC register */ 00045 unsigned short initialVariable; /* This data is forced into the XGATE R1 register */ 00046 } xgateIntVector; 00047 00048 00049 EXTERN const xgateIntVector xgateIntVectorTable[121]; 00050 00051 00052 // Xgate control value 00053 #define XGATE_ERROR_HANDLER 0x0000 /* TODO Create the XGATE error handling thread in asm. */ 00054 00055 00056 #else 00057 /* let us know if we are being untidy with headers */ 00058 #warning "Header file XGATEVECTORS_H seen before, sort it out!" 00059 /* end of the wrapper ifdef from the very top */ 00060 #endif