1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32
33 34 35
36
37 package ti.uia.sysbios;
38
39 import xdc.runtime.Assert;
40 import ti.uia.runtime.UIAPacket;
41 import ti.sysbios.knl.Semaphore;
42 import ti.sysbios.knl.Clock;
43 import ti.sysbios.knl.Task;
44 import ti.sysbios.knl.Event;
45 import ti.sysbios.syncs.SyncEvent;
46
47 /*!
48 * ======== IpcMP ========
49 */
50
51 @ModuleStartup
52
53 module IpcMP inherits ti.uia.runtime.IServiceMgrSupport
54 {
55 /*!
56 * Assert raised IpcMP interaction gets unexpected failure
57 */
58 config Assert.Id A_IpcMPFailure = {
59 msg: "A_IpcMPFailure: Unexpected failure with the IpcMP"
60 };
61
62 /*!
63 * SharedRegion used to allocate messages
64 */
65 config Int sharedRegionId = 0;
66
67
68
69 /*!
70 * @_nodoc
71 * ======== rxTaskFxn ========
72 * Function used for the transfer agent Task.
73 */
74 @DirectCall
75 Void rxTaskFxn(UArg arg0, UArg arg1);
76
77 /*!
78 * @_nodoc
79 * ======== transferAgentFxn ========
80 * Function used for the transfer agent Task.
81 */
82 @DirectCall
83 Void transferAgentFxn(UArg arg0, UArg arg1);
84
85 /*!
86 * @_nodoc
87 * ======== clockFxn ========
88 * Function used for the RTA Agent's Clock instance.
89 *
90 * The Agent C code does not contain any references to this function, so
91 * this function has been made public and nodoc'd, rather than being made
92 * internal, so that it does not fall away in a ROM build.
93 */
94 @DirectCall
95 Void clockFxn(UArg arg0);
96
97 /*!
98 * @_nodoc
99 * ======== start ========
100 */
101 @DirectCall
102 Int start(UArg arg, UInt16 value);
103
104 /*!
105 * ======== doNotPlugIpc ========
106 * Work-around for Syslink bug SDOCM00077375
107 *
108 * Only call if you are using Syslink version 2.00.00.66
109 */
110 metaonly Void doNotPlugIpc();
111
112 internal:
113 /*!
114 * ======== period ========
115 * Stored as ticks
116 */
117 config UInt32 period[];
118
119 /*!
120 * ======== scheduled ========
121 * Stored as ticks
122 */
123 config UInt32 scheduled[];
124
125 /*!
126 * ======== reqEnergy ========
127 */
128 config Bool reqEnergy[];
129
130 /*!
131 * ======== createRxTask ========
132 */
133 config Bool createRxTask = false;
134
135 /*!
136 * @_nodoc
137 * ======== start ========
138 */
139 @DirectCall
140 Int startOrig(Ptr *ptr, UInt16 value);
141
142 /*!
143 * ======== giveEnergy ========
144 */
145 @DirectCall
146 Void giveEnergy();
147
148 /*!
149 * ======== handleMsg ========
150 */
151 @DirectCall
152 Void handleMsg(Ptr msg);
153
154 /*!
155 * ======== prime ========
156 */
157 @DirectCall
158 Void prime(Ptr handle, Int size, Int count);
159
160 /*!
161 * ======== registerWithMaster ========
162 */
163 @DirectCall
164 Void registerWithMaster();
165
166 /*!
167 * ======== requestEvents ========
168 */
169 @DirectCall
170 Void requestEvents();
171
172 /*!
173 * ======== Module_State ========
174 */
175 struct Module_State {
176 Event.Handle event;
177 Clock.Handle clock;
178 Ptr freeEventMQ;
179 Ptr freeMsgMQ;
180 Ptr routerMQ;
181 Ptr startedMQ;
182 UInt32 masterMQ;
183 Ptr incomingMsgMQ;
184 UInt32 replyMQ[];
185 SyncEvent.Handle syncEvent01;
186 Task.Handle transferAgentHandle;
187 Ptr transportMsgHandle;
188 Ptr transportEventHandle;
189 Semaphore.Handle releaseTasksSem;
190 Int numMSGPacketsSent;
191 Int numEventPacketsSent;
192 Bool master;
193 Bool masterRunning;
194 };
195 }