📄 ezusb_jtag.h
字号:
/* * This file is part of Jelie, * (c) 2002 Julien Pilet <julien.pilet@epfl.ch> and * Stephane Magnenat <stephane.magnenat@epfl.ch> * * Jelie is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Jelie is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Foobar; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *//*! \file * * This is the definition of the JTAG controller * * \author Julien Pilet <julien.pilet@epfl.ch> * \author Stephane Magnenat <stephane.magnenat@epfl.ch> */#ifndef __EZUSB_JTAG_H#define __EZUSB_JTAG_H#include "ezusb_loader.h"#include "jtag.h"//! The implementation of JTAG Control for EzUSB/*! This class inherits from JTAGControl as it's purprose is to implement a JTAG interface. It also inherits from EzUSB so all program upload facilities are already here. */class EzUSBJTAG: public EzUSB, public JTAGControl{protected: //! Method used internally to send and receive a buffer void writeAndReadBuffer(unsigned char *buffer, int toWrite, int toRead, unsigned long delay=0); //! interneal queu for message queuing unsigned char queue[64]; //! internal position in queu int queuePos;public: //! The constructor, call EzUSB's one with empty file name and install signal handlers EzUSBJTAG(); //! The destructor, remove signal handlers virtual ~EzUSBJTAG(); //! Initialize the link with the connection device. // \return true on success, false on error. virtual bool init(int argc, char **argv); //! Read and write the jtag instruction register. virtual void ireg(unsigned char *data); //! Read and write the jtag data register. // // \param data a pointer to a buffer which will be exchanged with the // JTAG data register. // \param length number of bits to read/write. virtual void dreg(unsigned char *data, unsigned char length, bool writeOnly=false); //! Put the JTAG in run test/idle mode virtual void jtagReset(void); //! Assert or deassert the cpu reset line. virtual void cpuReset(bool state); //! Assert or deassert the TRST (the JTAG Reset line) virtual void trst(bool state); //! Idle for some TCKs in the run test/idle state. virtual void idle(unsigned int nbTCK); //! Flush the jtag write only command queue virtual void flushQueue(void); virtual const char *getName(void) const { return "ezusb"; }};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -