//============================================================================ /*! \file Peripheral.h * \author Norbert Abel/KIP */ //============================================================================ #ifndef BASE_PERIPHERAL_H #define BASE_PERIPHERAL_H #include "base/Board.h" namespace base { //! Base class to represent ROC peripherals. /*! * Concrete ROC peripherals, like the I2C bus interface, will be represented * by classes derived from \c Peripheral. * * The class holds the address information needed to reach the \c Peripheral, * which at the base class level is just the pointer to the roc::Board which * hosts the \c Peripheral. */ class Peripheral { protected: base::Board* fBoard; //!< board pointer public: Peripheral() : fBoard(0) {} Peripheral(base::Board* board); virtual ~Peripheral() {} base::Board& board(); //! Returns pointer to the roc::Board which hosts the \c Peripheral. /*! * Note: normally using \c board() is more convenient. */ base::Board* getBoard() const { return fBoard; } }; } #endif