mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
pwm: fix incorrect documentation for PWMIOC_SETCHARACTERISTICS IOCTL
Documentation for PWMIOC_SETCHARACTERISTICS ioctl command mentioned that this command will neither start nor stop the pulsed output. This however is incorrect as PWMIOC_SETCHARACTERISTICS command leads to pwm_start() function which starts the pulsed output. While this might not be the correct behaviour (I would probably welcome the option to set PWM characteristics without starting the pulsed output) it is the way the PWM driver is coded for many architectures. Future enhancement might be to add function pwm_setchar() for example to just set characteristics without starting the PWM output. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
@@ -437,9 +437,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
/* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next
|
/* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next
|
||||||
* pulsed output. This command will neither start nor stop the
|
* pulsed output and start the pulsed output. It will change the
|
||||||
* pulsed output. It will either setup the configuration that will
|
|
||||||
* be used when the output is started; or it will change the
|
|
||||||
* characteristics of the pulsed output on the fly if the timer is
|
* characteristics of the pulsed output on the fly if the timer is
|
||||||
* already started.
|
* already started.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -79,12 +79,10 @@
|
|||||||
* interface, the majority of the functionality is implemented in driver
|
* interface, the majority of the functionality is implemented in driver
|
||||||
* ioctl calls. The PWM ioctl commands are listed below:
|
* ioctl calls. The PWM ioctl commands are listed below:
|
||||||
*
|
*
|
||||||
* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next pulsed
|
* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next
|
||||||
* output. This command will neither start nor stop the pulsed output.
|
* pulsed output and start the pulsed output. It will change the
|
||||||
* It will either setup the configuration that will be used when the
|
* characteristics of the pulsed output on the fly if the timer is
|
||||||
* output is started; or it will change the characteristics of the pulsed
|
* already started.
|
||||||
* output on the fly if the timer is already started. This command will
|
|
||||||
* set the PWM characteristics and return immediately.
|
|
||||||
*
|
*
|
||||||
* ioctl argument: A read-only reference to struct pwm_info_s that provides
|
* ioctl argument: A read-only reference to struct pwm_info_s that provides
|
||||||
* the characteristics of the pulsed output.
|
* the characteristics of the pulsed output.
|
||||||
|
|||||||
Reference in New Issue
Block a user