Add templates for USB commands likely to be used by hashfast driver.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/usbutils.c b/usbutils.c
index 194220b..c188bc5 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -563,6 +563,17 @@ static const char *C_FTDI_STATUS_S = "FTDIStatus";
static const char *C_ENABLE_UART_S = "EnableUART";
static const char *C_BB_SET_VOLTAGE_S = "SetCoreVoltage";
static const char *C_BB_GET_VOLTAGE_S = "GetCoreVoltage";
+static const char *C_HF_RESET_S = "HFReset";
+static const char *C_HF_PLL_CONFIG_S = "HFPLLConfig";
+static const char *C_HF_ADDRESS_S = "HFAddress";
+static const char *C_HF_BAUD_S = "HFBaud";
+static const char *C_HF_HASH_S = "HFHash";
+static const char *C_HF_NONCE_S = "HFNonce";
+static const char *C_HF_ABORT_S = "HFAbort";
+static const char *C_HF_STATUS_S = "HFStatus";
+static const char *C_HF_CONFIG_S = "HFConfig";
+static const char *C_HF_STATISTICS_S = "HFStatistics";
+static const char *C_HF_CLOCKGATE_S = "HFClockGate";
#ifdef EOL
#undef EOL
@@ -1053,6 +1064,17 @@ static void cgusb_check_init()
usb_commands[C_ENABLE_UART] = C_ENABLE_UART_S;
usb_commands[C_BB_SET_VOLTAGE] = C_BB_SET_VOLTAGE_S;
usb_commands[C_BB_GET_VOLTAGE] = C_BB_GET_VOLTAGE_S;
+ usb_commands[C_HF_RESET] = C_HF_RESET_S;
+ usb_commands[C_HF_PLL_CONFIG] = C_HF_PLL_CONFIG_S;
+ usb_commands[C_HF_ADDRESS] = C_HF_ADDRESS_S;
+ usb_commands[C_HF_BAUD] = C_HF_BAUD_S;
+ usb_commands[C_HF_HASH] = C_HF_HASH_S;
+ usb_commands[C_HF_NONCE] = C_HF_NONCE_S;
+ usb_commands[C_HF_ABORT] = C_HF_ABORT_S;
+ usb_commands[C_HF_STATUS] = C_HF_STATUS_S;
+ usb_commands[C_HF_CONFIG] = C_HF_CONFIG_S;
+ usb_commands[C_HF_STATISTICS] = C_HF_STATISTICS_S;
+ usb_commands[C_HF_CLOCKGATE] = C_HF_CLOCKGATE_S;
stats_initialised = true;
}
diff --git a/usbutils.h b/usbutils.h
index 9124d07..b9cd0fc 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -317,6 +317,17 @@ enum usb_cmds {
C_ENABLE_UART,
C_BB_SET_VOLTAGE,
C_BB_GET_VOLTAGE,
+ C_HF_RESET,
+ C_HF_PLL_CONFIG,
+ C_HF_ADDRESS,
+ C_HF_BAUD,
+ C_HF_HASH,
+ C_HF_NONCE,
+ C_HF_ABORT,
+ C_HF_STATUS,
+ C_HF_CONFIG,
+ C_HF_STATISTICS,
+ C_HF_CLOCKGATE,
C_MAX
};