include/nuttx/timers/pwm: Add user provided argument in struct pwm_info_s

Here is a case how to use arg:
If application need do the ADC conversion as the same frequency and phase
of PWM, he can pass a semaphore as arg and then PWM driver will post the
semaphore in he start point of every period.

Signed-off-by: zhangchengqi <zhangchengqi@xiaomi.com>
This commit is contained in:
zhangchengqi 2022-12-19 15:52:27 +08:00 committed by Petro Karashchenko
parent be90b8a385
commit 76bdfcc9d9

View File

@ -148,6 +148,9 @@ struct pwm_info_s
* generate an indefinite number of pulses */
# endif
#endif /* CONFIG_PWM_MULTICHAN */
FAR void *arg; /* User provided argument to be used in the
* lower half */
};
/* This structure is a set a callback functions used to call from the upper-