![]() |
Dataflow Runtime API
3.0.3.0
|
Base class for all drivers in the BSP. More...
#include <Imt.Base.BSP/Driver/DriverAbs.h>
Public Member Functions | |
DriverAbs (const size_t indexModule, const size_t indexDriver) | |
Constructor. More... | |
virtual | ~DriverAbs (void) |
Destructor. More... | |
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... | |
Static Public Attributes | |
static const imt::base::bsp::type::DriverType::Id | Type = TypeId |
Constant holding the driver type. More... | |
Protected Member Functions | |
virtual void | onInitialize ()=0 |
Called when the driver is initialized. More... | |
virtual void | onEnable ()=0 |
Called when the driver is enabled. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStart ()=0 |
Called whenever the driver is started. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStop ()=0 |
Called whenever the driver is stopped. More... | |
Base class for all drivers in the BSP.
|
inlineexplicit |
Constructor.
indexModule | Index of the module (starting at 0). |
indexDriver | Index of the driver (starting at 0). |
|
inlinevirtual |
Destructor.
|
inline |
Enable the driver.
This includes enabling of required interrupts and clocks. This method is called once before the runtime is started.
|
inline |
Gets the index of the driver inisde the module.
|
inline |
Gets the index of the module the driver is part of.
|
inline |
Gets the type of the driver.
|
inline |
Initialize the driver.
This includes configuration of all registers for the driver. This method is called once when the BSP is intitalized.
|
inline |
Gets if the driver has been enabled.
|
inline |
Gets if the driver has been initialzied.
|
inline |
Gets if the driver has been started.
|
protectedpure virtual |
Called when the driver is enabled.
Implemented in imt::base::bsp::driver::UsartDriver, imt::base::bsp::driver::SpiDriver, imt::base::bsp::driver::PwmDriver, imt::base::bsp::driver::I2CDriver, imt::base::bsp::driver::HighLevelDriver, imt::base::bsp::driver::GpioDriver, imt::base::bsp::driver::DacDriver, imt::base::bsp::driver::CanDriver, and imt::base::bsp::driver::AdcDriver.
|
protectedpure virtual |
Called when the driver is initialized.
Implemented in imt::base::bsp::driver::UsartDriver, imt::base::bsp::driver::SpiDriver, imt::base::bsp::driver::PwmDriver, imt::base::bsp::driver::I2CDriver, imt::base::bsp::driver::HighLevelDriver, imt::base::bsp::driver::GpioDriver, imt::base::bsp::driver::DacDriver, imt::base::bsp::driver::CanDriver, and imt::base::bsp::driver::AdcDriver.
|
protectedpure virtual |
Called whenever the driver is started.
Implemented in imt::base::bsp::driver::UsartDriver, imt::base::bsp::driver::SpiDriver, imt::base::bsp::driver::PwmDriver, imt::base::bsp::driver::I2CDriver, imt::base::bsp::driver::HighLevelDriver, imt::base::bsp::driver::GpioDriver, imt::base::bsp::driver::DacDriver, imt::base::bsp::driver::CanDriver, and imt::base::bsp::driver::AdcDriver.
|
protectedpure virtual |
Called whenever the driver is stopped.
Implemented in imt::base::bsp::driver::UsartDriver, imt::base::bsp::driver::SpiDriver, imt::base::bsp::driver::PwmDriver, imt::base::bsp::driver::I2CDriver, imt::base::bsp::driver::HighLevelDriver, imt::base::bsp::driver::GpioDriver, imt::base::bsp::driver::DacDriver, imt::base::bsp::driver::CanDriver, and imt::base::bsp::driver::AdcDriver.
|
inline |
Starts the driver.
This method may be called during runtime.
|
inline |
Stops the driver.
This method may be called during runtime.
|
static |
Constant holding the driver type.