Files
mt32-pi/include/kernel.h

71 lines
1.7 KiB
C
Raw Permalink Normal View History

2020-06-09 21:58:23 +01:00
//
// kernel.h
//
2021-01-17 19:55:10 +00:00
// mt32-pi - A baremetal MIDI synthesizer for Raspberry Pi
2023-02-02 13:32:48 +00:00
// Copyright (C) 2020-2023 Dale Whinham <daleyo@gmail.com>
2020-06-09 21:58:23 +01:00
//
2021-01-17 19:55:10 +00:00
// This file is part of mt32-pi.
2020-06-09 21:58:23 +01:00
//
2021-01-17 19:55:10 +00:00
// mt32-pi is free software: you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
2020-06-09 21:58:23 +01:00
//
2021-01-17 19:55:10 +00:00
// mt32-pi is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// mt32-pi. If not, see <http://www.gnu.org/licenses/>.
2020-06-09 21:58:23 +01:00
//
2020-07-06 00:41:37 +01:00
2020-06-09 21:58:23 +01:00
#ifndef _kernel_h
#define _kernel_h
2020-10-11 01:29:57 +01:00
#include <circle_stdlib_app.h>
#include <circle/bcm54213.h>
#include <circle/cputhrottle.h>
#include <circle/gpiomanager.h>
#include <circle/i2cmaster.h>
#include <circle/sched/scheduler.h>
#include <circle/spimaster.h>
2020-10-11 01:29:57 +01:00
#include <circle/timer.h>
2020-06-09 21:58:23 +01:00
#include "config.h"
2020-10-11 01:29:57 +01:00
#include "mt32pi.h"
#include "zoneallocator.h"
2020-06-26 22:20:25 +01:00
2020-10-11 01:29:57 +01:00
class CKernel : public CStdlibApp
2020-06-09 21:58:23 +01:00
{
public:
CKernel(void);
virtual bool Initialize(void) override;
2020-10-11 01:29:57 +01:00
TShutdownMode Run(void) override;
2020-06-09 21:58:23 +01:00
protected:
CCPUThrottle m_CPUThrottle;
CSerialDevice m_Serial;
#ifdef HDMI_CONSOLE
CScreenDevice m_Screen;
#endif
CTimer m_Timer;
CLogger m_Logger;
CScheduler m_Scheduler;
CUSBHCIDevice m_USBHCI;
CEMMCDevice m_EMMC;
FATFS m_SDFileSystem;
CI2CMaster m_I2CMaster;
CSPIMaster m_SPIMaster;
CGPIOManager m_GPIOManager;
2020-06-09 21:58:23 +01:00
private:
CZoneAllocator m_Allocator;
CConfig m_Config;
2020-10-11 01:29:57 +01:00
CMT32Pi m_MT32Pi;
2020-06-09 21:58:23 +01:00
};
#endif