High-level driver for easy handling of servo motors. More...
High-level driver for easy handling of servo motors.
Definition in file servo.h.
#include <stddef.h>
#include <stdint.h>
#include "periph/pwm.h"
#include "periph/timer.h"
#include "saul.h"
#include "saul_reg.h"
#include "time_units.h"
Go to the source code of this file.
Data Structures | |
struct | servo_pwm_params_t |
PWM configuration parameters for a servos. More... | |
struct | servo_timer_ctx_t |
Memory needed for book keeping when using periph_timer_periodic based servo driver. More... | |
struct | servo_timer_params_t |
Timer configuration parameters for a servos. More... | |
struct | servo_params_t |
Configuration parameters for a servo. More... | |
struct | servo |
Servo device state. More... | |
Macros | |
#define | SERVO_TIMER_MAX_CHAN 4 |
In case the servo_timer backend is used to driver the servo, this is the highest channel number usable by the driver. | |
Typedefs | |
typedef struct servo | servo_t |
Servo device state. | |
Functions | |
int | servo_init (servo_t *dev, const servo_params_t *params) |
Initialize servo. | |
void | servo_set (servo_t *dev, uint8_t pos) |
Set the servo motor to a specified position. | |
Variables | |
const saul_driver_t | servo_saul_driver |
The SAUL adaption driver for servos. | |
servo_timer_ctx_t | servo_timer_default_ctx |
Default timer context. | |