aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2017-10-24 14:46:24 +0200
committerBartosz Golaszewski <bartekgola@gmail.com>2017-10-24 14:46:24 +0200
commit878b4f676bf381ba6a66baed638aa7ffa4beafae (patch)
tree2ca5692509512c7427b18b655b28f07e375cd22c /include
parentbce3718defb0732a4940f300d88eb4997426309b (diff)
downloadexternal_libgpiod-878b4f676bf381ba6a66baed638aa7ffa4beafae.tar.gz
external_libgpiod-878b4f676bf381ba6a66baed638aa7ffa4beafae.tar.bz2
external_libgpiod-878b4f676bf381ba6a66baed638aa7ffa4beafae.zip
doc: improvements for the chip operations
Tweak the docs for the low-level chip API a bit. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpiod.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/gpiod.h b/include/gpiod.h
index 24a39e3..eb42bbd 100644
--- a/include/gpiod.h
+++ b/include/gpiod.h
@@ -339,6 +339,8 @@ struct gpiod_chip * gpiod_chip_open_by_number(unsigned int num) GPIOD_API;
* @param label Label of the gpiochip to open.
* @return GPIO chip handle or NULL if the chip with given label was not found
* or an error occured.
+ * @note If the chip cannot be found but no other error occurred, errno is set
+ * to ENOENT.
*/
struct gpiod_chip * gpiod_chip_open_by_label(const char *label) GPIOD_API;
@@ -347,9 +349,9 @@ struct gpiod_chip * gpiod_chip_open_by_label(const char *label) GPIOD_API;
* @param descr String describing the gpiochip.
* @return GPIO chip handle or NULL if an error occurred.
*
- * This routine tries to figure out whether the user passed it the path to
- * the GPIO chip, its name, label or number as a string. Then it tries to
- * open it using one of the other gpiod_chip_open** routines.
+ * This routine tries to figure out whether the user passed it the path to the
+ * GPIO chip, its name, label or number as a string. Then it tries to open it
+ * using one of the gpiod_chip_open** variants.
*/
struct gpiod_chip * gpiod_chip_open_lookup(const char *descr) GPIOD_API;
@@ -395,9 +397,8 @@ gpiod_chip_get_line(struct gpiod_chip *chip, unsigned int offset) GPIOD_API;
* @param name The name of the GPIO line.
* @return Pointer to the GPIO line handle or NULL if the line could not be
* found or an error occurred.
- *
- * In case a line with given name is not associated with given chip, the
- * functions sets errno to ENOENT.
+ * @note In case a line with given name is not associated with given chip, the
+ * function sets errno to ENOENT.
*/
struct gpiod_line *
gpiod_chip_find_line(struct gpiod_chip *chip, const char *name) GPIOD_API;