Driver for Servo.
More...
|
#define | TWR_SERVO_NO_ANGLE 255 |
|
#define | TWR_SERVO_UNKNOWN_ANGLE 250 |
|
#define | TWR_SERVO_DEFAULT_MIN 544 |
|
#define | TWR_SERVO_DEFAULT_MAX 2400 |
|
Driver for Servo.
◆ twr_servo_get_angle()
◆ twr_servo_init()
Initialize Servo.
- Parameters
-
[in] | self | Instance |
[in] | channel | PWM Channel |
Definition at line 6 of file twr_servo.c.
◆ twr_servo_set_angle()
void twr_servo_set_angle |
( |
twr_servo_t * |
self, |
|
|
uint8_t |
angle |
|
) |
| |
Set angle.
- Parameters
-
[in] | self | Instance |
[in] | angle | Angle in degrees, 0 to 180 |
Definition at line 29 of file twr_servo.c.
◆ twr_servo_set_microseconds()
void twr_servo_set_microseconds |
( |
twr_servo_t * |
self, |
|
|
uint16_t |
us |
|
) |
| |
Set Microseconds.
- Parameters
-
[in] | self | Instance |
[in] | us | Microseconds |
Definition at line 60 of file twr_servo.c.
◆ twr_servo_set_pulse_limits()
void twr_servo_set_pulse_limits |
( |
twr_servo_t * |
self, |
|
|
uint16_t |
min_us, |
|
|
uint16_t |
max_us |
|
) |
| |
Set pulse limits.
- Parameters
-
[in] | self | Instance |
[in] | min_us | Min pulse in us (Default 544us) |
[in] | max_us | Max pulse in us (Default 2400us) |
Definition at line 53 of file twr_servo.c.