X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=hardware%2Flink-mso19%2Flink-mso19.c;h=98e1507b939a0981f8e7aa559a4169f01177e34d;hb=a7d05fcb388f142012035a0ed31bcf74d42bbe73;hp=df08b1151a789c6a383097d863a021373bb75971;hpb=bb7ef79377ae617e1275373e0b631beb7f909d73;p=libsigrok.git diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index df08b115..98e1507b 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -37,7 +37,7 @@ #define NUM_PROBES 8 -static int capabilities[] = { +static int hwcaps[] = { SR_HWCAP_LOGIC_ANALYZER, // SR_HWCAP_OSCILLOSCOPE, // SR_HWCAP_PAT_GENERATOR, @@ -613,7 +613,7 @@ static void *hw_get_dev_info(int dev_index, int dev_info_id) mso = sdi->priv; switch (dev_info_id) { - case SR_DI_INSTANCE: + case SR_DI_INST: info = sdi; break; case SR_DI_NUM_PROBES: /* FIXME: How to report analog probe? */ @@ -645,19 +645,19 @@ static int hw_get_status(int dev_index) return sdi->status; } -static int *hw_get_capabilities(void) +static int *hw_hwcap_get_all(void) { - return capabilities; + return hwcaps; } -static int hw_set_configuration(int dev_index, int capability, void *value) +static int hw_config_set(int dev_index, int hwcap, void *value) { struct sr_dev_inst *sdi; if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) return SR_ERR; - switch (capability) { + switch (hwcap) { case SR_HWCAP_SAMPLERATE: return mso_configure_rate(sdi, *(uint64_t *) value); case SR_HWCAP_PROBECONFIG: @@ -839,8 +839,8 @@ SR_PRIV struct sr_dev_plugin link_mso19_plugin_info = { .closedev = hw_closedev, .get_dev_info = hw_get_dev_info, .get_status = hw_get_status, - .get_capabilities = hw_get_capabilities, - .set_configuration = hw_set_configuration, + .hwcap_get_all = hw_hwcap_get_all, + .config_set = hw_config_set, .start_acquisition = hw_start_acquisition, .stop_acquisition = hw_stop_acquisition, };