libyggdrasil  v1.0.0
bsp::ygg::prph::SinkDriver::Servo Class Reference

Servo driver. More...

#include <sink_driver.hpp>

Public Member Functions

 Servo ()=delete
 

Static Public Member Functions

static void set (Channel channel, float percent)
 Set the servo arm rotation in percent relative to its maximal value. More...
 
static void setDeltaHighTime (Channel channel, u16 delta)
 Function to set the high time of the pwm pulse. More...
 

Detailed Description

Servo driver.

Note
When using the Servo port, the PWM frequency for all channels will be set to 50Hz

Constructor & Destructor Documentation

◆ Servo()

bsp::ygg::prph::SinkDriver::Servo::Servo ( )
delete

Member Function Documentation

◆ 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
channelChannel which should be changed
percentServo 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
channelChannel which should be changed
deltaHigh time of the pwm pulse in ms

The documentation for this class was generated from the following file: