-//! Handles classic MSP430 JTAG commands. Forwards others to JTAG.
-void jtag430x2handle(unsigned char app,
- unsigned char verb,
- unsigned char len){
- jtag430_resettap();
+//! Check the fuse.
+unsigned int jtag430x2_fusecheck(){
+ int i;
+ for(i=0;i<3;i++){
+ jtag_ir_shift8(IR_CNTRL_SIG_CAPTURE);
+ if(jtag_dr_shift16(0xAAAA)==0x5555)
+ return 1;//blown
+ }
+ return 0;//unblown
+}
+
+
+//! Handles MSP430X2 JTAG commands. Forwards others to JTAG.
+void jtag430x2_handle_fn( uint8_t const app,
+ uint8_t const verb,
+ uint32_t const len)
+{
+ register char blocks;
+
+ unsigned int i,val;
+ unsigned long at, l;
+
+ //jtag430_resettap();
+
+ if(verb!=START && jtag430mode==MSP430MODE){
+ (*(jtag430_app.handle))(app,verb,len);
+ return;
+ }
+