Dataflow Runtime API  2.7.4.0
Public Member Functions | Protected Member Functions | List of all members
imt::base::bsp::driver::AdcDriver Class Reference

Driver to access a single ADC channel. More...

#include <Imt.Base.BSP/Driver/AdcDriver.h>

Inheritance diagram for imt::base::bsp::driver::AdcDriver:
imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::ADC >

Public Member Functions

 AdcDriver (const size_t indexModule, const size_t indexChannel)
 Constructor. More...
 
virtual ~AdcDriver (void)
 Destructor.
 
imt::base::bsp::type::ErrorCode::Id read (uint32_t *const pValue) const
 Reads the current value. More...
 
- Public Member Functions inherited from imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::ADC >
 DriverAbs (const size_t indexModule, const size_t indexDriver)
 Constructor. More...
 
virtual ~DriverAbs (void)
 Destructor.
 
void initialize (void)
 Initialize the driver. More...
 
void enable (void)
 Enable the driver. More...
 
imt::base::bsp::type::ErrorCode::Id start (void)
 Starts the driver. More...
 
imt::base::bsp::type::ErrorCode::Id stop (void)
 Stops the driver. More...
 
size_t getIndexDriver (void) const
 Gets the index of the driver inisde the module. More...
 
size_t getIndexModule (void) const
 Gets the index of the module the driver is part of. More...
 
imt::base::bsp::type::DriverType::Id getType (void) const
 Gets the type of the driver. More...
 
bool isInitialized (void) const
 Gets if the driver has been initialzied. More...
 
bool isEnabled (void) const
 Gets if the driver has been enabled. More...
 
bool isStarted (void) const
 Gets if the driver has been started. More...
 

Protected Member Functions

virtual void onInitialize (void)
 
virtual void onEnable (void)
 
virtual imt::base::bsp::type::ErrorCode::Id onStart (void)
 
virtual imt::base::bsp::type::ErrorCode::Id onStop (void)
 

Additional Inherited Members

- Static Public Attributes inherited from imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::ADC >
static const imt::base::bsp::type::DriverType::Id Type
 Constant holding the driver type.
 

Detailed Description

Driver to access a single ADC channel.

Constructor & Destructor Documentation

◆ AdcDriver()

imt::base::bsp::driver::AdcDriver::AdcDriver ( const size_t  indexModule,
const size_t  indexChannel 
)
explicit

Constructor.

Parameters
indexModuleIndex of the module (starting at 0).
indexChannelIndex of the channel (starting at 0).

Member Function Documentation

◆ onEnable()

virtual void imt::base::bsp::driver::AdcDriver::onEnable ( void  )
protectedvirtual

◆ onInitialize()

virtual void imt::base::bsp::driver::AdcDriver::onInitialize ( void  )
protectedvirtual

◆ onStart()

virtual imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::AdcDriver::onStart ( void  )
protectedvirtual

◆ onStop()

virtual imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::AdcDriver::onStop ( void  )
protectedvirtual

◆ read()

imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::AdcDriver::read ( uint32_t *const  pValue) const

Reads the current value.

Parameters
pValueSet to the raw ADC counts.
Returns
OK Value could be read. INVALID_ARGUMENT Null pointer passed. UNINITIALIZED Output is not a valid ADC. INVALID_STATE Driver is not started.

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