From: Uwe Hermann Date: Sun, 22 Mar 2015 15:04:18 +0000 (+0100) Subject: Fix a bunch of typos. X-Git-Tag: libsigrok-0.4.0~566 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f3f19d1131025b68d29a11273b627c83d748e7ea;p=libsigrok.git Fix a bunch of typos. --- diff --git a/NEWS b/NEWS index b9aa2771..accf2c0c 100644 --- a/NEWS +++ b/NEWS @@ -74,7 +74,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT - All drivers that talk to serial ports now require libserialport. - If libserialport is not found, those drivers will not be built. - librevisa >= 0.0.20130812 (optional, only used by some drivers). - * Dropped build dependecies: + * Dropped build dependencies: - libasound2 is no longer required (only the removed alsa driver used it). - libudev is no longer required (only the removed link-mso19 driver used it). * Serial port handling code: @@ -119,7 +119,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT - Temporarily disable the driver on Windows (needs portability fixes). - Fix an endianness issue in the protocol handling (bug #135). - Fix a sampling issue when (samples % 4) != 0 (bug #200). - - Fix an issue occuring when all channels were disabled (bugs #316, #347). + - Fix an issue occurring when all channels were disabled (bugs #316, #347). - Add an option to turn test patterns off again (bug #293). * rigol-ds: - Rename the 'rigol-ds1xx2' driver to 'rigol-ds'. @@ -154,7 +154,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT - Report max. possible number of samples (bugs #197, #258, #263). * Output modules: - Skip analog channels in logic-only output formats. - - Remove the obolete output module API, add wrapper calls for the new one. + - Remove the obsolete output module API, add wrapper calls for the new one. - Stop using the obsolete output API (bugs #288, #47, #48). - Properly receive and handle samplerate metadata (bug #46). * input/vcd: Abort with an error upon > 64 channels (bug #194). @@ -197,7 +197,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT - Change various function/macro names related to the probe->channel rename. - Change various functions due to the new channel group feature. - All enums in the public API now have names (e.g. 'enum sr_mqflag'). - - The lib no longer defineѕ names with _t suffix (POSIX reserved). + - The lib no longer defines names with _t suffix (POSIX reserved). - New API calls: - sr_session_dev_list() - sr_session_save_init() diff --git a/README.devices b/README.devices index 11b54bf5..935f7972 100644 --- a/README.devices +++ b/README.devices @@ -146,8 +146,8 @@ The following drivers/devices do not require a serial port specification: - zeroplus-logic-cube -Specifiying serial port parameters ----------------------------------- +Specifying serial port parameters +--------------------------------- Every serial device's driver has default serial port parameters like baud rate, number of data bits, stop bits and handshake status. If a device requires diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 16412a7f..7b4ca15b 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -291,7 +291,7 @@ enum sr_unit { SR_UNIT_METER_SECOND, /** Pressure in hectopascal */ SR_UNIT_HECTOPASCAL, - /** Relative humidity assuming air temperature of 293 kelvin (%rF). */ + /** Relative humidity assuming air temperature of 293 Kelvin (%rF). */ SR_UNIT_HUMIDITY_293K, /** Plane angle in 1/360th of a full circle. */ SR_UNIT_DEGREE, diff --git a/src/dmm/fs9721.c b/src/dmm/fs9721.c index f3101f8b..aa7746ef 100644 --- a/src/dmm/fs9721.c +++ b/src/dmm/fs9721.c @@ -335,7 +335,7 @@ SR_PRIV gboolean sr_fs9721_packet_valid(const uint8_t *buf) * * @param buf Buffer containing the 14-byte protocol packet. Must not be NULL. * @param floatval Pointer to a float variable. That variable will contain the - * result value upon parsing success. Mut not be NULL. + * result value upon parsing success. Must not be NULL. * @param analog Pointer to a struct sr_datafeed_analog. The struct will be * filled with data according to the protocol packet. * Must not be NULL. diff --git a/src/ezusb.c b/src/ezusb.c index 044b4642..034c6c9e 100644 --- a/src/ezusb.c +++ b/src/ezusb.c @@ -102,7 +102,7 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration, } /* - * The libusbx darwin backend is broken: it can report a kernel driver being + * The libusb Darwin backend is broken: it can report a kernel driver being * active, but detaching it always returns an error. */ #if !defined(__APPLE__) diff --git a/src/hardware/agilent-dmm/sched.c b/src/hardware/agilent-dmm/sched.c index 162b0b59..56218051 100644 --- a/src/hardware/agilent-dmm/sched.c +++ b/src/hardware/agilent-dmm/sched.c @@ -333,8 +333,8 @@ static int recv_conf_u123x(const struct sr_dev_inst *sdi, GMatchInfo *match) } else if (!strcmp(mstr, "MV")) { if (devc->mode_tempaux) { devc->cur_mq = SR_MQ_TEMPERATURE; - /* No way to detect whether Fahrenheit or Celcius - * is used, so we'll just default to Celcius. */ + /* No way to detect whether Fahrenheit or Celsius + * is used, so we'll just default to Celsius. */ devc->cur_unit = SR_UNIT_CELSIUS; devc->cur_mqflags = 0; devc->cur_divider = 0; diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index 1ca841e9..23e388fc 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -605,12 +605,12 @@ static int upload_firmware(int firmware_idx, struct dev_context *devc) /* Prepare firmware. */ ret = sigma_fw_2_bitbang(firmware, &buf, &buf_size); if (ret != SR_OK) { - sr_err("An error occured while reading the firmware: %s", + sr_err("An error occurred while reading the firmware: %s", firmware); return ret; } - /* Upload firmare. */ + /* Upload firmware. */ sr_info("Uploading firmware file '%s'.", firmware); sigma_write(buf, buf_size, devc); @@ -1080,7 +1080,7 @@ static int decode_chunk_ts(struct sigma_dram_line *dram_line, trigger_event); } - /* Find in which cluster the trigger occured. */ + /* Find in which cluster the trigger occurred. */ trigger_cluster = trigger_event / EVENTS_PER_CLUSTER; } @@ -1365,7 +1365,7 @@ static int build_basic_trigger(struct triggerlut *lut, struct dev_context *devc) memset(lut, 0, sizeof(struct triggerlut)); - /* Contant for simple triggers. */ + /* Constant for simple triggers. */ lut->m4 = 0xa000; /* Value/mask trigger support. */ diff --git a/src/hardware/asix-sigma/asix-sigma.h b/src/hardware/asix-sigma/asix-sigma.h index 4c9deff6..44935743 100644 --- a/src/hardware/asix-sigma/asix-sigma.h +++ b/src/hardware/asix-sigma/asix-sigma.h @@ -128,7 +128,7 @@ struct triggerlut { uint16_t m0d[4], m1d[4], m2d[4]; uint16_t m3, m3s, m4; - /* Paramters should be sent as a single register write. */ + /* Parameters should be sent as a single register write. */ struct { uint8_t selc : 2; uint8_t selpresc : 6; diff --git a/src/hardware/cem-dt-885x/protocol.c b/src/hardware/cem-dt-885x/protocol.c index 8f6724d5..e3fea4c3 100644 --- a/src/hardware/cem-dt-885x/protocol.c +++ b/src/hardware/cem-dt-885x/protocol.c @@ -166,7 +166,7 @@ static void process_mset(const struct sr_dev_inst *sdi) case TOKEN_MEAS_RANGE_OK: case TOKEN_MEAS_RANGE_OVER: case TOKEN_MEAS_RANGE_UNDER: - /* Not useful, or not expressable in sigrok. */ + /* Not useful, or not expressible in sigrok. */ break; } diff --git a/src/hardware/chronovu-la/protocol.c b/src/hardware/chronovu-la/protocol.c index c2f31a20..7dc4f6bc 100644 --- a/src/hardware/chronovu-la/protocol.c +++ b/src/hardware/chronovu-la/protocol.c @@ -371,7 +371,7 @@ SR_PRIV int cv_read_block(struct dev_context *devc) } while ((devc->done > now) && (bytes_read == 0)); } - /* Check if block read was successful or a timeout occured. */ + /* Check if block read was successful or a timeout occurred. */ if (bytes_read != BS) { sr_err("Trigger timed out. Bytes read: %d.", bytes_read); (void) reset_device(devc); /* Ignore errors. */ diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index 36ead589..63afcd10 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -218,7 +218,7 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate) /* Make sure the number of samples we put out is an integer * multiple of our period size */ /* FIXME we actually need only one period. A ringbuffer would be - * usefull here.*/ + * useful here. */ while (num_samples % ANALOG_SAMPLES_PER_PERIOD != 0) num_samples--; diff --git a/src/hardware/gmc-mh-1x-2x/protocol.c b/src/hardware/gmc-mh-1x-2x/protocol.c index 6f96d504..0c3b56f8 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.c +++ b/src/hardware/gmc-mh-1x-2x/protocol.c @@ -257,7 +257,7 @@ static void decode_ctmv_18(uint8_t ctmv, struct dev_context *devc) /** * Decode range/sign/acdc byte special chars, Metrahit 18. * - * @param[in] rs Rance/sign byte. + * @param[in] rs Range/sign byte. */ static void decode_rs_18(uint8_t rs, struct dev_context *devc) { diff --git a/src/hardware/gmc-mh-1x-2x/protocol.h b/src/hardware/gmc-mh-1x-2x/protocol.h index 3d0eab42..5d20e921 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.h +++ b/src/hardware/gmc-mh-1x-2x/protocol.h @@ -95,7 +95,7 @@ struct dev_context { /* Operational state */ gboolean settings_ok; /**< Settings msg received yet. */ int msg_type; /**< Message type (MSGID_INF, ...). */ - int msg_len; /**< Message lengh (valid when msg, curr. type known).*/ + int msg_len; /**< Message length (valid when msg, curr. type known).*/ int mq; /**< Measured quantity */ int unit; /**< Measured unit */ uint64_t mqflags; /**< Measured quantity flags */ diff --git a/src/hardware/lascar-el-usb/api.c b/src/hardware/lascar-el-usb/api.c index 67efcf1a..3fe2f57b 100644 --- a/src/hardware/lascar-el-usb/api.c +++ b/src/hardware/lascar-el-usb/api.c @@ -300,11 +300,11 @@ static int lascar_proc_config(const struct sr_dev_inst *sdi) devc->temp_unit = devc->config[0x2e] | (devc->config[0x2f] << 8); if (devc->temp_unit != 0 && devc->temp_unit != 1) { sr_dbg("invalid temperature unit %d", devc->temp_unit); - /* Default to Celcius, we're all adults here. */ + /* Default to Celsius, we're all adults here. */ devc->temp_unit = 0; } else sr_dbg("temperature unit is %s", devc->temp_unit - ? "Fahrenheit" : "Celcius"); + ? "Fahrenheit" : "Celsius"); break; case LOG_CO: devc->sample_size = 2; diff --git a/src/hardware/lascar-el-usb/protocol.c b/src/hardware/lascar-el-usb/protocol.c index 484ab0fc..9e20edc6 100644 --- a/src/hardware/lascar-el-usb/protocol.c +++ b/src/hardware/lascar-el-usb/protocol.c @@ -66,7 +66,7 @@ static libusb_device_handle *lascar_open(struct libusb_device *dev) } /* Some of these fail, but it needs doing -- some sort of mode - * setup for the SILabs F32x. */ + * setup for the SiLabs F32x. */ libusb_control_transfer(dev_hdl, LIBUSB_REQUEST_TYPE_VENDOR, 0x00, 0xffff, 0x00, NULL, 0, 50); libusb_control_transfer(dev_hdl, LIBUSB_REQUEST_TYPE_VENDOR, @@ -410,9 +410,9 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf, if (!(rh = g_try_malloc(sizeof(float) * samples))) break; for (i = 0, j = 0; i < samples; i++) { - /* Both Celcius and Fahrenheit stored at base -40. */ + /* Both Celsius and Fahrenheit stored at base -40. */ if (devc->temp_unit == 0) - /* Celcius is stored in half-degree increments. */ + /* Celsius is stored in half-degree increments. */ temp[j] = buf[i * 2] / 2 - 40; else temp[j] = buf[i * 2] - 40; diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index d3fb8193..8c184ca4 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -39,7 +39,7 @@ static const uint32_t scanopts[] = { static const uint32_t devopts[] = { /* Device class */ SR_CONF_POWER_SUPPLY, - /* Aquisition modes. */ + /* Acquisition modes. */ SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET, diff --git a/src/hardware/manson-hcs-3xxx/protocol.h b/src/hardware/manson-hcs-3xxx/protocol.h index e9035377..92e10ce2 100644 --- a/src/hardware/manson-hcs-3xxx/protocol.h +++ b/src/hardware/manson-hcs-3xxx/protocol.h @@ -66,7 +66,7 @@ struct hcs_model { /** Private, per-device-instance driver context. */ struct dev_context { - const struct hcs_model *model; /**< Model informaion. */ + const struct hcs_model *model; /**< Model information. */ uint64_t limit_samples; uint64_t limit_msec; diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 203446f5..ff4b9e21 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -59,7 +59,7 @@ static const uint32_t scanopts[] = { static const uint32_t devopts[] = { /* Device class */ SR_CONF_POWER_SUPPLY, - /* Aquisition modes. */ + /* Acquisition modes. */ SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET, @@ -444,7 +444,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o g_strstrip(buf); verstr = buf + 4; } - else /* Bug in device FW 1.17: Quering version string fails while output is active. + else /* Bug in device FW 1.17: Querying version string fails while output is active. Therefore just print an error message, but do not exit with error. */ sr_err("Failed to query for hardware version: %d %s", errno, strerror(errno)); diff --git a/src/hardware/motech-lps-30x/protocol.h b/src/hardware/motech-lps-30x/protocol.h index ad7fc070..94eeb67e 100644 --- a/src/hardware/motech-lps-30x/protocol.h +++ b/src/hardware/motech-lps-30x/protocol.h @@ -98,7 +98,7 @@ struct dev_context { const struct lps_modelspec* model; /* Acquisition status */ - gboolean acq_running; /**< Aquisition is running. */ + gboolean acq_running; /**< Acquisition is running. */ uint64_t limit_samples; /**< Target number of samples */ uint64_t limit_msec; /**< Target sampling time */ acquisition_req acq_req; /**< Current request. */ diff --git a/src/hardware/norma-dmm/protocol.c b/src/hardware/norma-dmm/protocol.c index e8270593..28f733c6 100644 --- a/src/hardware/norma-dmm/protocol.c +++ b/src/hardware/norma-dmm/protocol.c @@ -317,7 +317,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi) sr_warn("Low battery, measurement quality degraded!"); } /* 0x08: SCALED */ - /* 0x04: RATE (=lower resolution, allows higher rata rate up to 10/s. */ + /* 0x04: RATE (=lower resolution, allows higher data rate up to 10/s. */ /* 0x02: Current clamp */ if (flags & 0x01) { /* dB */ /* diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index 9037d19f..1aa345c1 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.c +++ b/src/hardware/openbench-logic-sniffer/protocol.c @@ -226,7 +226,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial) /* what is this for? */ break; case 0x03: - /* Maximum sample rate (hz) */ + /* Maximum sample rate (Hz) */ devc->max_samplerate = tmp_int; break; case 0x04: diff --git a/src/hardware/pipistrello-ols/protocol.c b/src/hardware/pipistrello-ols/protocol.c index 5b0bcfb9..c9e4e5d8 100644 --- a/src/hardware/pipistrello-ols/protocol.c +++ b/src/hardware/pipistrello-ols/protocol.c @@ -299,7 +299,7 @@ SR_PRIV struct sr_dev_inst *p_ols_get_metadata(uint8_t *buf, int bytes_read, str /* what is this for? */ break; case 0x03: - /* Maximum sample rate (hz) */ + /* Maximum sample rate (Hz) */ devc->max_samplerate = tmp_int; break; case 0x04: diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index 91cb3231..c8434049 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -350,7 +350,7 @@ static void issue_stop_capture(const struct sr_dev_inst *sdi) } } -/* Decode an incoming capture status reponse and act on it as appropriate. +/* Decode an incoming capture status response and act on it as appropriate. * Note that this function changes the device state. */ static void process_capture_status(const struct sr_dev_inst *sdi) diff --git a/src/hardware/sysclk-lwla/protocol.h b/src/hardware/sysclk-lwla/protocol.h index a48d4556..eb6cef3d 100644 --- a/src/hardware/sysclk-lwla/protocol.h +++ b/src/hardware/sysclk-lwla/protocol.h @@ -207,10 +207,10 @@ struct dev_context { /** The samplerate selected by the user. */ uint64_t samplerate; - /** The maximimum sampling duration, in milliseconds. */ + /** The maximum sampling duration, in milliseconds. */ uint64_t limit_msec; - /** The maximimum number of samples to acquire. */ + /** The maximum number of samples to acquire. */ uint64_t limit_samples; /** Channels to use. */ diff --git a/src/hardware/teleinfo/protocol.c b/src/hardware/teleinfo/protocol.c index d2b96e1f..96ca0200 100644 --- a/src/hardware/teleinfo/protocol.c +++ b/src/hardware/teleinfo/protocol.c @@ -81,9 +81,8 @@ static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *channel_nam g_slist_free(analog.channels); } -static void teleinfo_handle_mesurement(struct sr_dev_inst *sdi, - const char *label, const char *data, - char *optarif) +static void teleinfo_handle_measurement(struct sr_dev_inst *sdi, + const char *label, const char *data, char *optarif) { struct dev_context *devc; int v = atoi(data); @@ -135,7 +134,7 @@ static gboolean teleinfo_parse_group(struct sr_dev_inst *sdi, return FALSE; if (!teleinfo_control_check(label, data, control)) return FALSE; - teleinfo_handle_mesurement(sdi, label, data, optarif); + teleinfo_handle_measurement(sdi, label, data, optarif); return TRUE; } diff --git a/src/hardware/teleinfo/protocol.h b/src/hardware/teleinfo/protocol.h index f95c50eb..303305e7 100644 --- a/src/hardware/teleinfo/protocol.h +++ b/src/hardware/teleinfo/protocol.h @@ -45,7 +45,7 @@ struct dev_context { void *session_cb_data; /**< Opaque pointer passed in by the frontend. */ /* Operational state */ - enum optarif optarif; /**< The device mode (which mesures are reported) */ + enum optarif optarif; /**< The device mode (which measures are reported) */ uint64_t num_samples; /**< The number of already received samples. */ int64_t start_time; /**< The time at which sampling started. */ diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index 4d963afb..b1ebf8a1 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -121,7 +121,7 @@ static int dev_open(struct sr_dev_inst *sdi) return SR_ERR; /* - * The libusbx 1.0.9 darwin backend is broken: it can report a kernel + * The libusb 1.0.9 Darwin backend is broken: it can report a kernel * driver being active, but detaching it always returns an error. */ #if !defined(__APPLE__) diff --git a/src/hardware/yokogawa-dlm/protocol.c b/src/hardware/yokogawa-dlm/protocol.c index 975bfcb8..c3cd244c 100644 --- a/src/hardware/yokogawa-dlm/protocol.c +++ b/src/hardware/yokogawa-dlm/protocol.c @@ -1001,7 +1001,7 @@ SR_PRIV int dlm_data_receive(int fd, int revents, void *cb_data) devc->current_channel = devc->current_channel->next; if (dlm_channel_data_request(sdi) != SR_OK) { - sr_err("Failed to request aquisition data."); + sr_err("Failed to request acquisition data."); goto fail; } diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 71fc79a9..f3f6a026 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -402,7 +402,7 @@ struct sr_output_module { int (*init) (struct sr_output *o, GHashTable *options); /** - * This function is passed a copy of every packed in the data feed. + * This function is passed a copy of every packet in the data feed. * Any output generated by the output module in response to the * packet should be returned in a newly allocated GString * out, which will be freed by the caller. diff --git a/src/serial.c b/src/serial.c index e42b96a0..6d33b3bf 100644 --- a/src/serial.c +++ b/src/serial.c @@ -744,7 +744,7 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial, * Extract the serial device and options from the options linked list. * * @param options List of options passed from the command line. - * @param serial_device Pointer where to store the exctracted serial device. + * @param serial_device Pointer where to store the extracted serial device. * @param serial_options Pointer where to store the optional extracted serial * options. * diff --git a/src/session.c b/src/session.c index ce72a9b0..765a20c4 100644 --- a/src/session.c +++ b/src/session.c @@ -371,7 +371,7 @@ SR_API int sr_session_trigger_set(struct sr_session *session, struct sr_trigger * of file descriptor or timeout status. * * @retval SR_OK Success. - * @retval SR_ERR Error occured. + * @retval SR_ERR Error occurred. */ static int sr_session_iteration(struct sr_session *session, gboolean block) {