The Pedigree Project  0.1
Beagle.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_BEAGLE_H
21 #define MACHINE_ARM_BEAGLE_H
22 
23 #include "GPTimer.h"
24 #include "Keyboard.h"
25 #include "Serial.h"
26 #include "Vga.h"
27 #include "pedigree/kernel/machine/Machine.h"
28 
32 class ArmBeagle : public Machine
33 {
34  public:
35  inline static Machine &instance()
36  {
37  return m_Instance;
38  }
39 
40  virtual void initialise();
41  virtual void initialise2();
42  virtual Serial *getSerial(size_t n);
43  virtual size_t getNumSerial();
44  virtual Vga *getVga(size_t n);
45  virtual size_t getNumVga();
46  virtual IrqManager *getIrqManager();
48  virtual Timer *getTimer();
49  virtual Keyboard *getKeyboard();
50  virtual void setKeyboard(Keyboard *kb){};
51 
52  virtual void initialiseDeviceTree();
53 
54  private:
58  ArmBeagle();
59  ArmBeagle(const ArmBeagle &);
60  ArmBeagle &operator=(const ArmBeagle &);
64  virtual ~ArmBeagle();
65 
66  ArmBeagleSerial m_Serial[3];
67  GPTimer m_Timers[11];
68  ArmBeagleVga m_Vga;
69  ArmBeagleKeyboard m_Keyboard;
70 
71  static ArmBeagle m_Instance;
72 };
73 
74 #endif
virtual SchedulerTimer * getSchedulerTimer()
Definition: Beagle.cc:214
virtual Keyboard * getKeyboard()
Definition: Beagle.cc:223
virtual size_t getNumSerial()
Definition: Beagle.cc:197
virtual void initialise2()
Called after debugger startup.
Definition: Beagle.cc:166
virtual ~ArmBeagle()
Definition: Beagle.cc:231
virtual size_t getNumVga()
Definition: Beagle.cc:205
virtual Vga * getVga(size_t n)
Definition: Beagle.cc:201
virtual Timer * getTimer()
Definition: Beagle.cc:218
Implements the UART interface on the BeagleBoard.
virtual Serial * getSerial(size_t n)
Definition: Beagle.cc:193
ArmBeagle()
Definition: Beagle.cc:228
virtual void initialiseDeviceTree()
Definition: Beagle.cc:38
virtual void initialise()
Definition: Beagle.cc:158
virtual void setKeyboard(Keyboard *kb)
Definition: Beagle.h:50