Mercurial > louis > kiibohd-controller
diff Output/pjrcUSB/output_com.c @ 109:2c1a9e6ae70e
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...)
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Thu, 23 Jan 2014 02:01:12 -0800 |
parents | 3764d78996a8 |
children | b61ca96b7c24 |
line wrap: on
line diff
--- a/Output/pjrcUSB/output_com.c Wed Jan 22 01:58:34 2014 -0800 +++ b/Output/pjrcUSB/output_com.c Thu Jan 23 02:01:12 2014 -0800 @@ -73,7 +73,7 @@ // ----- 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 @@ 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 +} +