From: Bert Vermeulen Date: Sun, 22 Jul 2012 18:06:13 +0000 (+0200) Subject: sr: comments/docs X-Git-Tag: dsupstream~767 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a5f2e70712827c48a095204ef48c7cf1a0193ed0;p=libsigrok.git sr: comments/docs --- diff --git a/device.c b/device.c index cfa5492f..528a2af1 100644 --- a/device.c +++ b/device.c @@ -101,11 +101,10 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum, * be silently replaced. * * @param sdi Must not be NULL. - * @param probenum The number of the probe. - * Note that the probe numbers start at 1 (not 0!). - * @param trigger trigger string, in the format used by sigrok-cli + * @param probenum The probe number, starting from 0. + * @param trigger Trigger string, in the format used by sigrok-cli * - * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments. + * @return SR_OK on success, or SR_ERR_ARG on invalid arguments. */ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum, const char *trigger) @@ -142,7 +141,7 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum, * @param hwcap The capability that should be checked (whether it's supported * by the specified device). * - * @return TRUE, if the device has the specified capability, FALSE otherwise. + * @return TRUE if the device has the specified capability, FALSE otherwise. * FALSE is also returned upon invalid input parameters or other * error conditions. */ diff --git a/hwdriver.c b/hwdriver.c index 7effb6aa..ff9cc5f8 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -148,6 +148,13 @@ SR_API int sr_driver_init(struct sr_dev_driver *driver) /** * Tell a hardware driver to scan for devices. * + * In addition to the detection, the devices that are found are also + * initialized automatically. On some devices, this involves a firmware upload, + * or other such measures. + * + * The order in which the system is scanned for devices is not specified. The + * caller should not assume or rely on any specific order. + * * @param driver The driver. * @param options A list of struct sr_hwopt options to pass to the driver's * scanner.