1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/servo: fix initialization

The pwm to initialize must be read from arguments.
This commit is contained in:
Marc Poulhiès 2015-10-20 13:48:48 +02:00 committed by Marc
parent 4e90fdf505
commit 0464892aee

View File

@ -34,7 +34,7 @@ int servo_init(servo_t *dev, pwm_t pwm, int pwm_channel, unsigned int min, unsig
{
int actual_frequency;
actual_frequency = pwm_init(dev->device, PWM_LEFT, FREQUENCY, RESOLUTION);
actual_frequency = pwm_init(pwm, PWM_LEFT, FREQUENCY, RESOLUTION);
DEBUG("servo: requested %d hz, got %d hz\n", FREQUENCY, actual_frequency);