The Pedigree Project  0.1
Versatile.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef MACHINE_ARM_VERSATILE_H
21 #define MACHINE_ARM_VERSATILE_H
22 
23 #include "Keyboard.h"
24 #include "Serial.h"
25 #include "Vga.h"
26 #include "pedigree/kernel/machine/Machine.h"
27 
31 class ArmVersatile : public Machine
32 {
33  public:
34  inline static Machine &instance()
35  {
36  return m_Instance;
37  }
38 
39  virtual void initialise();
40  virtual Serial *getSerial(size_t n);
41  virtual size_t getNumSerial();
42  virtual Vga *getVga(size_t n);
43  virtual size_t getNumVga();
44  virtual IrqManager *getIrqManager();
46  virtual Timer *getTimer();
47  virtual Keyboard *getKeyboard();
48  virtual void setKeyboard(Keyboard *kb){};
49 
50  virtual void initialiseDeviceTree(){};
51 
52  private:
56  ArmVersatile();
57  ArmVersatile(const ArmVersatile &);
58  ArmVersatile &operator=(const ArmVersatile &);
62  virtual ~ArmVersatile();
63 
64  ArmVersatileSerial m_Serial[2];
65  // SchedulerTimer m_SchedulerTimer;
66  // Timer m_Timers;
67  ArmVersatileVga m_Vga;
68  ArmVersatileKeyboard m_Keyboard;
69 
70  static ArmVersatile m_Instance;
71 };
72 
73 #endif
virtual void setKeyboard(Keyboard *kb)
Definition: Versatile.h:48
virtual Keyboard * getKeyboard()
Definition: Versatile.cc:70
virtual Vga * getVga(size_t n)
Definition: Versatile.cc:47
virtual void initialiseDeviceTree()
Definition: Versatile.h:50
virtual Timer * getTimer()
Definition: Versatile.cc:65
virtual size_t getNumSerial()
Definition: Versatile.cc:43
virtual Serial * getSerial(size_t n)
Definition: Versatile.cc:39
virtual SchedulerTimer * getSchedulerTimer()
Definition: Versatile.cc:60
virtual ~ArmVersatile()
Definition: Versatile.cc:78
virtual void initialise()
Definition: Versatile.cc:29
virtual size_t getNumVga()
Definition: Versatile.cc:51