2
3
4
5
6
7
8
9
10
11
12
18#include "../types/evmu_peripheral.h"
19#include <gimbal/meta/signals/gimbal_signal.h>
22
23
24
25#define EVMU_PIC_TYPE (GBL_TYPEID
(EvmuPic))
26#define EVMU_PIC(self) (GBL_CAST(EvmuPic, self))
31#define EVMU_PIC_NAME "pic"
34
35
36
37#define EVMU_ISR_ADDR_RESET 0x00
38#define EVMU_ISR_ADDR_EXT_INT0 0x03
39#define EVMU_ISR_ADDR_EXT_INT1 0x0b
40#define EVMU_ISR_ADDR_EXT_INT2_T0L 0x13
41#define EVMU_ISR_ADDR_EXT_INT3_TBASE 0x1b
42#define EVMU_ISR_ADDR_T0H 0x23
43#define EVMU_ISR_ADDR_T1 0x2b
44#define EVMU_ISR_ADDR_SIO0 0x33
45#define EVMU_ISR_ADDR_SIO1 0x3b
46#define EVMU_ISR_ADDR_RFB 0x43
47#define EVMU_ISR_ADDR_P3 0x4b
48#define EVMU_ISR_ADDR_11 0x4f
49#define EVMU_ISR_ADDR_12 0x52
50#define EVMU_ISR_ADDR_13 0x55
51#define EVMU_ISR_ADDR_14 0x5a
52#define EVMU_ISR_ADDR_15 0x5d
55#define GBL_SELF_TYPE EvmuPic
59GBL_FORWARD_DECLARE_STRUCT(EvmuPic);
95
96
97
98
99
100
101
102
103GBL_CLASS_DERIVE(EvmuPic, EvmuPeripheral)
105 EVMU_RESULT (*pFnPoll) (GBL_SELF);
111
112
113
114
115
116
117
118
119GBL_INSTANCE_DERIVE_EMPTY (
EvmuPic, EvmuPeripheral)
133 (irqChanged, (GBL_INSTANCE, pReceiver), (GBL_FLAGS, irqsActive))
143
144
145
146
158
159
160
161
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
#define EVMU_INLINE
Define used for inlining a funcion within a C header file.
uint16_t EvmuIrqMask
Mask of EVMU_IRQ values shifted and OR'd into a single mask.
@ EVMU_IRQ_EXT_INT2_T0L
INT2 or T0L overflow.
@ EVMU_IRQ_T1
T1H or T1L overflow.
@ EVMU_IRQ_T0H
TOH Overflow.
@ EVMU_IRQ_COUNT
Number of ISRs (16)
@ EVMU_IRQ_EXT_INT3_TBASE
INT3 or TBase overflow.
GblType EvmuPic_type(void)
Returns the GblType UUID associated with EvmuPic.
static EvmuAddress EvmuPic_isrAddress(EVMU_IRQ irq)
Static method returning the corresponding ISR address for a given interrupt routine.
@ EVMU_IRQ_PRIORITY_LOW
Low.
@ EVMU_IRQ_PRIORITY_COUNT
Number of levels.
@ EVMU_IRQ_PRIORITY_HIGHEST
Highest.
@ EVMU_IRQ_PRIORITY_HIGH
High.
@ EVMU_IRQ_PRIORITY_NONE
No level (not valid)
uint32_t EvmuAddress
Represents a generic absolute address.
#define GBL_PROPERTIES(object,...)
GblInstance structure for EvmuPic.
size_t EvmuPic_irqsActiveDepth(const EvmuPic *pSelf)
Returns the depth of the current active interrupt routine (or 0 if there isn't one)
GblBool EvmuPic_update(EvmuPic *pSelf)
Checks whether any pending IRQs can be serviced, activating them if so.
EvmuIrqMask EvmuPic_irqsEnabledByPriority(const EvmuPic *pSelf, EVMU_IRQ_PRIORITY priority)
Returns a mask of all of the IRQs which are enabled for the priority level given by priority.
void EvmuPic_raiseIrq(EvmuPic *pSelf, EVMU_IRQ irq)
Raises an interrupt request for the given irq.
EvmuIrqMask EvmuPic_irqsActive(const EvmuPic *pSelf)
Returns a mask of all the active interrupt routines, at any priority level or depth.
EVMU_IRQ_PRIORITY EvmuPic_irqPriority(const EvmuPic *pSelf, EVMU_IRQ irq)
Returns the interrupt priority level currently configured for the routine given by irq.
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)