GPIO: Add gpio_free() function to HAL

pull/11032/head
Przemyslaw Stekiel 2019-10-29 10:48:31 +01:00
parent 05d8e1bb89
commit f19681fc6f
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,7 @@ extern "C" {
* * ::gpio_init and other init functions can be called with NC or a valid PinName for the target - Verified by ::gpio_nc_test
* * ::gpio_is_connected can be used to test whether a gpio_t object was initialized with NC - Verified by ::gpio_nc_test
* * ::gpio_init initializes the GPIO pin
* * ::gpio_free returns the pin owned by the GPIO object to its reset state
* * ::gpio_mode sets the mode of the given pin
* * ::gpio_dir sets the direction of the given pin
* * ::gpio_write sets the gpio output value
@ -85,6 +86,12 @@ int gpio_is_connected(const gpio_t *obj);
*/
void gpio_init(gpio_t *obj, PinName pin);
/** Releases the GPIO pin
*
* @param obj The GPIO object to release
*/
void gpio_free(gpio_t *obj);
/** Set the input pin mode
*
* @param obj The GPIO object (must be connected)