]> sigrok.org Git - libsigrok.git/blobdiff - hwdriver.c
sr: hantek-dso: Consistency renames, constification.
[libsigrok.git] / hwdriver.c
index 1103901612c89e914a97c80df0ec3402f39a4066..f56c3d3c060f2e3828612cc11049e57a0c23b704 100644 (file)
@@ -43,6 +43,8 @@ SR_API struct sr_hwcap_option sr_hwcap_options[] = {
        {SR_HWCAP_BUFFERSIZE, SR_T_UINT64, "Buffer size", "buffersize"},
        {SR_HWCAP_TIMEBASE, SR_T_RATIONAL_PERIOD, "Time base", "timebase"},
        {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"},
        {0, 0, NULL, NULL},
 };
 
@@ -71,7 +73,7 @@ extern SR_PRIV struct sr_dev_driver alsa_driver_info;
 extern SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
 #endif
 #ifdef HAVE_HW_HANTEK_DSO
-extern SR_PRIV struct sr_dev_driver hantek_dso_plugin_info;
+extern SR_PRIV struct sr_dev_driver hantek_dso_driver_info;
 #endif
 
 static struct sr_dev_driver *drivers_list[] = {
@@ -100,7 +102,7 @@ static struct sr_dev_driver *drivers_list[] = {
        &fx2lafw_driver_info,
 #endif
 #ifdef HAVE_HW_HANTEK_DSO
-       &hantek_dso_plugin_info,
+       &hantek_dso_driver_info,
 #endif
        NULL,
 };
@@ -274,7 +276,8 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial)
  */
 SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap)
 {
-       int *hwcaps, i;
+       const int *hwcaps;
+       int i;
 
        if (!driver) {
                sr_err("hwdriver: %s: driver was NULL", __func__);
@@ -302,7 +305,7 @@ SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap)
  * @return A pointer to a struct with information about the parameter, or NULL
  *         if the capability was not found.
  */
-SR_API struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap)
+SR_API const struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap)
 {
        int i;