swig: add unexport() calls to be used by destructors in object api
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
10
api/gpio.h
10
api/gpio.h
@@ -101,7 +101,7 @@ maa_result_t maa_gpio_mode(maa_gpio_context *dev, gpio_mode_t mode);
|
||||
maa_result_t maa_gpio_dir(maa_gpio_context *dev, gpio_dir_t dir);
|
||||
|
||||
/** Close the GPIO context
|
||||
* - Will free the memory for the context.
|
||||
* - Will free the memory for the context and unexport the GPIO
|
||||
*
|
||||
* @param dev the GPIO context
|
||||
*
|
||||
@@ -109,6 +109,14 @@ maa_result_t maa_gpio_dir(maa_gpio_context *dev, gpio_dir_t dir);
|
||||
*/
|
||||
maa_result_t maa_gpio_close(maa_gpio_context *dev);
|
||||
|
||||
/** Unexport the GPIO context (maa_gpio_close() will call this function)
|
||||
*
|
||||
* @param dev The GPIO context.
|
||||
*
|
||||
* @return maa result type.
|
||||
*/
|
||||
maa_result_t maa_gpio_unexport(maa_gpio_context *dev);
|
||||
|
||||
/** Read the GPIO value.
|
||||
*
|
||||
* @param dev The GPIO context.
|
||||
|
||||
@@ -151,6 +151,14 @@ maa_result_t maa_pwm_pulsewidth_us(maa_pwm_context* pwm, int us);
|
||||
*/
|
||||
maa_result_t maa_pwm_enable(maa_pwm_context* pwm, int enable);
|
||||
|
||||
/** Unexport the PWM context (maa_pwm_close() will call this function)
|
||||
*
|
||||
* @param dev The PWM context/
|
||||
*
|
||||
* @return maa result type.
|
||||
*/
|
||||
maa_result_t maa_pwm_unexport(maa_pwm_context* pwm);
|
||||
|
||||
/** Close and unexport the PWM pin.
|
||||
*
|
||||
* @param pwm The PWM context to use.
|
||||
|
||||
Reference in New Issue
Block a user