From: Daniel Elstner Date: Wed, 29 Jan 2014 19:53:51 +0000 (+0100) Subject: hwdriver: Add SR_CONF_CLOCK_EDGE option. X-Git-Tag: libsigrok-0.3.0~175 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=860bc59b0ff598f37f23a1882bf5822ef7c86382 hwdriver: Add SR_CONF_CLOCK_EDGE option. Allow the edge of an external clock input to be configured by means of an SR_CONF_CLOCK_EDGE configuration setting. This is a string option with the same format as SR_CONF_TRIGGER_SLOPE. --- diff --git a/hwdriver.c b/hwdriver.c index 302ffdc5..3dd44db0 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -118,6 +118,8 @@ static struct sr_config_info sr_config_info_data[] = { "Over-current protection", NULL}, {SR_CONF_LIMIT_SAMPLES, SR_T_UINT64, "limit_samples", "Sample limit", NULL}, + {SR_CONF_CLOCK_EDGE, SR_T_CHAR, "clock_edge", + "Clock edge", NULL}, {0, 0, NULL, NULL, NULL}, }; diff --git a/libsigrok.h b/libsigrok.h index ab095c9a..af5b18ce 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -834,6 +834,9 @@ enum { /** Over-current protection (OCP) */ SR_CONF_OVER_CURRENT_PROTECTION, + /** Choice of clock edge for external clock ("r" or "f"). */ + SR_CONF_CLOCK_EDGE, + /*--- Special stuff -------------------------------------------------*/ /** Scan options supported by the driver. */