QuadroCopter  0.1.4
quadro::pwm::pwmOverlay Class Reference

#include <pwmOverlay.h>

Inheritance diagram for quadro::pwm::pwmOverlay:
quadro::overlays::overlayBase quadro::pwm::pwmDevice quadro::pwm::motors quadro::pwm::dji_2212

Classes

struct  overlaySettings
 

Public Member Functions

 pwmOverlay () throw ( pwmSetupException& )
 
- Public Member Functions inherited from quadro::overlays::overlayBase
 overlayBase ()
 
bool isLoaded (const char *searchFile)
 
bool load (const char *Overlay)
 

Public Attributes

struct quadro::pwm::pwmOverlay::overlaySettings settings
 
- Public Attributes inherited from quadro::overlays::overlayBase
int fileHandle
 
char errMessage [1024]
 
struct stat sb
 

Detailed Description

This class is a helper for loading device tree overlays required for PWM communication on the BBB

Constructor & Destructor Documentation

pwmOverlay::pwmOverlay ( )
throw (pwmSetupException &
)

This class is a helper for loading device tree overlays required for PWM communication on the BBB

Exceptions
pwmSetupException
23 {
24 
25  this->settings.overlayLoaded = this->isLoaded( this->settings.searchFile );
26 
27  if ( !this->settings.overlayLoaded )
28  this->settings.overlayLoaded = this->load( this->settings.overlay );
29 
30  if ( !this->settings.overlayLoaded ) {
31  snprintf( this->errMessage, sizeof( this->errMessage ),
32  "Fatal analogBase Error - Unable to load overlays : %s",
33  this->settings.overlay );
34  throw pwmSetupException( this->errMessage );
35  }
36 
37 }
bool overlayLoaded
overlay Loaded switch
Definition: pwmOverlay.h:47
char errMessage[1024]
Definition: overlayBase.h:70
struct quadro::pwm::pwmOverlay::overlaySettings settings
bool load(const char *Overlay)
Definition: overlayBase.cpp:45
Definition: pwmSetupException.h:17
const char * overlay
overlay name
Definition: pwmOverlay.h:45
const char * searchFile
overlay created file
Definition: pwmOverlay.h:46
bool isLoaded(const char *searchFile)
Definition: overlayBase.cpp:28

Member Data Documentation

struct quadro::pwm::pwmOverlay::overlaySettings quadro::pwm::pwmOverlay::settings

The documentation for this class was generated from the following files:
  • /Users/michaelbrookes/ClionProjects/Quadro/lib/pwm/overlays/pwmOverlay.h
  • /Users/michaelbrookes/ClionProjects/Quadro/lib/pwm/overlays/pwmOverlay.cpp