Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ezusb_jtag.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Jelie,
00003  * (c) 2002 Julien Pilet <julien.pilet@epfl.ch> and
00004  * Stephane Magnenat <stephane.magnenat@epfl.ch>
00005  *
00006  * Jelie is free software; you can redistribute it
00007  * and/or modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the License,
00009  * or (at your option) any later version.
00010  *
00011  * Jelie is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with Foobar; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00029 #ifndef __EZUSB_JTAG_H
00030 #define __EZUSB_JTAG_H
00031 
00032 #include "ezusb_loader.h"
00033 #include "jtag.h"
00034 
00036 
00040 class EzUSBJTAG: public EzUSB, public JTAGControl
00041 {
00042 protected:
00044         void writeAndReadBuffer(unsigned char *buffer, int toWrite, int toRead, unsigned long delay=0);
00045 
00047         unsigned char queue[64];
00048 
00050         int queuePos;
00051 
00052 public:
00054         EzUSBJTAG();
00055 
00057         virtual ~EzUSBJTAG();
00058 
00060         // \return true on success, false on error.
00061         virtual bool init(int argc, char **argv);
00062 
00064         virtual void ireg(unsigned char *data);
00065 
00067         //
00068         // \param data a pointer to a buffer which will be exchanged with the
00069         // JTAG data register.
00070         // \param length number of bits to read/write.
00071         virtual void dreg(unsigned char *data, unsigned char length, bool writeOnly=false);
00072 
00074         virtual void jtagReset(void);
00075 
00077         virtual void cpuReset(bool state);
00078 
00080         virtual void trst(bool state);
00081 
00083         virtual void idle(unsigned int nbTCK);
00084 
00086         virtual void flushQueue(void);
00087 
00088         virtual const char *getName(void) const { return "ezusb"; }
00089 };
00090 
00091 #endif

Generated on Fri May 16 13:01:45 2003 for Jelie by doxygen1.2.15