Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
Diff: inc/gpio.h
- Revision:
- 9:9e247b9c9abf
- Parent:
- 8:70fc373a5f46
--- a/inc/gpio.h Wed Feb 26 06:09:13 2020 +0000
+++ b/inc/gpio.h Mon Jun 15 13:03:55 2020 +0000
@@ -1,5 +1,6 @@
/***************************************************************************//**
* @file gpio.h
+ * @brief Header file of GPIO Interface
* @author DBogdan (dragos.bogdan@analog.com)
********************************************************************************
* Copyright 2019(c) Analog Devices, Inc.
@@ -59,13 +60,25 @@
/*************************** Types Declarations *******************************/
/******************************************************************************/
+/**
+ * @struct gpio_init_param
+ * @brief Structure holding the parameters for GPIO initialization.
+ */
typedef struct gpio_init_param {
+ /** GPIO number */
uint8_t number;
+ /** GPIO extra parameters (device specific) */
void *extra;
} gpio_init_param;
+/**
+ * @struct gpio_desc
+ * @brief Structure holding the GPIO descriptor.
+ */
typedef struct gpio_desc {
+ /** GPIO number */
uint8_t number;
+ /** GPIO extra parameters (device specific) */
void *extra;
} gpio_desc;
@@ -75,7 +88,11 @@
/* Obtain the GPIO decriptor. */
int32_t gpio_get(struct gpio_desc **desc,
- const gpio_init_param *param);
+ const struct gpio_init_param *param);
+
+/* Obtain optional GPIO descriptor. */
+int32_t gpio_get_optional(struct gpio_desc **desc,
+ const struct gpio_init_param *param);
/* Free the resources allocated by gpio_get() */
int32_t gpio_remove(struct gpio_desc *desc);