Skip to content

Commit

Permalink
gpio: put back deprecation comments
Browse files Browse the repository at this point in the history
The comments identifying replacement API were inadvertently removed
along with the flag that triggers deprecation warnings.

Signed-off-by: Peter Bigot <[email protected]>
  • Loading branch information
pabigot authored and galak committed Oct 2, 2019
1 parent 89aeae8 commit 8f68efb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/drivers/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,8 @@ static inline int gpio_pin_toggle(struct device *port, unsigned int pin)
* @param pin Pin number where the data is written.
* @param value Value set on the pin.
* @return 0 if successful, negative errno code on failure.
*
* @deprecated Replace with gpio_pin_set_raw() or gpio_pin_set().
*/
static inline int gpio_pin_write(struct device *port, u32_t pin,
u32_t value)
Expand All @@ -1071,6 +1073,8 @@ static inline int gpio_pin_write(struct device *port, u32_t pin,
* @param pin Pin number where data is read.
* @param value Integer pointer to receive the data values from the pin.
* @return 0 if successful, negative errno code on failure.
*
* @deprecated Replace with gpio_pin_get_raw() or gpio_pin_get().
*/
static inline int gpio_pin_read(struct device *port, u32_t pin,
u32_t *value)
Expand Down Expand Up @@ -1158,6 +1162,9 @@ static inline int gpio_remove_callback(struct device *port,
* Note: Depending on the driver implementation, this function will enable
* the pin to trigger an interruption. So as a semantic detail, if no
* callback is registered, of course none will be called.
*
* @deprecated Replace with ``gpio_pin_interrupt_configure()`` with
* ``GPIO_INT_ENABLE`` along with other interrupt configuration flags.
*/
static inline int gpio_pin_enable_callback(struct device *port, u32_t pin)
{
Expand All @@ -1169,6 +1176,9 @@ static inline int gpio_pin_enable_callback(struct device *port, u32_t pin)
* @param port Pointer to the device structure for the driver instance.
* @param pin Pin number where the callback function is disabled.
* @return 0 if successful, negative errno code on failure.
*
* @deprecated Replace with ``gpio_pin_interrupt_configure()`` with
* ``GPIO_INT_DISABLE``.
*/
static inline int gpio_pin_disable_callback(struct device *port, u32_t pin)
{
Expand Down

0 comments on commit 8f68efb

Please sign in to comment.