pwm_cycle_time: New module for output pins with dynamic cycle times
Remove support for changing the cycle time of pwm pins from the output_pin module. Use a new pwm_cycle_time module that supports setting dynamic cycle times. This simplifies the output_pin code and low-level pin update code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -16,18 +16,24 @@ SET_PIN PIN=soft_pwm_pin VALUE=0
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.5
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=1
|
||||
|
||||
# Soft PWM with dynamic cycle time
|
||||
# Test basic on off
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.5
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=1
|
||||
|
||||
# Test cycle time
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0 CYCLE_TIME=0.1
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=1 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=0.001
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.75 CYCLE_TIME=0.01
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=1
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0 CYCLE_TIME=0.1
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=1 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.5 CYCLE_TIME=0.001
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.75 CYCLE_TIME=0.01
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.5 CYCLE_TIME=1
|
||||
|
||||
# Test duplicate values
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.75 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=soft_pwm_pin VALUE=0.75 CYCLE_TIME=0.75
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.5 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.5 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.75 CYCLE_TIME=0.5
|
||||
SET_PIN PIN=cycle_pwm_pin VALUE=0.75 CYCLE_TIME=0.75
|
||||
|
||||
# PWM tool
|
||||
# Basic test
|
||||
|
||||
Reference in New Issue
Block a user