FreeNOS
BroadcomInterrupt.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __LIBARCH_ARM_BROADCOMINTERRUPT_H
19 #define __LIBARCH_ARM_BROADCOMINTERRUPT_H
20 
21 #include <IntController.h>
22 #include <arm/ARMIO.h>
23 
40 #define BCM_IRQ_SYSTIMERM1 1
41 
46 {
47  public:
48 
53 
59  virtual Result enable(uint vector);
60 
66  virtual Result disable(uint vector);
67 
73  virtual Result clear(uint vector);
74 
82  virtual Result nextPending(uint & irq);
83 
89  virtual bool isTriggered(uint vector);
90 
91  private:
92 
95 };
96 
103 #endif /* LIBARCH_ARM_BROADCOMINTERRUPT_H */
IntController
Interrupt controller interface.
Definition: IntController.h:35
BroadcomInterrupt::nextPending
virtual Result nextPending(uint &irq)
Retrieve the next pending interrupt (IRQ).
Definition: BroadcomInterrupt.cpp:89
ARMIO
Input/Output operations specific to the ARM architecture.
Definition: ARMIO.h:39
uint
unsigned int uint
Unsigned integer number.
Definition: Types.h:44
BroadcomInterrupt
Raspberry Pi Interrupt Controller implementation.
Definition: BroadcomInterrupt.h:45
BroadcomInterrupt::m_io
ARMIO m_io
I/O instance.
Definition: BroadcomInterrupt.h:94
BroadcomInterrupt::clear
virtual Result clear(uint vector)
Clear an IRQ vector.
Definition: BroadcomInterrupt.cpp:84
BroadcomInterrupt::isTriggered
virtual bool isTriggered(uint vector)
Check if an IRQ vector is set.
Definition: BroadcomInterrupt.cpp:103
BroadcomInterrupt::BroadcomInterrupt
BroadcomInterrupt()
Constructor.
Definition: BroadcomInterrupt.cpp:37
IntController.h
BroadcomInterrupt::disable
virtual Result disable(uint vector)
Disable an IRQ vector.
Definition: BroadcomInterrupt.cpp:66
ARMIO.h
BroadcomInterrupt::enable
virtual Result enable(uint vector)
Enable an IRQ vector.
Definition: BroadcomInterrupt.cpp:44
IntController::Result
Result
Result codes.
Definition: IntController.h:42