Contiki-NG
|
Header file for a Generic Servo driver. More...
Go to the source code of this file.
Macros | |
Servo default settings | |
#define | SERVO_DEFAULT_FREQ 50 |
50 Hz | |
#define | SERVO_MAX_DEGREES 180 |
#define | SERVO_MIN_VAL 9600 /**> roughly equals to 3% duty cycle */ |
#define | SERVO_MAX_VAL 38400 /**> roughly equals to 12% duty cycle */ |
Servo general purpose timers mapping | |
#define | SERVO_CHANNEL_1 0x001 |
GPT0-B. | |
#define | SERVO_CHANNEL_2 0x100 |
GPT1-A. | |
#define | SERVO_CHANNEL_3 0x101 |
GPT1-B. | |
#define | SERVO_CHANNEL_4 0x200 |
GPT2-A. | |
#define | SERVO_CHANNEL_5 0x201 |
GPT2-B. | |
#define | SERVO_CHANNEL_6 0x300 |
GPT3-A. | |
#define | SERVO_CHANNEL_7 0x301 |
GPT3-B. | |
Servo general constants | |
#define | SERVO_SUCCESS 0 |
#define | SERVO_ERROR (-1) |
Functions | |
Servo public funtions | |
int | servo_position (uint16_t gptab, uint8_t port, uint8_t pin, uint16_t pos) |
Configures and positions a servo in a given position (by degrees) The servo will lock its position as long as it is not stopped. More... | |
int | servo_stop (uint16_t gptab, uint8_t port, uint8_t pin) |
Fully stop a servo and reconfigures back the pin/port as GPIO. More... | |
Header file for a Generic Servo driver.
Definition in file servo.h.