libyggdrasil
v1.0.0
|
Driver to use the sink drivers. More...
#include <c/yggdrasil/types.h>
Go to the source code of this file.
Enumerations | |
enum | SinkDriverChannel { SinkDriverChannel_A = 0, SinkDriverChannel_B = 1, SinkDriverChannel_C = 2, SinkDriverChannel_D = 3 } |
Sink Driver Timer Channels. More... | |
Functions | |
C_LINKAGE void | yggdrasil_SinkDriver_Init (void) |
Initialization function. More... | |
C_LINKAGE void | yggdrasil_SinkDriver_Servo_Set (enum SinkDriverChannel channel, float percent) |
Set the servo arm rotation in percent relative to its maximal value. More... | |
C_LINKAGE void | yggdrasil_SinkDriver_Servo_SetDeltaHighTime (enum SinkDriverChannel channel, u16 delta) |
FUnction to set the high time of the pwm pulse. More... | |
C_LINKAGE void | yggdrasil_SinkDriver_PWM_SetDuty (enum SinkDriverChannel channel, float dutyCycle) |
C_LINKAGE bool | yggdrasil_SinkDriver_PWM_SetFrequency (u32 frequency, u16 resolution) |
Set the pwm frequency and (optional) the maximal ticks within on cycle for all channels. More... | |
C_LINKAGE u32 | yggdrasil_SinkDriver_PWM_GetFrequency (enum SinkDriverChannel channel) |
Get the pwm frequency. More... | |
C_LINKAGE void | yggdrasil_SinkDriver_Out_Set (enum SinkDriverChannel channel, bool state) |
set the sink driver pin state More... | |
Driver to use the sink drivers.
enum SinkDriverChannel |
C_LINKAGE void yggdrasil_SinkDriver_Init | ( | void | ) |
Initialization function.
C_LINKAGE void yggdrasil_SinkDriver_Out_Set | ( | enum SinkDriverChannel | channel, |
bool | state | ||
) |
set the sink driver pin state
channel | Channel to set |
state | Pin state |
C_LINKAGE u32 yggdrasil_SinkDriver_PWM_GetFrequency | ( | enum SinkDriverChannel | channel | ) |
Get the pwm frequency.
channel | Channel, this is used when not all channels are from the same timer |
C_LINKAGE void yggdrasil_SinkDriver_PWM_SetDuty | ( | enum SinkDriverChannel | channel, |
float | dutyCycle | ||
) |
Set the pwm frequency and (optional) the maximal ticks within on cycle for all channels.
frequency | new frequency in hz |
resolution | of the pwm, for 0 the actual value will be used |
C_LINKAGE void yggdrasil_SinkDriver_Servo_Set | ( | enum SinkDriverChannel | channel, |
float | percent | ||
) |
Set the servo arm rotation in percent relative to its maximal value.
channel | Channel which should be changed |
percent | Servo arm rotation in percent from -100% to 100% |
C_LINKAGE void yggdrasil_SinkDriver_Servo_SetDeltaHighTime | ( | enum SinkDriverChannel | channel, |
u16 | delta | ||
) |
FUnction to set the high time of the pwm pulse.
channel | Channel which should be changed |
delta | High time of the pwm pulse in ms |