mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
1c1a59851d
platform_pwm_op( id, op, data ) did four unrelated tasks, switching on the "op" parameter: op==PLATFORM_PWM_OP_SET_CLOCK took a frequency and returned a frequency op==PLATFORM_PWM_OP_GET_CLOCK took nothing returned a frequency op==PLATFORM_PWM_OP_START and _STOP both took nothing and returned nothing this patch replaces it with: clock = platform_pwm_set_clock( id, clock) clock = platform_pwm_get_clock( id ) platform_pwm_start( id ) and platform_pwm_stop( id ) with resulting clarity in the documentation and smaller, faster code. This does not affect the Lau interface.