diff --git a/UsbDkController/UsbDkController.cpp b/UsbDkController/UsbDkController.cpp index fa452db..884743d 100644 --- a/UsbDkController/UsbDkController.cpp +++ b/UsbDkController/UsbDkController.cpp @@ -15,6 +15,7 @@ void ShowUsage() tcout << endl; tcout << TEXT("UsbDkController -i - install UsbDk driver") << endl; tcout << TEXT("UsbDkController -u - uninstall UsbDk driver") << endl; + tcout << TEXT("UsbDkController -p - TEMP: ping driver (verify control device is functional)") << endl; tcout << endl; } //------------------------------------------------------------------------------- @@ -55,6 +56,21 @@ int __cdecl _tmain(int argc, _TCHAR* argv[]) tcout << TEXT("UsbDk driver uninstall failed") << endl; } } + else if (_tcsicmp(L"-p", argv[1]) == 0) + { + //TODO: Ping logic is temporary, to be removed after enumeration + //logic implemented + TCHAR Reply[10]; + tcout << TEXT("Pinging UsbDk driver") << endl; + if (PingDriver(Reply, TBUF_SIZEOF(Reply))) + { + tcout << TEXT("UsbDk driver replied \"") << Reply << TEXT("\"") << endl; + } + else + { + tcout << TEXT("UsbDk ping failed") << endl; + } + } else { ShowUsage();