]> sigrok.org Git - libsigrok.git/commitdiff
hantek-4032l: Minor cosmetics.
authorUwe Hermann <redacted>
Thu, 15 Feb 2018 21:45:35 +0000 (22:45 +0100)
committerUwe Hermann <redacted>
Thu, 15 Feb 2018 21:45:35 +0000 (22:45 +0100)
src/hardware/hantek-4032l/api.c
src/hardware/hantek-4032l/protocol.c

index 71c899e5fa04251e9af76a23e3139a0b0e5ab23b..626175f07873dd5daa99a23ca881edb72f21c262 100644 (file)
@@ -333,7 +333,7 @@ static int config_set(uint32_t key, GVariant *data,
                                i++;
 
                        if (i == ARRAY_SIZE(samplerates_hw) || sample_rate == 0) {
-                               sr_err("invalid sample rate");
+                               sr_err("Invalid sample rate.");
                                return SR_ERR_SAMPLERATE;
                        }
                        cmd_pkt->sample_rate = i;
@@ -349,8 +349,8 @@ static int config_set(uint32_t key, GVariant *data,
                        number_samples &= 0xfffffe00;
                        if (number_samples < 2048
                            || number_samples > 64 * 1024 * 1024) {
-                               sr_err("invalid sample range 2k...64M: %"
-                                      PRIu64, number_samples);
+                               sr_err("Invalid sample range 2k...64M: %"
+                                      PRIu64 ".", number_samples);
                                return SR_ERR;
                        }
                        cmd_pkt->sample_size = number_samples;
@@ -410,7 +410,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                GSList *stages = trigger->stages;
                struct sr_trigger_stage *stage1 = stages->data;
                if (stages->next) {
-                       sr_err("only one trigger stage supported for now");
+                       sr_err("Only one trigger stage supported for now.");
                        return SR_ERR;
                }
                cmd_pkt->trig_flags.enable_trigger1 = 1;
@@ -440,7 +440,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                                break;
                        case SR_TRIGGER_RISING:
                                if (cmd_pkt->trigger[0].flags.edge_type != H4032L_TRIGGER_EDGE_TYPE_DISABLED) {
-                                       sr_err("only one trigger signal with fall/rising/edge allowed");
+                                       sr_err("Only one trigger signal with fall/rising/edge allowed.");
                                        return SR_ERR;
                                }
                                cmd_pkt->trigger[0].flags.edge_type = H4032L_TRIGGER_EDGE_TYPE_RISE;
@@ -448,7 +448,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                                break;
                        case SR_TRIGGER_FALLING:
                                if (cmd_pkt->trigger[0].flags.edge_type != H4032L_TRIGGER_EDGE_TYPE_DISABLED) {
-                                       sr_err("only one trigger signal with fall/rising/edge allowed");
+                                       sr_err("Only one trigger signal with fall/rising/edge allowed.");
                                        return SR_ERR;
                                }
                                cmd_pkt->trigger[0].flags.edge_type = H4032L_TRIGGER_EDGE_TYPE_FALL;
@@ -456,14 +456,14 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                                break;
                        case SR_TRIGGER_EDGE:
                                if (cmd_pkt->trigger[0].flags.edge_type != H4032L_TRIGGER_EDGE_TYPE_DISABLED) {
-                                       sr_err("only one trigger signal with fall/rising/edge allowed");
+                                       sr_err("Only one trigger signal with fall/rising/edge allowed.");
                                        return SR_ERR;
                                }
                                cmd_pkt->trigger[0].flags.edge_type = H4032L_TRIGGER_EDGE_TYPE_TOGGLE;
                                cmd_pkt->trigger[0].flags.edge_signal = match->channel->index;
                                break;
                        default:
-                               sr_err("unknown trigger value");
+                               sr_err("Unknown trigger value.");
                                return SR_ERR;
                        }
 
index 509a196e4b5f67bd550346aaab5d6d7622f89bd6..ccd2256bf545be9a28daf1ca64745c4042d95909 100644 (file)
@@ -167,7 +167,7 @@ void LIBUSB_CALL h4032l_usb_callback(struct libusb_transfer *transfer)
                                h4032l_usb_callback,
                                (void *)sdi, H4032L_USB_TIMEOUT);
                }
-               /* Send prepared usb packet. */
+               /* Send prepared USB packet. */
                if ((ret = libusb_submit_transfer(transfer)) != 0) {
                        sr_err("Failed to submit transfer: %s.",
                               libusb_error_name(ret));