pwm: added existing exposition logic
* Understands when pwm pin is already exported. * Will not unexport if didnt export. Can be forced. Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
fa7180cb91
commit
5fa6f50edc
18
api/pwm.h
18
api/pwm.h
@@ -150,8 +150,24 @@ maa_result_t maa_pwm_enable(maa_pwm_context pwm, int enable);
|
||||
*/
|
||||
maa_result_t maa_pwm_unexport(maa_pwm_context pwm);
|
||||
|
||||
/** Unexport the PWM context (maa_pwm_close() will call this function)
|
||||
* Forces operation regardless of ownership.
|
||||
*
|
||||
* @param dev The PWM context/
|
||||
*
|
||||
* @return maa result type.
|
||||
*/
|
||||
maa_result_t maa_pwm_unexport_force(maa_pwm_context pwm);
|
||||
|
||||
/** Change ownership of context
|
||||
*
|
||||
* @param pwm the context
|
||||
* @param owner ownership , 1 to own
|
||||
*/
|
||||
maa_result_t maa_pwm_owner(maa_pwm_context pwm, maa_boolean_t owner);
|
||||
|
||||
/** Close and unexport the PWM pin.
|
||||
*
|
||||
*
|
||||
* @param pwm The PWM context to use.
|
||||
*
|
||||
* @return maa_result_t the maa result.
|
||||
|
||||
Reference in New Issue
Block a user