BlackLib::BlackCoreADC Class Referenceabstract

Preparation phase of Beaglebone Black, to use ADC. More...

#include <BlackADC.h>

Inheritance diagram for BlackLib::BlackCoreADC:

Public Member Functions

 BlackCoreADC ()
 Constructor of BlackCoreADC class. More...
 
virtual ~BlackCoreADC ()
 Destructor of BlackCoreADC class. More...
 
virtual std::string getValue ()=0
 First declaration of this function. More...
 

Protected Member Functions

std::string getHelperPath ()
 Exports helper path to derived class. More...
 
errorCoreADCgetErrorsFromCoreADC ()
 Exports errorCoreADC struct pointer to derived class. More...
 

Private Member Functions

bool loadDeviceTree ()
 Loads ADC overlay to device tree. More...
 
bool findHelperName ()
 Finds full name of helper. More...
 
- Private Member Functions inherited from BlackLib::BlackCore
 BlackCore ()
 Constructor of BlackCore class. More...
 
virtual ~BlackCore ()
 Destructor of BlackCore class. More...
 
std::string searchDirectoryOcp (BlackCore::ocpSearch searchThis)
 Searches ocp directory to find specified file/directory. More...
 
errorCoregetErrorsFromCore ()
 Exports errorCore struct to derived class. More...
 
std::string getCapeMgrName ()
 Exports capemgr name to derived class. More...
 
std::string getOcpName ()
 Exports ocp name to derived class. More...
 
std::string getSlotsFilePath ()
 Exports slots file path to derived class. More...
 

Private Attributes

errorCoreADCadcCoreErrors
 is used to hold the errors of BlackCoreADC class More...
 
std::string helperName
 is used to hold the helper(analog input device driver) name More...
 

Additional Inherited Members

- Private Types inherited from BlackLib::BlackCore
enum  ocpSearch {
  ADC_helper = 0,
  PWM_P8_13 = 1,
  PWM_P8_19 = 2,
  PWM_P9_14 = 3,
  PWM_P9_16 = 4,
  PWM_P9_21 = 5,
  PWM_P9_22 = 6,
  PWM_P9_42 = 7,
  SPI0 = 8,
  SPI1 = 9
}
 

Detailed Description

Preparation phase of Beaglebone Black, to use ADC.

This class is core of the BlackADC class. It includes private functions which are doing base processes for using analog input feature.

Constructor & Destructor Documentation

BlackLib::BlackCoreADC::BlackCoreADC ( )

Constructor of BlackCoreADC class.

This function initializes errorCoreADC struct and calls device tree loading and helper name finding functions.

See also
BlackCoreADC::loadDeviceTree()
BlackCoreADC::findHelperName()
adcName
BlackLib::BlackCoreADC::~BlackCoreADC ( )
virtual

Destructor of BlackCoreADC class.

This function deletes errorCoreADC struct pointer.

Member Function Documentation

bool BlackLib::BlackCoreADC::findHelperName ( )
private

Finds full name of helper.

This function searches "ocp.X" directory, to find directory which starts with "helper." by using searchDirectoryOcp() protected function at BlackCore class.

Returns
True if successful, else false.
See also
BlackCore::searchDirectoryOcp()
errorCoreADC * BlackLib::BlackCoreADC::getErrorsFromCoreADC ( )
protected

Exports errorCoreADC struct pointer to derived class.

Returns
errorCoreADC struct pointer.
std::string BlackLib::BlackCoreADC::getHelperPath ( )
protected

Exports helper path to derived class.

Returns
Full path of helper.
virtual std::string BlackLib::BlackCoreADC::getValue ( )
pure virtual

First declaration of this function.

Implemented in BlackLib::BlackADC.

bool BlackLib::BlackCoreADC::loadDeviceTree ( )
privatevirtual

Loads ADC overlay to device tree.

This function loads "cape-bone-iio" overlay to device tree. This overlay performs pinmuxing and generates device driver.

Returns
True if successful, else false.

Implements BlackLib::BlackCore.

Member Data Documentation

errorCoreADC* BlackLib::BlackCoreADC::adcCoreErrors
private

is used to hold the errors of BlackCoreADC class

std::string BlackLib::BlackCoreADC::helperName
private

is used to hold the helper(analog input device driver) name


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