core: remove doxygen hack
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 1 Mar 2017 21:16:56 +0000 (22:16 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 1 Mar 2017 21:16:56 +0000 (22:16 +0100)
Keep gpiod.h clean - pull _gpiod_line_event_request_type() into
core.c and un-inline the gpiod_line_event_request_*() routines.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Doxyfile
include/gpiod.h
src/lib/core.c

index dbf877d21e10fc49cc0753d73a2cce0230005137..c9e27381b1dff875727dd930a449d8c7cfdbc7d0 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -58,7 +58,6 @@ COLS_IN_ALPHA_INDEX    = 5
 IGNORE_PREFIX          =
 SEARCHENGINE           = NO
 ENABLE_PREPROCESSING   = YES
-PREDEFINED             = DOXYGEN_SHOULD_SKIP_THIS
 
 # HTML output
 GENERATE_HTML          = YES
index 4adf4c231f0b6812234fa74d501cd3fecf5a7ac5..2750f49738a8cbb9a91142aa0d895aea479c0630 100644 (file)
@@ -665,12 +665,6 @@ struct gpiod_line_event {
 int gpiod_line_event_request(struct gpiod_line *line,
                             struct gpiod_line_evreq_config *config) GPIOD_API;
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-int _gpiod_line_event_request_type(struct gpiod_line *line,
-                                  const char *consumer, bool active_low,
-                                  int type) GPIOD_API;
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-
 /**
  * @brief Request rising edge event notifications on a single line.
  * @param line GPIO line object.
@@ -678,13 +672,9 @@ int _gpiod_line_event_request_type(struct gpiod_line *line,
  * @param active_low Active state of the line - true if low.
  * @return 0 if the operation succeeds, -1 on failure.
  */
-static inline int gpiod_line_event_request_rising(struct gpiod_line *line,
-                                                 const char *consumer,
-                                                 bool active_low)
-{
-       return _gpiod_line_event_request_type(line, consumer, active_low,
-                                             GPIOD_EVENT_RISING_EDGE);
-}
+int gpiod_line_event_request_rising(struct gpiod_line *line,
+                                   const char *consumer,
+                                   bool active_low) GPIOD_API;
 
 /**
  * @brief Request falling edge event notifications on a single line.
@@ -693,13 +683,9 @@ static inline int gpiod_line_event_request_rising(struct gpiod_line *line,
  * @param active_low Active state of the line - true if low.
  * @return 0 if the operation succeeds, -1 on failure.
  */
-static inline int gpiod_line_event_request_falling(struct gpiod_line *line,
-                                                  const char *consumer,
-                                                  bool active_low)
-{
-       return _gpiod_line_event_request_type(line, consumer, active_low,
-                                             GPIOD_EVENT_FALLING_EDGE);
-}
+int gpiod_line_event_request_falling(struct gpiod_line *line,
+                                    const char *consumer,
+                                    bool active_low) GPIOD_API;
 
 /**
  * @brief Request all event type notifications on a single line.
@@ -708,13 +694,9 @@ static inline int gpiod_line_event_request_falling(struct gpiod_line *line,
  * @param active_low Active state of the line - true if low.
  * @return 0 if the operation succeeds, -1 on failure.
  */
-static inline int gpiod_line_event_request_all(struct gpiod_line *line,
-                                              const char *consumer,
-                                              bool active_low)
-{
-       return _gpiod_line_event_request_type(line, consumer, active_low,
-                                             GPIOD_EVENT_BOTH_EDGES);
-}
+int gpiod_line_event_request_all(struct gpiod_line *line,
+                                const char *consumer,
+                                bool active_low) GPIOD_API;
 
 /**
  * @brief Stop listening for events and release the line.
index d7f1547debe712bb4a6ff6e13e279e231159735c..4d5be57aa676903589c1a23b97b4ce686520843c 100644 (file)
@@ -838,9 +838,9 @@ int gpiod_line_event_request(struct gpiod_line *line,
        return 0;
 }
 
-int _gpiod_line_event_request_type(struct gpiod_line *line,
-                                  const char *consumer, bool active_low,
-                                  int type)
+static int line_event_request_type(struct gpiod_line *line,
+                                  const char *consumer,
+                                  bool active_low, int type)
 {
        struct gpiod_line_evreq_config config = {
                .consumer = consumer,
@@ -852,6 +852,27 @@ int _gpiod_line_event_request_type(struct gpiod_line *line,
        return gpiod_line_event_request(line, &config);
 }
 
+int gpiod_line_event_request_rising(struct gpiod_line *line,
+                                   const char *consumer, bool active_low)
+{
+       return line_event_request_type(line, consumer, active_low,
+                                      GPIOD_EVENT_RISING_EDGE);
+}
+
+int gpiod_line_event_request_falling(struct gpiod_line *line,
+                                    const char *consumer, bool active_low)
+{
+       return line_event_request_type(line, consumer, active_low,
+                                      GPIOD_EVENT_FALLING_EDGE);
+}
+
+int gpiod_line_event_request_all(struct gpiod_line *line,
+                                const char *consumer, bool active_low)
+{
+       return line_event_request_type(line, consumer, active_low,
+                                      GPIOD_EVENT_BOTH_EDGES);
+}
+
 void gpiod_line_event_release(struct gpiod_line *line)
 {
        close(line_get_event_fd(line));