//! Handles a monitor command.
void monitor_handle_fn(uint8_t const app,
- uint8_t const verb,
- uint32_t const len)
+ uint8_t const verb,
+ uint32_t const len)
{
int i;
break;
case MONITOR_ECHO:
- //Echo back the same buffer.
- txdata(app,verb,len);
- break;
+ //Echo back the same buffer.
+ txdata(app,verb,len);
+ break;
case MONITOR_LIST_APPS:
// transmit firmware build date
cmddata[0]=memorybyte[cmddataword[0]];
#else
debugstr("Monitor peeks are unsupported on this platform.");
+ debughex(cmddataword[0]);
+ cmddata[0]=0x00;
#endif
txdata(app,verb,1);
break;
cmddata[0] = memorybyte[cmddataword[0]];
#else
debugstr("Monitor pokes are unsupported on this platform.");
+ debughex(cmddataword[0]);
+ cmddata[0]=0x00;
#endif
txdata(app,verb,1);
break;
debugstr("Command deprecated.");
txdata(app,verb,1);
break;
-
+
case MONITOR_SILENT:
- silent=cmddata[0];
- txdata(app,verb,1);
- break;
+ silent=cmddata[0];
+ txdata(app,verb,1);
+ break;
case MONITOR_CONNECTED:
#ifdef MSP430
#endif
txdata(app,verb,0);
break;
+
+ case MONITOR_LEDTEST:
+ //debugstr("Enter LEDTEST.");
+ i = 0;
+ #ifdef PLEDOUT
+ i++;
+ led_init();
+ led_on();
+ msdelay(5000);
+ led_off();
+ #endif
+ #ifdef PLED2OUT
+ i++;
+ led2_on();
+ msdelay(5000);
+ led2_off();
+ #endif
+ #ifdef PLED3OUT
+ i++;
+ led3_on();
+ msdelay(5000);
+ led3_off();
+ #endif
+ cmddata[0] = i; //Return number of LEDs that we flashed.
+ txdata(app,verb,1);
+ break;
+
}
}