From: Uwe Hermann Date: Tue, 6 May 2014 18:18:54 +0000 (+0200) Subject: Rename SR_T_CHAR to SR_T_STRING. X-Git-Tag: libsigrok-0.3.0~4 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=ace218f9223c39a3eb6738e36f4b89fae5142673 Rename SR_T_CHAR to SR_T_STRING. This is more correct and less confusing. --- diff --git a/hwdriver.c b/hwdriver.c index aca6d1e1..f028ea10 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -46,17 +46,17 @@ */ static struct sr_config_info sr_config_info_data[] = { - {SR_CONF_CONN, SR_T_CHAR, "conn", + {SR_CONF_CONN, SR_T_STRING, "conn", "Connection", NULL}, - {SR_CONF_SERIALCOMM, SR_T_CHAR, "serialcomm", + {SR_CONF_SERIALCOMM, SR_T_STRING, "serialcomm", "Serial communication", NULL}, {SR_CONF_SAMPLERATE, SR_T_UINT64, "samplerate", "Sample rate", NULL}, {SR_CONF_CAPTURE_RATIO, SR_T_UINT64, "captureratio", "Pre-trigger capture ratio", NULL}, - {SR_CONF_PATTERN_MODE, SR_T_CHAR, "pattern", + {SR_CONF_PATTERN_MODE, SR_T_STRING, "pattern", "Pattern", NULL}, - {SR_CONF_TRIGGER_TYPE, SR_T_CHAR, "triggertype", + {SR_CONF_TRIGGER_TYPE, SR_T_STRING, "triggertype", "Trigger types", NULL}, {SR_CONF_EXTERNAL_CLOCK, SR_T_BOOL, "external_clock", "External clock mode", NULL}, @@ -64,9 +64,9 @@ static struct sr_config_info sr_config_info_data[] = { "Swap channel order", NULL}, {SR_CONF_RLE, SR_T_BOOL, "rle", "Run Length Encoding", NULL}, - {SR_CONF_TRIGGER_SLOPE, SR_T_CHAR, "triggerslope", + {SR_CONF_TRIGGER_SLOPE, SR_T_STRING, "triggerslope", "Trigger slope", NULL}, - {SR_CONF_TRIGGER_SOURCE, SR_T_CHAR, "triggersource", + {SR_CONF_TRIGGER_SOURCE, SR_T_STRING, "triggersource", "Trigger source", NULL}, {SR_CONF_HORIZ_TRIGGERPOS, SR_T_FLOAT, "horiz_triggerpos", "Horizontal trigger position", NULL}, @@ -74,17 +74,17 @@ static struct sr_config_info sr_config_info_data[] = { "Buffer size", NULL}, {SR_CONF_TIMEBASE, SR_T_RATIONAL_PERIOD, "timebase", "Time base", NULL}, - {SR_CONF_FILTER, SR_T_CHAR, "filter", + {SR_CONF_FILTER, SR_T_STRING, "filter", "Filter targets", NULL}, {SR_CONF_VDIV, SR_T_RATIONAL_VOLT, "vdiv", "Volts/div", NULL}, - {SR_CONF_COUPLING, SR_T_CHAR, "coupling", + {SR_CONF_COUPLING, SR_T_STRING, "coupling", "Coupling", NULL}, {SR_CONF_DATALOG, SR_T_BOOL, "datalog", "Datalog", NULL}, - {SR_CONF_SPL_WEIGHT_FREQ, SR_T_CHAR, "spl_weight_freq", + {SR_CONF_SPL_WEIGHT_FREQ, SR_T_STRING, "spl_weight_freq", "Sound pressure level frequency weighting", NULL}, - {SR_CONF_SPL_WEIGHT_TIME, SR_T_CHAR, "spl_weight_time", + {SR_CONF_SPL_WEIGHT_TIME, SR_T_STRING, "spl_weight_time", "Sound pressure level time weighting", NULL}, {SR_CONF_HOLD_MAX, SR_T_BOOL, "hold_max", "Hold max", NULL}, @@ -96,7 +96,7 @@ static struct sr_config_info sr_config_info_data[] = { "Voltage threshold", NULL }, {SR_CONF_POWER_OFF, SR_T_BOOL, "power_off", "Power off", NULL}, - {SR_CONF_DATA_SOURCE, SR_T_CHAR, "data_source", + {SR_CONF_DATA_SOURCE, SR_T_STRING, "data_source", "Data source", NULL}, {SR_CONF_NUM_LOGIC_CHANNELS, SR_T_INT32, "logic_channels", "Number of logic channels", NULL}, @@ -112,7 +112,7 @@ static struct sr_config_info sr_config_info_data[] = { "Maximum output current", NULL}, {SR_CONF_OUTPUT_ENABLED, SR_T_BOOL, "output_enabled", "Output enabled", NULL}, - {SR_CONF_OUTPUT_CHANNEL, SR_T_CHAR, "output_channel", + {SR_CONF_OUTPUT_CHANNEL, SR_T_STRING, "output_channel", "Output channel modes", NULL}, {SR_CONF_OVER_VOLTAGE_PROTECTION, SR_T_BOOL, "ovp", "Over-voltage protection", NULL}, @@ -120,7 +120,7 @@ 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", + {SR_CONF_CLOCK_EDGE, SR_T_STRING, "clock_edge", "Clock edge", NULL}, {0, 0, NULL, NULL, NULL}, }; diff --git a/libsigrok.h b/libsigrok.h index 65d1490f..0b6888d9 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -137,7 +137,7 @@ typedef int (*sr_receive_data_callback)(int fd, int revents, void *cb_data); /** Data types used by sr_config_info(). */ enum sr_datatype { SR_T_UINT64 = 10000, - SR_T_CHAR, + SR_T_STRING, SR_T_BOOL, SR_T_FLOAT, SR_T_RATIONAL_PERIOD, @@ -569,7 +569,7 @@ struct sr_config { struct sr_config_info { /** Config key like SR_CONF_CONN, etc. */ int key; - /** Data type like SR_T_CHAR, etc. */ + /** Data type like SR_T_STRING, etc. */ int datatype; /** Id string, e.g. "serialcomm". */ char *id;