-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: PWMPulse Width ModulationPulse Width Modulation
Description
As discussed in #5469, current PWM API prevents dynamic prescaler computation.
Indeed, using get_cycles_per_sec in pin_set prevents to adjust PWM prescaler to the requested cycle duration and hence imposes to set it before compilation. Hence PWM application is limited to work in the duration range matching harcoded prescaler value.
I propose to remove function get_cycles_per_sec from API and let driver compute it internally inside pin_set. It seems this function is not used today (not in PWM tests/samples at least).
Drivers should be able to handle directly pwm_pin_set_usec.
GeorgeCGV and Tooniis
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: PWMPulse Width ModulationPulse Width Modulation