mlaz commented on issue #955: pwm enabled?
URL: https://github.com/apache/mynewt-core/issues/955#issuecomment-381991519
 
 
   Ok, I agree with the most that have been said here but we need to take a 
look at the nature of the problem and how PWM is implemented. Typically there's 
a HW device which is active or inactive, it uses different channels which might 
have a duty cycle. I think that what we're failing at here is having something 
called enable_duty_cycle instead of set_duty_cycle. This is because we are in 
fact enabling and disabling a device(as long as we're enabling at least a 
single channel or disabling all of them). So IMO, we should have both device 
configure/enable/disable functions and channel configure/unconfigure/set_duty. 
Note that we are setting the duty cycle to 0 whenever disabling a channel, 
which doesn't make that much sense. I would like to see a flow for a basic set 
up like: pwm_set_frequency, pwm_configure_channel, pwm_set_duty, pwm_enable. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to