AEM
ADCMgr Class Referenceabstract

#include <adcMgr.h>

Inheritance diagram for ADCMgr:
YADCMgr

Public Member Functions

virtual float getValue (uint8_t channel) const =0
 
 ADCMgr (uint8_t id, uint8_t nbChan)
 

Data Fields

const uint8_t nbChannels
 

Protected Member Functions

virtual void doSelfTest () const =0
 
virtual YSPIusartInit () const =0
 
virtual YSPIhwInit () const =0
 

Protected Attributes

YADCadc
 
boolean usingUSARTSPI = true
 
const uint8_t adcID
 

Detailed Description

ADCMgr is the pure abstract class that provides the interface to all test running sublcasses. This is used because Yannick tests on a harvester board, whereas Bob tests on an Iteaduino Mega. Configurations differ but share some common methods and variales

Constructor & Destructor Documentation

ADCMgr::ADCMgr ( uint8_t  id,
uint8_t  nbChan 
)

App instance constructor inits the adc ID

Parameters
idADC id
nbChanthe nmber of channels that the adc is using
Returns
an instance of App

Member Function Documentation

virtual void ADCMgr::doSelfTest ( ) const
protectedpure virtual

doSelfTest pure virtual exectues the ADC self test runs the adc self-test and informs, blocks if failure

Implemented in YADCMgr.

virtual float ADCMgr::getValue ( uint8_t  channel) const
pure virtual

get the channle value

Parameters
channelthe channel to check and on which to inform
Returns
the reading obtained

Implemented in YADCMgr.

virtual YSPI* ADCMgr::hwInit ( ) const
protectedpure virtual

hwInit pure virtual creates a HWSPI instance

Returns
pointer to HWSPI instance allocated from the heap

Implemented in YADCMgr.

virtual YSPI* ADCMgr::usartInit ( ) const
protectedpure virtual

usartInit pure virtual creates a USARTSPI instance

Returns
pointer to USARTSPI instance allocated from the heap

Implemented in YADCMgr.

Field Documentation

YADC* ADCMgr::adc
protected

pointer to instance of ADC that will be created

const uint8_t ADCMgr::adcID
protected

identifying which adc (or USART channel) we are testing in this app instance

const uint8_t ADCMgr::nbChannels

adc number of channels to be polled

boolean ADCMgr::usingUSARTSPI = true
protected

value may be changed during setup based on reading of yspiOnPin


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