]> sigrok.org Git - libsigrok.git/blobdiff - hwdriver.c
sr: move SR_HWOPT into its own enum, and create struct sr_hwopt
[libsigrok.git] / hwdriver.c
index 7a9e7e668f7a1c0086818cd56e1ff262f7df6ec0..42932b36f641f9a7f82a2cbddff187c2b1e16a43 100644 (file)
  */
 /* TODO: This shouldn't be a global. */
 SR_API struct sr_hwcap_option sr_hwcap_options[] = {
+       /* Driver scanning options. */
+       {SR_HWOPT_MODEL, SR_T_KEYVALUE, "Model", "model"},
+       {SR_HWOPT_CONN, SR_T_CHAR, "Connection", "conn"},
+       {SR_HWOPT_SERIALCOMM, SR_T_CHAR, "Serial communication", "serialcomm"},
+       /* Device instance options. */
        {SR_HWCAP_SAMPLERATE, SR_T_UINT64, "Sample rate", "samplerate"},
        {SR_HWCAP_CAPTURE_RATIO, SR_T_UINT64, "Pre-trigger capture ratio", "captureratio"},
        {SR_HWCAP_PATTERN_MODE, SR_T_CHAR, "Pattern generator mode", "pattern"},
@@ -45,9 +50,6 @@ SR_API struct sr_hwcap_option sr_hwcap_options[] = {
        {SR_HWCAP_FILTER, SR_T_CHAR, "Filter targets", "filter"},
        {SR_HWCAP_VDIV, SR_T_RATIONAL_VOLT, "Volts/div", "vdiv"},
        {SR_HWCAP_COUPLING, SR_T_CHAR, "Coupling", "coupling"},
-       {SR_HWCAP_MODEL, SR_T_KEYVALUE, "Model", "model"},
-       {SR_HWCAP_CONN, SR_T_CHAR, "Connection", "connect"},
-       {SR_HWCAP_SERIALCOMM, SR_T_CHAR, "Serial communication", "serialcomm"},
        {0, 0, NULL, NULL},
 };