michallenc commented on issue #15436:
URL: https://github.com/apache/nuttx/issues/15436#issuecomment-2577299327

   Hi all, just please note that this might be a breaking API change, since it 
is safe to assume applications are using `CONFIG_PWM_MULTICHAN` to determine 
how to access `pwm_info_s` structure. That said, I completely agree with the 
removal of `CONFIG_PWM_MULTICHAN` option.
   
   I have proposed other breaking change several months ago in 
https://github.com/apache/nuttx/issues/12381 that simplifies `pwm_info_s` and 
would possibly also make `CONFIG_PWM_MULTICHAN` obsolete. I have not done much 
work on it as it is not my priority now, just some initial tests with SAMv7 
build, you can see this commit 
https://github.com/michallenc/incubator-nuttx/commit/8224f0e70e18ee643e08821fd66724a2ff14d616
 (though I still used multichan config there, but it shouldn't be problem to 
remove it). We would basically shrink the entire PWM structure to
   
   ```
   #ifdef CONFIG_PWM_NCHANNELS
   #define PWM_NCHANNELS CONFIG_PWM_NCHANNELS
   #else
   #define PWM_NCHANNELS 1
   #endif
   
   struct pwm_chan_s  channels[PWM_NCHANNELS];
   FAR void           *arg; 
   ``` 
   
   There were also some other proposals in the issue I haven't worked on yet, 
this is just an initial kick off.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to