Added more CLI commands.

- reset   -> Simulates power cycle (Not yet compatible with AVR)
- reload  -> Sets the device into firmware reload mode
- led     -> Toggles the error LED
- version -> Displays detailed version information (additions to CMake files was necessary, might have broken Windows builds...)
This commit is contained in:
Jacob Alexander 2014-01-23 02:01:12 -08:00
parent 267b99dedb
commit 6ac1482862
9 changed files with 156 additions and 22 deletions

View file

@ -73,7 +73,7 @@ volatile uint8_t USBKeys_LEDs = 0;
// ----- Functions -----
// USB Module Setup
inline void output_setup(void)
inline void output_setup()
{
// Initialize the USB, and then wait for the host to set configuration.
// If the Teensy is powered without a PC connected to the USB port,
@ -105,3 +105,13 @@ inline void usb_send(void)
scan_finishedWithUSBBuffer( USBKeys_Sent <= USBKeys_MaxSize ? USBKeys_Sent : USBKeys_MaxSize );
}
// Sets the device into firmware reload mode
inline void output_firmwareReload()
{
#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_)
#elif defined(_mk20dx128_)
usb_device_reload();
#endif
}