From 3602fb3828dc53c27d0aa374b2979749f4096bbd Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 6 Feb 2022 18:26:22 +0000 Subject: [PATCH] Initialize and start miniorgan Thanks @rsta2 https://github.com/rsta2/circle/issues/274#issuecomment-1030880643 --- src/kernel.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/kernel.cpp b/src/kernel.cpp index dcc6bf9..d0eb3ab 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -18,12 +18,31 @@ CKernel::~CKernel(void) bool CKernel::Initialize (void) { - return CStdlibAppStdio::Initialize (); + 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; }