USB-BDI
|
00001 /* USB-BDI Used for programming and debugging a MPC555 over USB 00002 * 00003 * Copyright 2005 NTB Interstate University of Applied Sciences of Technology Buchs 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 */ 00015 00024 #ifndef BDI_555_H_ 00025 #define BDI_555_H_ 00026 00027 #include "BDI.h" 00028 00029 // BDI specific constants 00031 #define BDI_DATA35_LENGTH 5 00032 00033 #define BDI_DATA10_LENGTH 2 00034 00035 #define BDI_10_OFFSET 1 00036 00037 // BDI status bits (555) (second and third two bits of data shifted out (DSDO)) 00039 #define BDI_35STATUS_MASK 0x60 00040 00041 #define BDI_35STATUS_VALID 0x00 00042 00043 #define BDI_35STATUS_SEQ_ERROR 0x20 00044 00045 #define BDI_35STATUS_CPU_INT 0x40 00046 00047 #define BDI_35STATUS_NULL 0x60 00048 00050 #define TIMEOUT_EXCEPTION_ON 00051 00052 #define EXCEPTION_COUNT 20 00053 00054 extern volatile __bit exceptionOnTimeout; 00056 extern volatile unsigned char exceptionCount; 00057 00058 void BDI_555_init(); 00059 void BDI_555_hard_reset(); 00060 void BDI_555_35(); 00061 void BDI_555_10(); 00062 00063 #endif /*BDI_555_H_*/