<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Sudarshan,<br>
    <br>
    <div class="moz-cite-prefix">Às 18:37 de 12-10-2015,
      sudarshan.rajagopalan escreveu:<br>
    </div>
    <blockquote cite="mid:89f5d483cd2e8dccd4cd4ce17fa1cb87@vecna.com"
      type="cite">
      <br>
      Just found few function names to be inconsistent towards the
      naming convention, and also few API documentation in the RTEMS
      GPIO files. Please commit this if required.
      <br>
    </blockquote>
    <br>
    Thanks for the patch! I noticed that some functions were missing the
    _gpio_ before but forgot about it completely.<br>
    I will also update my GSOC documentation wiki page and test cases
    when someone commits this. <br>
    <br>
    On another note (speaking to the community) maybe my GPIO
    documentation could be moved (and improved in the way) to the user
    manual?<br>
    <br>
    <blockquote cite="mid:89f5d483cd2e8dccd4cd4ce17fa1cb87@vecna.com"
      type="cite">
      <br>
      Thanks and Regards,
      <br>
      Sudarshan Rajagopalan
      <br>
      <br>
      From e17ce266ba4cfaec0159c5477697847629946ced Mon Sep 17 00:00:00
      2001
      <br>
      From: Sudarshan Rajagopalan
      <a class="moz-txt-link-rfc2396E" href="mailto:sudarshan.rajagopalan@vecna.com"><sudarshan.rajagopalan@vecna.com></a>
      <br>
      Date: Mon, 12 Oct 2015 12:47:35 -0400
      <br>
      Subject: [PATCH] Fixes GPIO APIs Naming Convention and Comments
      <br>
      <br>
      ---
      <br>
       c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c      |  8 ++++----
      <br>
       c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c |  4 ++--
      <br>
       c/src/lib/libbsp/shared/gpio.c                   |  6 +++---
      <br>
       c/src/lib/libbsp/shared/include/gpio.h           | 20
      ++++++++++++--------
      <br>
       4 files changed, 21 insertions(+), 17 deletions(-)
      <br>
      <br>
      diff --git a/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
      b/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
      <br>
      index 8cf690f..9737dec 100644
      <br>
      --- a/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
      <br>
      +++ b/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
      <br>
      @@ -299,7 +299,7 @@ uint32_t
      rtems_gpio_bsp_interrupt_line(rtems_vector_number vector)
      <br>
         return event_status;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_enable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_enable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      @@ -354,7 +354,7 @@ rtems_status_code rtems_bsp_enable_interrupt(
      <br>
         return RTEMS_SUCCESSFUL;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_disable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_disable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      @@ -528,7 +528,7 @@ uint32_t
      rtems_gpio_bsp_interrupt_line(rtems_vector_number vector)
      <br>
         return -1;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_enable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_enable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      @@ -536,7 +536,7 @@ rtems_status_code rtems_bsp_enable_interrupt(
      <br>
         return RTEMS_NOT_DEFINED;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_disable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_disable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      diff --git a/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
      b/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
      <br>
      index a782d11..4fb2c93 100644
      <br>
      --- a/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
      <br>
      +++ b/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
      <br>
      @@ -183,7 +183,7 @@ uint32_t
      rtems_gpio_bsp_interrupt_line(rtems_vector_number vector)
      <br>
         return event_status;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_enable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_enable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      @@ -227,7 +227,7 @@ rtems_status_code rtems_bsp_enable_interrupt(
      <br>
         return RTEMS_SUCCESSFUL;
      <br>
       }
      <br>
      <br>
      -rtems_status_code rtems_bsp_disable_interrupt(
      <br>
      +rtems_status_code rtems_gpio_bsp_disable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      diff --git a/c/src/lib/libbsp/shared/gpio.c
      b/c/src/lib/libbsp/shared/gpio.c
      <br>
      index 80e2727..b806556 100644
      <br>
      --- a/c/src/lib/libbsp/shared/gpio.c
      <br>
      +++ b/c/src/lib/libbsp/shared/gpio.c
      <br>
      @@ -1341,7 +1341,7 @@ rtems_status_code rtems_gpio_request_pin(
      <br>
               return RTEMS_UNSATISFIED;
      <br>
             }
      <br>
      <br>
      -      sc = rtems_bsp_select_specific_io(
      <br>
      +      sc = rtems_gpio_bsp_select_specific_io(
      <br>
                    bank,
      <br>
                    pin,
      <br>
                    bsp_data->io_function,
      <br>
      @@ -1805,7 +1805,7 @@ rtems_status_code
      rtems_gpio_enable_interrupt(
      <br>
           }
      <br>
         }
      <br>
      <br>
      -  sc = rtems_bsp_enable_interrupt(bank, pin, interrupt);
      <br>
      +  sc = rtems_gpio_bsp_enable_interrupt(bank, pin, interrupt);
      <br>
      <br>
         if ( sc != RTEMS_SUCCESSFUL ) {
      <br>
           RELEASE_LOCK(gpio_bank_state[bank].lock);
      <br>
      @@ -1919,7 +1919,7 @@ rtems_status_code
      rtems_gpio_disable_interrupt(uint32_t pin_number)
      <br>
           return RTEMS_NOT_CONFIGURED;
      <br>
         }
      <br>
      <br>
      -  sc = rtems_bsp_disable_interrupt(bank, pin,
      interrupt_state->active_interrupt);
      <br>
      +  sc = rtems_gpio_bsp_disable_interrupt(bank, pin,
      interrupt_state->active_interrupt);
      <br>
      <br>
         if ( sc != RTEMS_SUCCESSFUL ) {
      <br>
           RELEASE_LOCK(gpio_bank_state[bank].lock);
      <br>
      diff --git a/c/src/lib/libbsp/shared/include/gpio.h
      b/c/src/lib/libbsp/shared/include/gpio.h
      <br>
      index 54de5f1..7d8f67b 100644
      <br>
      --- a/c/src/lib/libbsp/shared/include/gpio.h
      <br>
      +++ b/c/src/lib/libbsp/shared/include/gpio.h
      <br>
      @@ -736,12 +736,16 @@ extern uint32_t
      rtems_gpio_bsp_multi_read(uint32_t bank, uint32_t bitmask);
      <br>
        *        does not support the feature, by returning
      RTEMS_NOT_DEFINED.
      <br>
        *
      <br>
        * @param[in] bank GPIO bank number.
      <br>
      - * @param[in] bitmask Bitmask of GPIO pins to clear in the given
      bank.
      <br>
      + * @param[in] pins Array filled with BSP specific pin numbers.
      All pins belong
      <br>
      + *                 to the same select bank.
      <br>
      + * @param[in] pin_count Number of pin configurations in the @var
      pins array.
      <br>
      + * @param[in] arg Pointer to a BSP defined structure with
      BSP-specific
      <br>
      + *                data. This field is handled by the BSP.
      <br>
        *
      <br>
      - * @retval RTEMS_SUCCESSFUL All pins were cleared successfully.
      <br>
      - * @retval RTEMS_NOT_DEFINED The BSP does not support BSP
      specific operations
      <br>
      - *                           for groups.
      <br>
      - * @retval RTEMS_UNSATISFIED Could not clear at least one of the
      pins.
      <br>
      + * @retval RTEMS_SUCCESSFUL Operation completed with success.
      <br>
      + * @retval RTEMS_NOT_DEFINED Group has no BSP specific pins, or
      the BSP does not
      <br>
      + *                           support BSP specific operations for
      groups.
      <br>
      + * @retval RTEMS_UNSATISFIED Could not operate on at least one of
      the pins.
      <br>
        */
      <br>
       extern rtems_status_code rtems_gpio_bsp_specific_group_operation(
      <br>
         uint32_t bank,
      <br>
      @@ -859,7 +863,7 @@ extern rtems_status_code
      rtems_gpio_bsp_select_output(
      <br>
        * @retval RTEMS_SUCCESSFUL Function was assigned successfully.
      <br>
        * @retval RTEMS_UNSATISFIED Could not assign the function to the
      pin.
      <br>
        */
      <br>
      -extern rtems_status_code rtems_bsp_select_specific_io(
      <br>
      +extern rtems_status_code rtems_gpio_bsp_select_specific_io(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         uint32_t function,
      <br>
      @@ -918,7 +922,7 @@ extern rtems_vector_number
      rtems_gpio_bsp_get_vector(uint32_t bank);
      <br>
        * @retval RTEMS_SUCCESSFUL Interrupt successfully enabled for
      this pin.
      <br>
        * @retval RTEMS_UNSATISFIED Could not enable the interrupt on
      the pin.
      <br>
        */
      <br>
      -extern rtems_status_code rtems_bsp_enable_interrupt(
      <br>
      +extern rtems_status_code rtems_gpio_bsp_enable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      @@ -935,7 +939,7 @@ extern rtems_status_code
      rtems_bsp_enable_interrupt(
      <br>
        * @retval RTEMS_SUCCESSFUL Interrupt successfully disabled for
      this pin.
      <br>
        * @retval RTEMS_UNSATISFIED Could not disable interrupts on this
      pin.
      <br>
        */
      <br>
      -extern rtems_status_code rtems_bsp_disable_interrupt(
      <br>
      +extern rtems_status_code rtems_gpio_bsp_disable_interrupt(
      <br>
         uint32_t bank,
      <br>
         uint32_t pin,
      <br>
         rtems_gpio_interrupt interrupt
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:devel@rtems.org">devel@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://lists.rtems.org/mailman/listinfo/devel">http://lists.rtems.org/mailman/listinfo/devel</a></pre>
    </blockquote>
    <br>
    --André Marques.<br>
    <br>
  </body>
</html>