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_H_ 00025 #define BDI_H_ 00026 00027 #include "fx2regs.h" 00028 #include "TP3465regs.h" 00029 00030 // PORT 00032 #define BDIout IOD 00033 00034 #define BDIddr OED 00035 00036 #define BDIddrInit 0xc2 00037 00038 #define BDIoutInit 0x02 00039 00040 // PORT Bitmasks 00042 #define bmDSCK 0x10 00043 00044 #define bmDSDI 0x08 00045 00046 // PORT PINS 00048 __sbit __at 0xB0+0 FREEZE; 00050 __sbit __at 0xB0+1 HARD_RESET; 00052 __sbit __at 0xB0+2 DSDO; 00054 __sbit __at 0xB0+3 DSDI; 00056 __sbit __at 0xB0+4 DSCK; 00058 __sbit __at 0xB0+5 BERR; 00060 __sbit __at 0xB0+6 STATUS_LED1; 00062 __sbit __at 0xB0+7 STATUS_LED2; 00063 00064 void initBDI(); 00065 void initTP3465(); 00066 void BDI_get_freeze(); 00067 void exceptionOnTimeoutOn(); 00068 void exceptionOnTimeoutOff(); 00069 void handelBDIPackages(); 00070 00071 #endif /*BDI_H_*/