libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
pruio_intc.h
Go to the documentation of this file.
1 
12 #ifdef __cplusplus
13  extern "C" {
14 #endif /* __cplusplus */
15 
16 #define PRU0_PRU1_INTERRUPT 17
17 #define PRU1_PRU0_INTERRUPT 18
18 #define PRU0_ARM_INTERRUPT 19
19 #define PRU1_ARM_INTERRUPT 20
20 #define ARM_PRU0_INTERRUPT 21
21 #define ARM_PRU1_INTERRUPT 22
22 #define CHANNEL0 0
23 #define CHANNEL1 1
24 #define CHANNEL2 2
25 #define CHANNEL3 3
26 #define CHANNEL4 4
27 #define CHANNEL5 5
28 #define CHANNEL6 6
29 #define CHANNEL7 7
30 #define CHANNEL8 8
31 #define CHANNEL9 9
32 
33 #define PRU0 0
34 #define PRU1 1
35 #define PRU_EVTOUT0 2
36 #define PRU_EVTOUT1 3
37 #define PRU_EVTOUT2 4
38 #define PRU_EVTOUT3 5
39 #define PRU_EVTOUT4 6
40 #define PRU_EVTOUT5 7
41 #define PRU_EVTOUT6 8
42 #define PRU_EVTOUT7 9
43 
44 #define PRU0_HOSTEN_MASK 0x0001
45 #define PRU1_HOSTEN_MASK 0x0002
46 #define PRU_EVTOUT0_HOSTEN_MASK 0x0004
47 #define PRU_EVTOUT1_HOSTEN_MASK 0x0008
48 #define PRU_EVTOUT2_HOSTEN_MASK 0x0010
49 #define PRU_EVTOUT3_HOSTEN_MASK 0x0020
50 #define PRU_EVTOUT4_HOSTEN_MASK 0x0040
51 #define PRU_EVTOUT5_HOSTEN_MASK 0x0080
52 #define PRU_EVTOUT6_HOSTEN_MASK 0x0100
53 #define PRU_EVTOUT7_HOSTEN_MASK 0x0200
54 
55 
56 //#define PRUSS_INTC_INITDATA { \
57 //{ PRU0_PRU1_INTERRUPT, PRU1_PRU0_INTERRUPT, PRU0_ARM_INTERRUPT, PRU1_ARM_INTERRUPT, ARM_PRU0_INTERRUPT, ARM_PRU1_INTERRUPT, (char)-1 }, \
58 //{ {PRU0_PRU1_INTERRUPT,CHANNEL1}, {PRU1_PRU0_INTERRUPT, CHANNEL0}, {PRU0_ARM_INTERRUPT,CHANNEL2}, {PRU1_ARM_INTERRUPT, CHANNEL3}, {ARM_PRU0_INTERRUPT, CHANNEL0}, {ARM_PRU1_INTERRUPT, CHANNEL1}, {-1,-1}}, \
59  //{ {CHANNEL0,PRU0}, {CHANNEL1, PRU1}, {CHANNEL2, PRU_EVTOUT0}, {CHANNEL3, PRU_EVTOUT1}, {-1,-1} }, \
60  //(PRU0_HOSTEN_MASK | PRU1_HOSTEN_MASK | PRU_EVTOUT0_HOSTEN_MASK | PRU_EVTOUT1_HOSTEN_MASK) /*Enable PRU0, PRU1, PRU_EVTOUT0 */ \
61 //} \
62 
63 #define NUM_PRU_HOSTIRQS 8
64 #define NUM_PRU_HOSTS 10
65 #define NUM_PRU_CHANNELS 10
66 #define NUM_PRU_SYS_EVTS 64
67 
68 #define PRUSS0_PRU0_DRAM 0
69 #define PRUSS0_PRU1_DRAM 1
70 #define PRUSS0_PRU0_IRAM 2
71 #define PRUSS0_PRU1_IRAM 3
72 #define PRUSS0_SRAM 4
73 //#define PRUSS0_CFG 5 //!<
74 //#define PRUSS0_UART 6 //!<
75 //#define PRUSS0_IEP 7 //!<
76 //#define PRUSS0_ECAP 8 //!<
77 //#define PRUSS0_MII_RT 9 //!<
78 //#define PRUSS0_MDIO 10 //!<
79 #define PRU_EVTOUT_0 0
80 #define PRU_EVTOUT_1 1
81 #define PRU_EVTOUT_2 2
82 #define PRU_EVTOUT_3 3
83 #define PRU_EVTOUT_4 4
84 #define PRU_EVTOUT_5 5
85 #define PRU_EVTOUT_6 6
86 #define PRU_EVTOUT_7 7
88 typedef struct __sysevt_to_channel_map {
93 typedef struct __channel_to_host_map {
98 typedef struct __pruss_intc_initdata {
104 
105 #if defined (__cplusplus)
106 }
107 #endif
unsigned int uint32
32 bit unsigned integer data type.
Definition: pruio.h:41
signed char int8
8 bit signed integer data type.
Definition: pruio.h:36
short int16
16 bit signed integer data type.
Definition: pruio.h:37
struct __channel_to_host_map tchannel_to_host_map
Mapping from interrupt channel to host event.
#define NUM_PRU_SYS_EVTS
Number of PRU system events.
Definition: pruio_intc.h:66
struct __sysevt_to_channel_map tsysevt_to_channel_map
Mapping from system event to interrupt channel.
struct __pruss_intc_initdata tpruss_intc_initdata
Init data structure for the interrupt controller setting.
#define NUM_PRU_CHANNELS
Number of PRU interrupt channels.
Definition: pruio_intc.h:65
Mapping from interrupt channel to host event.
Definition: pruio_intc.h:93
int16 channel
The channel number.
Definition: pruio_intc.h:94
int16 host
The host interrupt.
Definition: pruio_intc.h:95
Init data structure for the interrupt controller setting.
Definition: pruio_intc.h:98
uint32 host_enable_bitmask
The mask of enabled host interrupts.
Definition: pruio_intc.h:102
tchannel_to_host_map channel_to_host_map[NUM_PRU_CHANNELS]
Mapping from interrupt channel to host.
Definition: pruio_intc.h:101
tsysevt_to_channel_map sysevt_to_channel_map[NUM_PRU_SYS_EVTS]
Mapping from system event to interrupt channel.
Definition: pruio_intc.h:100
int8 sysevts_enabled[NUM_PRU_SYS_EVTS]
The list of enabled system events.
Definition: pruio_intc.h:99
Mapping from system event to interrupt channel.
Definition: pruio_intc.h:88
int16 sysevt
The number of the system event.
Definition: pruio_intc.h:89
int16 channel
The mapped channel number.
Definition: pruio_intc.h:90