📄 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 *//*! This is the main JTAG header that has the JTAG interface * and some constants * * \author Julien Pilet <julien.pilet@epfl.ch> * \author Stephane Magnenat <stephane.magnenat@epfl.ch> */#ifndef _JTAG_H_#define _JTAG_H_//! 5 bits JTAG commands for the Intel PXA250.#define JTAG_IRLENGTH 5//! Low level JTAG control interface./*! Gives access to JTAG instruction register (ireg) and data register (dreg). With this interface it is possible to have multiple JTAG physical implementations. */class JTAGControl {public: //! Initialize the link with the connection device. /*! \param argc number of command line argument \param argv array of char* that contains the arguments \return true on success, false on error. */ virtual bool init(int argc, char **argv)=0; //! Read and write the jtag instruction register. /*! \param data a pointer to a buffer which will be exchanged with the JTAG instruction register. It always contains only 5 bit so it's one byte wide. \return nothing. */ virtual void ireg(unsigned char *data)=0; //! 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. \param writeOnly only write, do not read back \return nothing. */ virtual void dreg(unsigned char *data, unsigned char length, bool writeOnly=false)=0; //! Put the JTAG in run test/idle mode /*! \return nothing. */ virtual void jtagReset(void)=0; //! Assert or deassert the cpu reset line. /*! \param state logical state of the CPU Reset line \return nothing. */ virtual void cpuReset(bool state)=0; //! Assert or deassert the TRST (JTAG Reset) /*! \param state logical state of the TRST line \return nothing. */ virtual void trst(bool state)=0; //! Idle for some TCKs in the run test/idle state. /*! \param nbTCK number of clock cycle (16 bit width integer). \return nothing. */ virtual void idle(unsigned int nbTCK)=0; //! FLush the write only jtag command queue virtual void flushQueue(void)=0; //! Return the name of the Jtag Control (like usb, pp) virtual const char *getName(void) const =0;};#endif // _JTAG_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -