Update circle_stdlib_app.h

Update to e880dc0ed1
pull/419/head
probonopd 2 years ago committed by GitHub
parent 7e874cf427
commit fd0b88a57f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 39
      src/circle_stdlib_app.h

@ -1,7 +1,4 @@
/**
* This file has been taken from the circle-stdlib project:
* https://github.com/smuehlst/circle-stdlib
*
* Convenience classes that package different levels
* of functionality of Circle applications.
*
@ -22,7 +19,6 @@
#include <circle/interrupt.h>
#include <circle/screen.h>
#include <circle/serial.h>
#include <circle/writebuffer.h>
#include <circle/timer.h>
#include <circle/logger.h>
#include <circle/usb/usbhcidevice.h>
@ -95,9 +91,7 @@ class CStdlibAppScreen : public CStdlibApp
public:
CStdlibAppScreen(const char *kernel)
: CStdlibApp (kernel),
mScreenUnbuffered (mOptions.GetWidth (), mOptions.GetHeight ()),
mScreen (&mScreenUnbuffered),
mbScreenAvailable (false),
mScreen (mOptions.GetWidth (), mOptions.GetHeight ()),
mTimer (&mInterrupt),
mLogger (mOptions.GetLogLevel (), &mTimer)
{
@ -110,13 +104,16 @@ public:
return false;
}
mbScreenAvailable = mScreenUnbuffered.Initialize ();
#if 0
if (!mScreen.Initialize ())
{
return false;
}
if (!mSerial.Initialize (115200))
{
return false;
}
#endif
CDevice *pTarget =
mDeviceNameService.GetDevice (mOptions.GetLogDevice (), false);
if (pTarget == 0)
@ -133,10 +130,8 @@ public:
}
protected:
CScreenDevice mScreenUnbuffered;
//CSerialDevice mSerial;
CWriteBufferDevice mScreen;
bool mbScreenAvailable;
CScreenDevice mScreen;
CSerialDevice mSerial;
CTimer mTimer;
CLogger mLogger;
};
@ -162,12 +157,7 @@ public:
mpPartitionName (pPartitionName),
mUSBHCI (&mInterrupt, &mTimer, TRUE),
mEMMC (&mInterrupt, &mTimer, &mActLED),
#if !defined(__aarch64__) || !defined(LEAVE_QEMU_ON_HALT)
//mConsole (&mScreen, TRUE)
mConsole (&mNullDevice, &mScreen)
#else
mConsole (&mScreen)
#endif
mConsole (0, TRUE)
{
}
@ -199,23 +189,18 @@ public:
return false;
}
#if !defined(__aarch64__) || !defined(LEAVE_QEMU_ON_HALT)
// The USB driver is not supported under 64-bit QEMU, so
// the initialization must be skipped in this case, or an
// exit happens here under 64-bit QEMU.
if (!mUSBHCI.Initialize ())
{
return false;
}
#endif
if (!mConsole.Initialize ())
{
return false;
}
// Initialize newlib stdio with a reference to Circle's file system and console
CGlueStdioInit (mFileSystem, mConsole);
// Initialize newlib stdio with a reference to Circle's console
CGlueStdioInit (mConsole);
mLogger.Write (GetKernelName (), LogNotice, "Compile time: " __DATE__ " " __TIME__);

Loading…
Cancel
Save