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

drivers/servo: adapted to PWM interface changes

This commit is contained in:
Joakim Nohlgård 2016-01-14 16:17:18 +01:00
parent 9988f00d7b
commit f6bd9cab57
2 changed files with 3 additions and 7 deletions

View File

@ -82,12 +82,8 @@ int servo_init(servo_t *dev, pwm_t pwm, int pwm_channel, unsigned int min, unsig
*
* @param[in] dev the servo to set
* @param[in] pos the position to set the servo in us
*
* @return 0 on success
* @return -1 on invalid configured channel
* @return -2 on invalid position
*/
int servo_set(servo_t *dev, unsigned int pos);
void servo_set(servo_t *dev, unsigned int pos);
#ifdef __cplusplus
}

View File

@ -88,7 +88,7 @@ int servo_init(servo_t *dev, pwm_t pwm, int pwm_channel, unsigned int min, unsig
return 0;
}
int servo_set(servo_t *dev, unsigned int pos)
void servo_set(servo_t *dev, unsigned int pos)
{
unsigned int raw_value;
if (pos > dev->max) {
@ -103,5 +103,5 @@ int servo_set(servo_t *dev, unsigned int pos)
DEBUG("servo_set: pos %d -> raw %d\n", pos, raw_value);
return pwm_set(dev->device, dev->channel, raw_value);
pwm_set(dev->device, dev->channel, raw_value);
}