Servo driver.
More...
#include <sink_driver.hpp>
Servo driver.
- Note
- When using the Servo port, the PWM frequency for all channels will be set to 50Hz
◆ Servo()
bsp::ygg::prph::SinkDriver::Servo::Servo |
( |
| ) |
|
|
delete |
◆ set()
static void bsp::ygg::prph::SinkDriver::Servo::set |
( |
Channel |
channel, |
|
|
float |
percent |
|
) |
| |
|
inlinestatic |
Set the servo arm rotation in percent relative to its maximal value.
- Note
- The needed high period of pwm signal to reach maximal magnitude can be configured with the setDeltaHighTime() function (This is servo specific)
- Warning
- If the system clock is not not above 200MHz the function might not be able to set the pwm frequency to 50Hz
- Parameters
-
channel | Channel which should be changed |
percent | Servo arm rotation in percent from -100% to 100% |
◆ setDeltaHighTime()
static void bsp::ygg::prph::SinkDriver::Servo::setDeltaHighTime |
( |
Channel |
channel, |
|
|
u16 |
delta |
|
) |
| |
|
inlinestatic |
Function to set the high time of the pwm pulse.
- Parameters
-
channel | Channel which should be changed |
delta | High time of the pwm pulse in ms |
The documentation for this class was generated from the following file: