libyggdrasil  v1.0.0
bsp::ygg::prph::MotorDriver Class Reference

Dual DC Motor driver driver TC78H660FTG. More...

#include <motor_driver.hpp>

Public Types

enum  Channel : u8 { Channel::A = 0, Channel::B = 1 }
 Channels. More...
 

Public Member Functions

 MotorDriver ()=delete
 

Static Public Member Functions

static bool init ()
 init function for the motor as a dual channel dc driver More...
 
static void standby (bool stby)
 set the motor driver to standby More...
 
static void setSpeed (Channel ch, float speed)
 Controls the speed and rotation of each channel. More...
 
static bool getError ()
 get the Status from the motor driver More...
 

Detailed Description

Dual DC Motor driver driver TC78H660FTG.

Member Enumeration Documentation

◆ Channel

Channels.

Enumerator

Channel A.

Channel B.

Constructor & Destructor Documentation

◆ MotorDriver()

bsp::ygg::prph::MotorDriver::MotorDriver ( )
delete

Member Function Documentation

◆ getError()

static bool bsp::ygg::prph::MotorDriver::getError ( )
inlinestatic

get the Status from the motor driver

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

◆ init()

static bool bsp::ygg::prph::MotorDriver::init ( )
inlinestatic

init function for the motor as a dual channel dc driver

Note
this function does start the needed pwm generators
Returns
Success

◆ setSpeed()

static void bsp::ygg::prph::MotorDriver::setSpeed ( Channel  ch,
float  speed 
)
inlinestatic

Controls the speed and rotation of each channel.

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

◆ standby()

static void bsp::ygg::prph::MotorDriver::standby ( bool  stby)
inlinestatic

set the motor driver to standby

Parameters
stbyTrue for standby, false for active

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