galileo: add missing configure call for PWM0

If PWM had been configured by some other application after the last
power cycle, it would appear to work fine. However, an application using
PWM loaded right after a power cycle would not work, since the configure
call was missing during boot.

Change-Id: I389ca2122e1a4a7ea6d298efb327438761336d75
Work-by: Mike Hirst <michael.hirst@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2015-10-23 17:09:25 -04:00 committed by Anas Nashif
parent 08cf2157f3
commit 34f53085f3

View file

@ -587,6 +587,8 @@ uint8_t _galileo_set_pin(struct device *port, uint8_t pin, uint8_t func)
enable->path[i].cfg);
break;
case PWM0:
pwm_pin_configure(drv_data->pwm0,
enable->path[i].pin, 0);
pwm_pin_set_duty_cycle(drv_data->pwm0,
enable->path[i].pin,
enable->path[i].level ? 100 : 0);