X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Finclude%2Fjtag.h;h=432c23d67f91b9379e0db17874d5ee4a3f7e7059;hp=72c7a4f6efdce089de770dff3a25c36668b9cde8;hb=4359af022eff64cec047af0bd3b738d2f34993e1;hpb=d7ad826230d336ad7b7bd20e47dccc26d7ad456f diff --git a/firmware/include/jtag.h b/firmware/include/jtag.h index 72c7a4f..432c23d 100644 --- a/firmware/include/jtag.h +++ b/firmware/include/jtag.h @@ -3,6 +3,9 @@ \brief JTAG handler functions. */ +#ifndef JTAG_H +#define JTAG_H + #include #include #include @@ -20,6 +23,8 @@ extern unsigned int jtag430mode; //! Shift n bytes. unsigned long jtagtransn(unsigned long word, unsigned int bitcount); +//! Shift the address width. +unsigned long jtag_dr_shiftadr(unsigned long in); //! Shift 8 bits of the IR. unsigned char jtag_ir_shift8(unsigned char); //! Shift 16 bits of the DR. @@ -107,7 +112,9 @@ extern int savedtclk; //Replace every "CLRTCK SETTCK" with this. #define TCKTOCK CLRTCK,SETTCK + //16-bit MSP430 JTAG commands, bit-swapped +//Rewrite these with MSP430 prefix. #define IR_CNTRL_SIG_16BIT 0xC8 // 0x13 #define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14 #define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15 @@ -150,17 +157,6 @@ void jtag430_por(); //JTAG430 commands -#define JTAG430_HALTCPU 0xA0 -#define JTAG430_RELEASECPU 0xA1 -#define JTAG430_SETINSTRFETCH 0xC1 -#define JTAG430_SETPC 0xC2 -#define JTAG430_WRITEMEM 0xE0 -#define JTAG430_WRITEFLASH 0xE1 -#define JTAG430_READMEM 0xE2 -#define JTAG430_ERASEFLASH 0xE3 -#define JTAG430_ERASECHECK 0xE4 -#define JTAG430_VERIFYMEM 0xE5 -#define JTAG430_BLOWFUSE 0xE6 -#define JTAG430_ISFUSEBLOWN 0xE7 -#define JTAG430_COREIP_ID 0xF0 -#define JTAG430_DEVICE_ID 0xF1 +#include "jtag430.h" + +#endif