| 1 | //----------------------------------------------------------------------------- |
| 2 | // Copyright (C) 2010 iZsh <izsh at fail0verflow.com> |
| 3 | // |
| 4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, |
| 5 | // at your option, any later version. See the LICENSE.txt file for the text of |
| 6 | // the license. |
| 7 | //----------------------------------------------------------------------------- |
| 8 | // Main command parser entry point |
| 9 | //----------------------------------------------------------------------------- |
| 10 | |
| 11 | #ifndef CMDMAIN_H__ |
| 12 | #define CMDMAIN_H__ |
| 13 | |
| 14 | #include <stdint.h> |
| 15 | #include <stddef.h> |
| 16 | #include "usb_cmd.h" |
| 17 | #include "cmdparser.h" |
| 18 | |
| 19 | extern void UsbCommandReceived(UsbCommand *UC); |
| 20 | extern int CommandReceived(char *Cmd); |
| 21 | extern bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand* response, size_t ms_timeout, bool show_warning); |
| 22 | extern bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout); |
| 23 | extern bool WaitForResponse(uint32_t cmd, UsbCommand* response); |
| 24 | extern void clearCommandBuffer(); |
| 25 | extern command_t* getTopLevelCommandTable(); |
| 26 | |
| 27 | #endif |