Default configuration for servo devices. More...
Default configuration for servo devices.
Definition in file servo_params.h.
#include "board.h"#include "macros/units.h"#include "periph/gpio.h"#include "periph/pwm.h"#include "periph/timer.h"#include "saul_reg.h"#include "servo.h" Include dependency graph for servo_params.h:
 Include dependency graph for servo_params.h:Go to the source code of this file.
| Macros | |
| #define | SERVO_SAULINFO { .name = "servo" } | 
| Servo SAUL info. | |
| Variables | |
| static const servo_pwm_params_t | servo_pwm_params [] | 
| Servo PWM parameters. | |
| static const servo_timer_params_t | servo_timer_params [] | 
| Servo timer parameters. | |
| static const servo_params_t | servo_params [] | 
| Parameters for controlling a servo. | |
| static const saul_reg_info_t | servo_saul_info [] | 
| Allocate and configure entries to the SAUL registry. | |
| Default servo PWM configuration | |
| #define | SERVO_PWM_PARAM_DEV PWM_DEV(0) | 
| PWM device to use to control the servo. | |
| #define | SERVO_PWM_PARAM_RES UINT16_MAX | 
| PWM resolution to use to control the servo. | |
| #define | SERVO_PWM_PARAM_FREQ 50 | 
| PWM frequency in Hertz to use to control the servo. | |
| #define | SERVO_PWM_PARAMS | 
| PWM parameters for controlling a servo. | |
| Default servo timer configuration | |
| #define | SERVO_TIMER_PARAM_DEV TIMER_DEV(1) | 
| Timer to use to control the servo. | |
| #define | SERVO_TIMER_PARAM_TIMER_FREQ MHZ(1) | 
| Timer frequency to use to control the servo in Hz. | |
| #define | SERVO_TIMER_PARAM_SERVO_FREQ 50 | 
| Servo frequency in Hertz. | |
| #define | SERVO_TIMER_PARAM_TIMER_CTX (&servo_timer_default_ctx) | 
| Memory needed for book keeping. | |
| #define | SERVO_TIMER_PARAMS | 
| TIMER parameters for controlling a servo. | |
| servo_timer_ctx_t | servo_timer_default_ctx | 
| Default servo timer context. | |
| Default servo configuration | |
| #define | SERVO_PARAM_PWM_PARAMS (&servo_pwm_params[0]) | 
| PWM parameters. | |
| #define | SERVO_PARAM_TIMER_PARAMS (&servo_timer_params[0]) | 
| Timer parameters. | |
| #define | SERVO_PARAM_PWM_CHAN 0 | 
| PWM channel to use to control the servo. | |
| #define | SERVO_PARAM_TIMER_CHAN 1 | 
| Timer channel used to clear the servo pin. | |
| #define | SERVO_PARAM_PIN GPIO_UNDEF | 
| GPIO pin the servo input is connected to. | |
| #define | SERVO_PARAM_MIN_US 900UL | 
| Minimum time in µs of a pulse (corresponds to minimum extension) | |
| #define | SERVO_PARAM_MAX_US 2100UL | 
| Maximum time in µs of a pulse (corresponds to maximum extension) | |
| #define SERVO_PARAM_MAX_US 2100UL | 
Maximum time in µs of a pulse (corresponds to maximum extension)
Defaults to 2100UL. 
Definition at line 217 of file servo_params.h.
| #define SERVO_PARAM_MIN_US 900UL | 
Minimum time in µs of a pulse (corresponds to minimum extension)
Defaults to 900UL. 
Definition at line 208 of file servo_params.h.
| #define SERVO_PARAM_PIN GPIO_UNDEF | 
GPIO pin the servo input is connected to.
Definition at line 199 of file servo_params.h.
| #define SERVO_PARAM_PWM_CHAN 0 | 
PWM channel to use to control the servo.
Defaults to 0 
Definition at line 181 of file servo_params.h.
| #define SERVO_PARAM_PWM_PARAMS (&servo_pwm_params[0]) | 
| #define SERVO_PARAM_TIMER_CHAN 1 | 
Timer channel used to clear the servo pin.
Defaults to 1 
Definition at line 190 of file servo_params.h.
| #define SERVO_PARAM_TIMER_PARAMS (&servo_timer_params[0]) | 
Timer parameters.
Defaults to &servo_timer_params[0]. 
Definition at line 172 of file servo_params.h.
| #define SERVO_PWM_PARAM_DEV PWM_DEV(0) | 
PWM device to use to control the servo.
Defaults to PWM_DEV(0). 
Definition at line 43 of file servo_params.h.
| #define SERVO_PWM_PARAM_FREQ 50 | 
PWM frequency in Hertz to use to control the servo.
Defaults to 50UL Hz. 
Definition at line 61 of file servo_params.h.
| #define SERVO_PWM_PARAM_RES UINT16_MAX | 
PWM resolution to use to control the servo.
Defaults to UINT16_MAX. 
Definition at line 52 of file servo_params.h.
| #define SERVO_PWM_PARAMS | 
PWM parameters for controlling a servo.
Definition at line 68 of file servo_params.h.
| #define SERVO_SAULINFO { .name = "servo" } | 
Servo SAUL info.
Definition at line 256 of file servo_params.h.
| #define SERVO_TIMER_PARAM_DEV TIMER_DEV(1) | 
Timer to use to control the servo.
Defaults to TIMER_DEV(1). 
Definition at line 94 of file servo_params.h.
| #define SERVO_TIMER_PARAM_SERVO_FREQ 50 | 
| #define SERVO_TIMER_PARAM_TIMER_CTX (&servo_timer_default_ctx) | 
Memory needed for book keeping.
Defaults to &servo_timer_default_ctx. One context per timer used is needed. E.g. when 4 servos are connected but all are controlled with the same timer peripheral, only one context is needed. 
Definition at line 129 of file servo_params.h.
| #define SERVO_TIMER_PARAM_TIMER_FREQ MHZ(1) | 
Timer frequency to use to control the servo in Hz.
Defaults to 1 MHz
Definition at line 103 of file servo_params.h.
| #define SERVO_TIMER_PARAMS | 
TIMER parameters for controlling a servo.
Definition at line 136 of file servo_params.h.
| 
 | static | 
Parameters for controlling a servo.
Servo configuration
Definition at line 247 of file servo_params.h.
| 
 | static | 
Servo PWM parameters.
Definition at line 79 of file servo_params.h.
| 
 | static | 
Allocate and configure entries to the SAUL registry.
Definition at line 262 of file servo_params.h.
| 
 | extern | 
Default servo timer context.
Allocated in drivers/servo/timer.c
| 
 | static | 
Servo timer parameters.
Definition at line 148 of file servo_params.h.