You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MiniDexed/src/kernel.cpp

49 lines
734 B

//
// kernel.cpp
//
#include "kernel.h"
#include <iostream>
CKernel::CKernel (void)
: CStdlibAppStdio ("minidexed"),
m_I2CMaster (CMachineInfo::Get ()->GetDevice (DeviceI2CMaster), TRUE),
m_MiniOrgan (&mInterrupt, &m_I2CMaster)
{
mActLED.Blink (5); // show we are alive
}
CKernel::~CKernel(void)
{
}
bool CKernel::Initialize (void)
{
if (!CStdlibAppStdio::Initialize ())
{
return FALSE;
}
if (!m_MiniOrgan.Initialize ())
{
return FALSE;
}
return TRUE;
}
CStdlibApp::TShutdownMode CKernel::Run (void)
{
std::cout << "Hello MiniDexed!\n";
m_MiniOrgan.Start ();
while (m_MiniOrgan.IsActive ())
{
boolean bUpdated = mUSBHCI.UpdatePlugAndPlay ();
m_MiniOrgan.Process (bUpdated);
}
return ShutdownHalt;
}