From 83f862d18c40c2669161f56667eb04f5f71f3e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChlstrasser?= Date: Sun, 6 Feb 2022 14:33:25 +0100 Subject: [PATCH] Fix build errors in initial miniorgan program Fixed build errors in initial attempt to port the Circle miniorgan sample program to circle-stdlib: Remove members that are provided by the convencience base class CStdlibAppStdio. Correct syntax for invoking base class and member constructors. Added miniorgan.o module to Makefile. --- src/Makefile | 2 +- src/kernel.cpp | 14 +++++++------- src/kernel.h | 10 ---------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Makefile b/src/Makefile index 7edecbe..286691a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,7 +5,7 @@ CIRCLE_STDLIB_DIR = ../circle-stdlib MSFA_DIR = msfa -OBJS = main.o kernel.o \ +OBJS = main.o kernel.o miniorgan.o \ $(MSFA_DIR)/dx7note.o $(MSFA_DIR)/env.o $(MSFA_DIR)/exp2.o $(MSFA_DIR)/fm_core.o \ $(MSFA_DIR)/fm_op_kernel.o $(MSFA_DIR)/freqlut.o $(MSFA_DIR)/lfo.o \ $(MSFA_DIR)/pitchenv.o $(MSFA_DIR)/sin.o $(MSFA_DIR)/tuning.o diff --git a/src/kernel.cpp b/src/kernel.cpp index 4e89095..dcc6bf9 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -5,17 +5,17 @@ #include CKernel::CKernel (void) -: CStdlibAppStdio ("minidexed") +: CStdlibAppStdio ("minidexed"), + m_I2CMaster (CMachineInfo::Get ()->GetDevice (DeviceI2CMaster), TRUE), + m_MiniOrgan (&mInterrupt, &m_I2CMaster) { - m_Screen (m_Options.GetWidth (), m_Options.GetHeight ()), - m_Timer (&m_Interrupt), - m_Logger (m_Options.GetLogLevel (), &m_Timer), - m_I2CMaster (CMachineInfo::Get ()->GetDevice (DeviceI2CMaster), TRUE), - m_USBHCI (&m_Interrupt, &m_Timer, TRUE), // TRUE: enable plug-and-play - m_MiniOrgan (&m_Interrupt, &m_I2CMaster) mActLED.Blink (5); // show we are alive } +CKernel::~CKernel(void) +{ +} + bool CKernel::Initialize (void) { return CStdlibAppStdio::Initialize (); diff --git a/src/kernel.h b/src/kernel.h index 3bb0c4b..d06d4bb 100644 --- a/src/kernel.h +++ b/src/kernel.h @@ -37,17 +37,7 @@ public: private: // do not change this order - CActLED m_ActLED; - CKernelOptions m_Options; - CDeviceNameService m_DeviceNameService; - CScreenDevice m_Screen; - CExceptionHandler m_ExceptionHandler; - CInterruptSystem m_Interrupt; - CTimer m_Timer; - CLogger m_Logger; CI2CMaster m_I2CMaster; - CUSBHCIDevice m_USBHCI; - CMiniOrgan m_MiniOrgan; };