38#ifndef SERVO_PWM_PARAM_DEV
44#define SERVO_PWM_PARAM_DEV PWM_DEV(0)
47#ifndef SERVO_PWM_PARAM_RES
53#define SERVO_PWM_PARAM_RES UINT16_MAX
56#ifndef SERVO_PWM_PARAM_FREQ
62#define SERVO_PWM_PARAM_FREQ 50
65#ifndef SERVO_PWM_PARAMS
69#define SERVO_PWM_PARAMS {\
70 .pwm = SERVO_PWM_PARAM_DEV, \
71 .freq = SERVO_PWM_PARAM_FREQ, \
72 .res = SERVO_PWM_PARAM_RES, \
89#ifndef SERVO_TIMER_PARAM_DEV
95#define SERVO_TIMER_PARAM_DEV TIMER_DEV(1)
98#ifndef SERVO_TIMER_PARAM_TIMER_FREQ
104#define SERVO_TIMER_PARAM_TIMER_FREQ MHZ(1)
107#ifndef SERVO_TIMER_PARAM_SERVO_FREQ
113#define SERVO_TIMER_PARAM_SERVO_FREQ 50
116#ifndef SERVO_TIMER_PARAM_TIMER_CTX
130#define SERVO_TIMER_PARAM_TIMER_CTX (&servo_timer_default_ctx)
133#ifndef SERVO_TIMER_PARAMS
137#define SERVO_TIMER_PARAMS {\
138 .timer = SERVO_TIMER_PARAM_DEV, \
139 .timer_freq = SERVO_TIMER_PARAM_TIMER_FREQ, \
140 .servo_freq = SERVO_TIMER_PARAM_SERVO_FREQ, \
141 .ctx = SERVO_TIMER_PARAM_TIMER_CTX, \
158#ifndef SERVO_PARAM_PWM_PARAMS
164#define SERVO_PARAM_PWM_PARAMS (&servo_pwm_params[0])
167#ifndef SERVO_PARAM_TIMER_PARAMS
173#define SERVO_PARAM_TIMER_PARAMS (&servo_timer_params[0])
176#ifndef SERVO_PARAM_PWM_CHAN
182#define SERVO_PARAM_PWM_CHAN 0
185#ifndef SERVO_PARAM_TIMER_CHAN
191#define SERVO_PARAM_TIMER_CHAN 1
194#ifndef SERVO_PARAM_PIN
200#define SERVO_PARAM_PIN GPIO_UNDEF
203#ifndef SERVO_PARAM_MIN_US
209#define SERVO_PARAM_MIN_US 900UL
212#ifndef SERVO_PARAM_MAX_US
218#define SERVO_PARAM_MAX_US 2100UL
225#ifdef MODULE_SERVO_PWM
226#define SERVO_PARAMS {\
227 .pwm = SERVO_PARAM_PWM_PARAMS, \
228 .min_us = SERVO_PARAM_MIN_US, \
229 .max_us = SERVO_PARAM_MAX_US, \
230 .pwm_chan = SERVO_PARAM_PWM_CHAN, \
233#ifdef MODULE_SERVO_TIMER
234#define SERVO_PARAMS {\
235 .timer = SERVO_PARAM_TIMER_PARAMS, \
236 .servo_pin = SERVO_PARAM_PIN, \
237 .min_us = SERVO_PARAM_MIN_US, \
238 .max_us = SERVO_PARAM_MAX_US, \
239 .timer_chan = SERVO_PARAM_TIMER_CHAN, \
253#ifndef SERVO_SAULINFO
257#define SERVO_SAULINFO { .name = "servo" }
Low-level GPIO peripheral driver interface definitions.
Low-level timer peripheral driver interface definitions.
Low-level PWM peripheral driver interface definitions.
SAUL registry interface definition.
High-level driver for easy handling of servo motors.
static const servo_params_t servo_params[]
Parameters for controlling a servo.
#define SERVO_SAULINFO
Servo SAUL info.
#define SERVO_TIMER_PARAMS
TIMER parameters for controlling a servo.
servo_timer_ctx_t servo_timer_default_ctx
Default servo timer context.
static const servo_pwm_params_t servo_pwm_params[]
Servo PWM parameters.
#define SERVO_PWM_PARAMS
PWM parameters for controlling a servo.
static const servo_timer_params_t servo_timer_params[]
Servo timer parameters.
static const saul_reg_info_t servo_saul_info[]
Allocate and configure entries to the SAUL registry.
Additional data to collect for each entry.
Configuration parameters for a servo.
PWM configuration parameters for a servos.
Memory needed for book keeping when using periph_timer_periodic based servo driver.
Timer configuration parameters for a servos.