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.
pull/2/head
Stephan Mühlstrasser 2 years ago
parent 4aba3805bf
commit 83f862d18c
  1. 2
      src/Makefile
  2. 14
      src/kernel.cpp
  3. 10
      src/kernel.h

@ -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

@ -5,17 +5,17 @@
#include <iostream>
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 ();

@ -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;
};

Loading…
Cancel
Save