gpiod.h: shuffle some declarations
authorBartosz Golaszewski <bartekgola@gmail.com>
Fri, 6 Jan 2017 09:51:17 +0000 (10:51 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Fri, 6 Jan 2017 09:51:17 +0000 (10:51 +0100)
Move the opaque structs declarations to the top of the file - they are
ignored by doxygen anyway and that way we can move
gpiod_line_get_chip() to the line defgroup.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
gpiod.h

diff --git a/gpiod.h b/gpiod.h
index 74ba586581b246cf31d7d66b3d20042da594a91d..5b6d922e051a456c86ad2a78478cd61392eeaaad 100644 (file)
--- a/gpiod.h
+++ b/gpiod.h
 extern "C" {
 #endif
 
+struct gpiod_chip;
+struct gpiod_line;
+struct gpiod_chip_iter;
+
 /**
  * @defgroup __common__ Common helper macros
  * @{
@@ -160,11 +164,6 @@ enum {
  */
 #define GPIOD_REQUEST_MAX_LINES                64
 
-/**
- * @brief Opaque structure representing a single GPIO line.
- */
-struct gpiod_line;
-
 /**
  * @brief Helper structure for storing a set of GPIO line objects.
  *
@@ -406,6 +405,13 @@ int gpiod_line_set_value_bulk(struct gpiod_line_bulk *line_bulk,
  */
 struct gpiod_line * gpiod_line_find_by_name(const char *name) GPIOD_API;
 
+/**
+ * @brief Get the handle to the GPIO chip controlling this line.
+ * @param line The GPIO line object.
+ * @return Pointer to the GPIO chip handle controlling this line.
+ */
+struct gpiod_chip * gpiod_line_get_chip(struct gpiod_line *line) GPIOD_API;
+
 /**
  * @defgroup __line_events__ Line event operations
  * @{
@@ -515,11 +521,6 @@ int gpiod_line_event_get_fd(struct gpiod_line *line) GPIOD_API;
  * Functions and data structures dealing with GPIO chips.
  */
 
-/**
- * @brief Opaque structure representing a single GPIO line.
- */
-struct gpiod_chip;
-
 /**
  * @brief Open a gpiochip by path.
  * @param path Path to the gpiochip device file.
@@ -595,13 +596,6 @@ gpiod_chip_get_line(struct gpiod_chip *chip, unsigned int offset) GPIOD_API;
 /* FIXME This shouldn't be needed. Make it private maybe? */
 int gpiod_chip_get_fd(struct gpiod_chip *chip) GPIOD_API;
 
-/**
- * @brief Get the handle to the GPIO chip controlling this line.
- * @param line The GPIO line object.
- * @return Pointer to the GPIO chip handle controlling this line.
- */
-struct gpiod_chip * gpiod_line_get_chip(struct gpiod_line *line) GPIOD_API;
-
 /**
  * @}
  *
@@ -612,11 +606,6 @@ struct gpiod_chip * gpiod_line_get_chip(struct gpiod_line *line) GPIOD_API;
  * chips and lines.
  */
 
-/**
- * @brief Opaque structure representing a chip iterator.
- */
-struct gpiod_chip_iter;
-
 /**
  * @brief Create a new gpiochip iterator.
  * @return Pointer to a new chip iterator object or NULL if an error occurred.