pwm_tool: Add support for high-speed PWM pin updates

The output_pin module is only capable of updating an output pin at
most once every 100ms.  Add a new pwm_tool module that is capable of
queuing updates in the micro-controller and thus allowing for much
higher update rates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2023-10-13 21:10:11 -04:00
parent 48a05eaa54
commit 29b7550ce5
8 changed files with 201 additions and 17 deletions

View file

@ -13,6 +13,12 @@ value: 0
shutdown_value: 0
cycle_time: 0.01
[pwm_tool test_pwm_tool]
pin: PH4
value: 0
shutdown_value: 0
cycle_time: 0.01
[mcu]
serial: /dev/ttyACM0

View file

@ -28,3 +28,11 @@ 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
# PWM tool
# Basic test
SET_PIN PIN=test_pwm_tool VALUE=0
SET_PIN PIN=test_pwm_tool VALUE=0.5
SET_PIN PIN=test_pwm_tool VALUE=0.5
SET_PIN PIN=test_pwm_tool VALUE=0.25
SET_PIN PIN=test_pwm_tool VALUE=1