X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbeaglelogic%2Fapi.c;h=910bb843b5919addb45d8bed5704a1f60b8d90d9;hb=0af636bed97c174bea46e61e961eaa1b0b162e0f;hp=3f83a9168b4b68d2520eba870b1a47fa95814687;hpb=138589b02e3dd6aaad64e94a48efdf47d9b7d7d1;p=libsigrok.git diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index 3f83a916..910bb843 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -31,13 +31,11 @@ static const uint32_t scanopts[] = { /* Hardware capabilities */ static const uint32_t devopts[] = { SR_CONF_LOGIC_ANALYZER, - SR_CONF_SAMPLERATE, - SR_CONF_TRIGGER_MATCH, - - SR_CONF_LIMIT_SAMPLES, SR_CONF_CONTINUOUS, - - SR_CONF_NUM_LOGIC_CHANNELS, + SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, + SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET, + SR_CONF_TRIGGER_MATCH | SR_CONF_LIST, + SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET, }; /* Trigger matching capabilities */ @@ -99,7 +97,10 @@ static GSList *scan(GSList *options) if (!g_file_test(BEAGLELOGIC_DEV_NODE, G_FILE_TEST_EXISTS)) return NULL; - sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, "BeagleLogic", "1.0"); + sdi = sr_dev_inst_new(); + sdi->status = SR_ST_INACTIVE; + sdi->model = g_strdup("BeagleLogic"); + sdi->version = g_strdup("1.0"); sdi->driver = di; /* Unless explicitly specified, keep max channels to 8 only */ @@ -323,7 +324,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * *data = g_variant_builder_end(&gvb); break; case SR_CONF_TRIGGER_MATCH: - *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, soft_trigger_matches, ARRAY_SIZE(soft_trigger_matches), sizeof(int32_t)); break;