Change laser PWM control: rewrite using own PWM function
The Laser PWM control currently uses the MBED libary PWM functions:
The PWM function has some limitations: It is limited to the PWM1 outputs,
The initial state of the output cannot be set and floating point is used in the implementation to set the PWM duration.
A new object LaosPWM() should be implemented, that allows more flexibility.
methods: write(pwm), read()
- it should use CMSIS and the NXP peripheral library.
- Initially it should function for PWM1 peripheral (similar to current PWM), pin can be p21..p26
- PWM value should be in range of 0 to 10000 for 0 to 100%
- Writing should be fast (low overhead),inline function
- Clipping of set value between 0 and 100%
- Writing should be double buffered (no glitches)