usb_jtag.h

Go to the documentation of this file.
00001 //
00002 // USB_JTAG.H
00003 //
00004 // Low level JTAG access code.  Handles all clocking of data in and
00005 // out of target hardware.
00006 //
00007 // Copyright (c) 2002, Jason Riffel - TotalEmbedded LLC.
00008 // All rights reserved.
00009 //
00010 // Redistribution and use in source and binary forms, with or without 
00011 // modification, are permitted provided that the following conditions 
00012 // are met:
00013 //
00014 // Redistributions of source code must retain the above copyright 
00015 // notice, this list of conditions and the following disclaimer. 
00016 //
00017 // Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in 
00019 // the documentation and/or other materials provided with the
00020 // distribution. 
00021 //
00022 // Neither the name of TotalEmbedded nor the names of its 
00023 // contributors may be used to endorse or promote products derived 
00024 // from this software without specific prior written permission.
00025 // 
00026 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00027 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00028 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
00029 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
00030 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
00031 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00032 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
00033 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00034 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00035 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
00036 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
00037 // POSSIBILITY OF SUCH DAMAGE.
00038 //
00039 // Modifed by ZGJ on the 20090609
00040 
00041 #ifndef dJTAG_H
00042 #define dJTAG_H
00043 
00044 //
00045 // PROTOTYPES
00046 //
00047 void          fJTAG_Init       (void);
00048 void          fJTAG_unInit     (void);
00049 unsigned int  fJTAG_Data       (unsigned int  ui_data_out);
00050 unsigned char fJTAG_Instruction(unsigned char uc_data_out);
00051 
00052 #ifndef USB_NO_FOUND
00053 #define USB_NO_FOUND 0
00054 #endif
00055 #ifndef USB_FOUND
00056 #define USB_FOUND 1
00057 #endif
00058 
00059 #ifndef USB_CAN_BULK_WR_FLAG
00060 #define USB_CAN_BULK_WR_FLAG 1
00061 #endif
00062 #ifndef USB_NOT_BULK_WR_FLAG
00063 #define USB_NOT_BULK_WR_FLAG 0
00064 #endif
00065 
00066 
00067 //
00068 // DEFINES
00069 //
00070 #define dJTAG_REGISTER_EXTEST       0x00
00071 #define dJTAG_REGISTER_IDCODE       0x01
00072 #define dJTAG_REGISTER_SAMPLE       0x02
00073 #define dJTAG_REGISTER_IMPCODE      0x03
00074 #define dJTAG_REGISTER_ADDRESS      0x08
00075 #define dJTAG_REGISTER_DATA         0x09
00076 #define dJTAG_REGISTER_CONTROL      0x0A
00077 #define dJTAG_REGISTER_ALL          0x0B
00078 #define dJTAG_REGISTER_EJTAG_BOOT   0x0C
00079 #define dJTAG_REGISTER_NORMAL_BOOT  0x0D
00080 #define dJTAG_REGISTER_DBTX         0x1C
00081 #define dJTAG_REGISTER_EJWATCH      0x1C
00082 #define dJTAG_REGISTER_DBDX         0x1D
00083 #define dJTAG_REGISTER_BYPASS       0x1F
00084 
00085 #endif // #ifndef dJTAG_H

Generated on Fri Nov 5 07:24:46 2010 for ejtag debug tools for loongson 232 cpu by  doxygen 1.5.6