20 #include "modules/Module.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/machine/Device.h" 23 #include "pedigree/kernel/machine/Machine.h" 24 #include "pedigree/kernel/machine/Timer.h" 25 #include "pedigree/kernel/machine/TimerHandler.h" 26 #include "pedigree/kernel/processor/IoBase.h" 27 #include "pedigree/kernel/processor/state_forward.h" 28 #include "pedigree/kernel/processor/types.h" 29 #include "pedigree/kernel/utilities/String.h" 30 #include "pedigree/kernel/utilities/Vector.h" 31 #include "pedigree/kernel/utilities/utility.h" 60 virtual bool initialise();
64 virtual void timer(uint64_t delta, InterruptState &state);
73 if (p->addresses().count() > 0)
75 if (p->addresses()[0]->m_Name ==
"ib700-base")
78 if (pNewChild->initialise())
80 return static_cast<Device *
>(pNewChild);
84 ERROR(
"IB700 initialisation failed!");
93 auto c = pedigree_std::make_callable(f);
103 MODULE_INFO(
"ib700_wdt", &entry, &exit);
105 Ib700Watchdog::Ib700Watchdog(
Device *pDev) :
Device(pDev)
110 Ib700Watchdog::~Ib700Watchdog()
119 bool Ib700Watchdog::initialise()
133 t->registerHandler(
this);
136 m_pBase->
write16(Seconds10, 2);
153 m_pBase->
write16(Seconds10, 2);
virtual void timer(uint64_t delta, InterruptState &state)
virtual Timer * getTimer()=0
virtual Vector< Address * > & addresses()
Abstrace base class for hardware I/O capabilities.
virtual void write16(uint16_t value, size_t offset=0)=0
virtual void setSpecificType(String str)
virtual void getName(String &str)
static void foreach(Callback callback, Device *root=0)