]> sigrok.org Git - libsigrok.git/commitdiff
remove unused static functions
authorAurelien Jacobs <redacted>
Tue, 14 Jan 2014 22:29:17 +0000 (23:29 +0100)
committerAurelien Jacobs <redacted>
Tue, 14 Jan 2014 22:39:23 +0000 (23:39 +0100)
hardware/common/scpi_serial.c
hardware/kecheng-kc-330b/protocol.c

index 052d6c1efe618f059e162cc750635e55e94bbfe1..9711c010a80fb9f5c92cfe60af7710d5e8760684 100644 (file)
@@ -105,60 +105,6 @@ static int scpi_serial_send(void *priv, const char *command)
        return SR_OK;
 }
 
-static int scpi_serial_receive(void *priv, char **scpi_response)
-{
-       int len, ret;
-       char buf[256];
-       unsigned int i;
-       GString *response;
-       struct scpi_serial *sscpi = priv;
-       struct sr_serial_dev_inst *serial = sscpi->serial;
-
-       response = g_string_sized_new(1024);
-
-       for (i = 0; i <= SCPI_READ_RETRIES; i++) {
-               while ((len = serial_read(serial, buf, sizeof(buf))) > 0)
-                       response = g_string_append_len(response, buf, len);
-
-               if (response->len > 0 &&
-                   response->str[response->len-1] == '\n') {
-                       sr_spew("Fetched full SCPI response.");
-                       break;
-               }
-
-               g_usleep(SCPI_READ_RETRY_TIMEOUT);
-       }
-
-       if (response->len == 0) {
-               sr_dbg("No SCPI response received.");
-               g_string_free(response, TRUE);
-               *scpi_response = NULL;
-               return SR_ERR;
-       } else if (response->str[response->len - 1] == '\n') {
-               /*
-                * The SCPI response contains a LF ('\n') at the end and we
-                * don't need this so replace it with a '\0' and decrement
-                * the length.
-                */
-               response->str[--response->len] = '\0';
-               ret = SR_OK;
-       } else {
-               sr_warn("Incomplete SCPI response received!");
-               ret = SR_ERR;
-       }
-
-       /* Minor optimization: steal the string instead of copying. */
-       *scpi_response = response->str;
-
-       /* A SCPI response can be quite large, print at most 50 characters. */
-       sr_dbg("SCPI response received (length %d): '%.50s'",
-              response->len, response->str);
-
-       g_string_free(response, FALSE);
-
-       return ret;
-}
-
 static int scpi_serial_read_begin(void *priv)
 {
        struct scpi_serial *sscpi = priv;
index 1e12f0fd2a45c6c265fad4816dcbc9c6a1b4cc94..ba55f36f3d3d4627c4f595908ba4d02ad09ca91e 100644 (file)
@@ -336,15 +336,3 @@ SR_PRIV int kecheng_kc_330b_log_info_get(const struct sr_dev_inst *sdi,
 
        return SR_OK;
 }
-
-static int kecheng_kc_330b_log_date_time_get(const struct sr_dev_inst *sdi,
-               gboolean *tmp)
-{
-
-       (void)sdi;
-       (void)tmp;
-
-       /* TODO */
-
-       return SR_OK;
-}