libyggdrasil  v1.0.0
motor_driver.h File Reference

Driver to use the TC78H660FTG DC motor driver. More...

Include dependency graph for motor_driver.h:

Go to the source code of this file.

Enumerations

enum  MotorDriverChannel { MotorDriverChannel_A = 0, MotorDriverChannel_B = 1 }
 Motor driver Channels. More...
 

Functions

C_LINKAGE void yggdrasil_MotorDriver_Init (void)
 init function for the motor as a dual channel dc driver More...
 
C_LINKAGE void yggdrasil_MotorDriver_Standby (bool stby)
 set the motor driver to standby More...
 
C_LINKAGE void yggdrasil_MotorDriver_SetSpeed (enum MotorDriverChannel channel, float speed)
 Controls the speed and rotation of each channel. More...
 
C_LINKAGE bool yggdrasil_MotorDriver_GetError (void)
 get the Status from the motor driver More...
 

Detailed Description

Driver to use the TC78H660FTG DC motor driver.

Author
Fabian Weber, Nikolaij Saegesser

Enumeration Type Documentation

◆ MotorDriverChannel

Motor driver Channels.

Enumerator
MotorDriverChannel_A 

Channel A.

MotorDriverChannel_B 

Channel B.

Function Documentation

◆ yggdrasil_MotorDriver_GetError()

C_LINKAGE bool yggdrasil_MotorDriver_GetError ( void  )

get the Status from the motor driver

Returns
false when no error occurring, true when in thermal shutdown (TSD) or over current (ISD)

◆ yggdrasil_MotorDriver_Init()

C_LINKAGE void yggdrasil_MotorDriver_Init ( void  )

init function for the motor as a dual channel dc driver

Note
this function does start the needed pwm generators
Returns
Success

◆ yggdrasil_MotorDriver_SetSpeed()

C_LINKAGE void yggdrasil_MotorDriver_SetSpeed ( enum MotorDriverChannel  channel,
float  speed 
)

Controls the speed and rotation of each channel.

Parameters
channelChannel to set speed
speedSpeed from -100% o 100% where - does change the rotation direction

◆ yggdrasil_MotorDriver_Standby()

C_LINKAGE void yggdrasil_MotorDriver_Standby ( bool  stby)

set the motor driver to standby

Parameters
stbyTrue for standby, false for active