Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
nz_pt66din6.h
Go to the documentation of this file.
1 
103 #ifndef PT66DIN6_H
104 #define PT66DIN6_H
105 
106 #if defined(XBRD_PT66DIN6)
107 
108 // *********************************************************************
109 // ------------------------- iMod Port 1 Defines -----------------------
110 // *********************************************************************
111 #define HAS_IMOD1
112 
113 #define IMOD1_PIN2
114 #define IMOD1_PIN2_IS_DIG //Digital I/O port of CPU
115 #define IMOD1_PIN2_IS_PPS
116 #ifdef PIN_08
117 #define PIN_IMOD1_P2 PIN_08
118 #define LAT_IMOD1_P2 LAT_08
119 #define DIR_IMOD1_P2 DIR_08
120 #define PULLUP_IMOD1_P2 PULLUP_08
121 #define PULLDOWN_IMOD1_P2 PULLDOWN_08
122 #define PPS_LAT_IMOD1_P2 PPS_OUT_08
123 #define PPS_IN_IMOD1_P2 PPS_IN_08
124 #define imod1_ConfDirPin2(dir) (DIR_IMOD1_P2 = dir)
125 #define imod1_WritePin2(val) (LAT_IMOD1_P2 = val)
126 #define imod1_ReadPin2() (PIN_IMOD1_P2)
127 #define imod1_ConfPullupPin2(val) (PULLUP_IMOD1_P2 = val)
128 #define imod1_ConfPulldownPin2(val) (PULLDOWN_IMOD1_P2 = val)
129 #endif
130 
131 #define IMOD1_PIN3
132 #define IMOD1_PIN3_IS_DIG
133 #define IMOD1_PIN3_IS_PPS
134 #ifdef PIN_07
135 #define PIN_IMOD1_P3 PIN_07
136 #define LAT_IMOD1_P3 LAT_07
137 #define DIR_IMOD1_P3 DIR_07
138 #define PULLUP_IMOD1_P3 PULLUP_07
139 #define PULLDOWN_IMOD1_P3 PULLDOWN_07
140 #define PPS_LAT_IMOD1_P3 PPS_OUT_07
141 #define PPS_IN_IMOD1_P3 PPS_IN_07
142 #define imod1_ConfDirPin3(dir) (DIR_IMOD1_P3 = dir)
143 #define imod1_WritePin3(val) (LAT_IMOD1_P3 = val)
144 #define imod1_ReadPin3() (PIN_IMOD1_P3)
145 #define imod1_ConfPullupPin3(val) (PULLUP_IMOD1_P3 = val)
146 #define imod1_ConfPulldownPin3(val) (PULLDOWN_IMOD1_P3 = val)
147 #endif
148 
149 #define IMOD1_PIN4
150 #define IMOD1_PIN4_IS_DIG
151 #define IMOD1_PIN4_IS_PPS
152 #ifdef PIN_06
153 #define PIN_IMOD1_P4 PIN_06
154 #define LAT_IMOD1_P4 LAT_06
155 #define DIR_IMOD1_P4 DIR_06
156 #define PULLUP_IMOD1_P4 PULLUP_06
157 #define PULLDOWN_IMOD1_P4 PULLDOWN_06
158 #define PPS_LAT_IMOD1_P4 PPS_OUT_06
159 #define PPS_IN_IMOD1_P4 PPS_IN_06
160 #define imod1_ConfDirPin4(dir) (DIR_IMOD1_P4 = dir)
161 #define imod1_WritePin4(val) (LAT_IMOD1_P4 = val)
162 #define imod1_ReadPin4() (PIN_IMOD1_P4)
163 #define imod1_ConfPullupPin4(val) (PULLUP_IMOD1_P4 = val)
164 #define imod1_ConfPulldownPin4(val) (PULLDOWN_IMOD1_P4 = val)
165 #endif
166 
167 #define IMOD1_PIN5
168 #define IMOD1_PIN5_IS_PPS
169 #define IMOD1_PIN5_IS_DIG
170 #define IMOD1_PIN5_IS_ANALOG
171 #ifdef PIN_01
172 #define PIN_IMOD1_P5 PIN_01
173 #define LAT_IMOD1_P5 LAT_01
174 #define DIR_IMOD1_P5 DIR_01
175 #define PULLUP_IMOD1_P5 PULLUP_01
176 #define PULLDOWN_IMOD1_P5 PULLDOWN_01
177 #define PPS_LAT_IMOD1_P5 PPS_OUT_01
178 #define PPS_IN_IMOD1_P5 PPS_IN_01
179 #define imod1_ConfDirPin5(dir) (DIR_IMOD1_P5 = dir)
180 #define imod1_WritePin5(val) (LAT_IMOD1_P5 = val)
181 #define imod1_ReadPin5() (PIN_IMOD1_P5)
182 #define imod1_ConfPullupPin5(val) (PULLUP_IMOD1_P5 = val)
183 #define imod1_ConfPulldownPin5(val) (PULLDOWN_IMOD1_P5 = val)
184 #endif
185 
186 #define IMOD1_PIN6
187 #define IMOD1_PIN6_IS_DIG
188 #define IMOD1_PIN6_IS_ANALOG
189 #ifdef PIN_03
190 #define PIN_IMOD1_P6 PIN_03
191 #define LAT_IMOD1_P6 LAT_03
192 #define DIR_IMOD1_P6 DIR_03
193 #define PULLUP_IMOD1_P6 PULLUP_03
194 #define PULLDOWN_IMOD1_P6 PULLDOWN_03
195 #define imod1_ConfDirPin6(dir) (DIR_IMOD1_P6 = dir)
196 #define imod1_WritePin6(val) (LAT_IMOD1_P6 = val)
197 #define imod1_ReadPin6() (PIN_IMOD1_P6)
198 #define imod1_ConfPullupPin6(val) (PULLUP_IMOD1_P6 = val)
199 #define imod1_ConfPulldownPin6(val) (PULLDOWN_IMOD1_P6 = val)
200 #endif
201 
202 #define IMOD1_PIN7
203 #define IMOD1_PIN7_IS_XDIG //Port expander Digital pin
204 #define IMOD1_PIN7_IS_XANALOG //Port expander Analog pin
205 //Add implementations for following functions. This will prevent default implementation in nz_imod.h from being used:
206 // imod1_ConfDirPin7()
207 // imod1_WritePin7()
208 // imod1_ReadPin7()
209 // imod1_ConfPullupPin7()
210 // imod1_ConfPulldownPin7()
211 
212 
213 extern BYTE ERROR_passed_invalid_port_to_function___imod1_Pin___Must_be_2_or_3_or_4_or_5;
214 #define imod1_Pin_INVALID ERROR_passed_invalid_port_to_function___imod1_Pin___Must_be_2_or_3_or_4_or_5
215 #define imod1_Pin(p) \
216  ((p==2)?PIN_08 : \
217  ((p==3)?PIN_07 : \
218  ((p==4)?PIN_06 : \
219  ((p==5)?PIN_04 : \
220  imod1_Pin_INVALID )))) \
221 
222 
223 
224 // *********************************************************************
225 // ------------------------- iMod Port 2 Defines -----------------------
226 // *********************************************************************
227 #define HAS_IMOD2
228 
229 #define IMOD2_PIN2
230 #define IMOD2_PIN2_IS_DIG
231 #define IMOD2_PIN2_IS_ANALOG
232 #define IMOD2_PIN2_IS_PPS
233 #define PIN_IMOD2_P2 PIN_01
234 #define LAT_IMOD2_P2 LAT_01
235 #define DIR_IMOD2_P2 DIR_01
236 #define PULLUP_IMOD2_P2 PULLUP_01
237 #define PULLDOWN_IMOD2_P2 PULLDOWN_01
238 #define PPS_LAT_IMOD2_P2 PPS_OUT_01
239 #define PPS_IN_IMOD2_P2 PPS_IN_01
240 #define imod2_ConfDirPin2(dir) (DIR_IMOD2_P2 = dir)
241 #define imod2_WritePin2(val) (LAT_IMOD2_P2 = val)
242 #define imod2_ReadPin2() (PIN_IMOD2_P2)
243 #define imod2_ConfPullupPin2(val) (PULLUP_IMOD2_P2 = val)
244 #define imod2_ConfPulldownPin2(val) (PULLDOWN_IMOD2_P2 = val)
245 
246 #define IMOD2_PIN3
247 #define IMOD2_PIN3_IS_DIG
248 #define IMOD2_PIN3_IS_PPS
249 #define PIN_IMOD2_P3 PIN_39
250 #define LAT_IMOD2_P3 LAT_39
251 #define DIR_IMOD2_P3 DIR_39
252 #define PULLUP_IMOD2_P3 PULLUP_39
253 #define PULLDOWN_IMOD2_P3 PULLDOWN_39
254 #define PPS_LAT_IMOD2_P3 PPS_OUT_39
255 #define PPS_IN_IMOD2_P3 PPS_IN_39
256 #define imod2_ConfDirPin3(dir) (DIR_IMOD2_P3 = dir)
257 #define imod2_WritePin3(val) (LAT_IMOD2_P3 = val)
258 #define imod2_ReadPin3() (PIN_IMOD2_P3)
259 #define imod2_ConfPullupPin3(val) (PULLUP_IMOD2_P3 = val)
260 #define imod2_ConfPulldownPin3(val) (PULLDOWN_IMOD2_P3 = val)
261 
262 #define IMOD2_PIN4
263 #define IMOD2_PIN4_IS_DIG
264 #define IMOD2_PIN4_IS_PPS
265 #define PIN_IMOD2_P4 PIN_38
266 #define LAT_IMOD2_P4 LAT_38
267 #define DIR_IMOD2_P4 DIR_38
268 #define PULLUP_IMOD2_P4 PULLUP_38
269 #define PULLDOWN_IMOD2_P4 PULLDOWN_38
270 #define PPS_LAT_IMOD2_P4 PPS_OUT_38
271 #define PPS_IN_IMOD2_P4 PPS_IN_38
272 #define imod2_ConfDirPin4(dir) (DIR_IMOD2_P4 = dir)
273 #define imod2_WritePin4(val) (LAT_IMOD2_P4 = val)
274 #define imod2_ReadPin4() (PIN_IMOD2_P4)
275 #define imod2_ConfPullupPin4(val) (PULLUP_IMOD2_P4 = val)
276 #define imod2_ConfPulldownPin4(val) (PULLDOWN_IMOD2_P4 = val)
277 
278 #define IMOD2_PIN5
279 #define IMOD2_PIN5_IS_DIG
280 #define IMOD2_PIN5_IS_ANALOG
281 #define IMOD2_PIN5_IS_PPS
282 #define PIN_IMOD2_P5 PIN_02
283 #define LAT_IMOD2_P5 LAT_02
284 #define DIR_IMOD2_P5 DIR_02
285 #define PULLUP_IMOD2_P5 PULLUP_02
286 #define PULLDOWN_IMOD2_P5 PULLDOWN_02
287 #define PPS_LAT_IMOD2_P5 PPS_OUT_02
288 #define PPS_IN_IMOD2_P5 PPS_IN_02
289 #define imod2_ConfDirPin5(dir) (DIR_IMOD2_P5 = dir)
290 #define imod2_WritePin5(val) (LAT_IMOD2_P5 = val)
291 #define imod2_ReadPin5() (PIN_IMOD2_P5)
292 #define imod2_ConfPullupPin5(val) (PULLUP_IMOD2_P5 = val)
293 #define imod2_ConfPulldownPin5(val) (PULLDOWN_IMOD2_P5 = val)
294 
295 #define IMOD2_PIN6
296 #define IMOD2_PIN6_IS_DIG
297 #define IMOD2_PIN6_IS_ANALOG
298 #define PIN_IMOD2_P6 PIN_32
299 #define LAT_IMOD2_P6 LAT_32
300 #define DIR_IMOD2_P6 DIR_32
301 #define PULLUP_IMOD2_P6 PULLUP_32
302 #define PULLDOWN_IMOD2_P6 PULLDOWN_32
303 #define imod2_ConfDirPin6(dir) (DIR_IMOD2_P6 = dir)
304 #define imod2_WritePin6(val) (LAT_IMOD2_P6 = val)
305 #define imod2_ReadPin6() (PIN_IMOD2_P6)
306 #define imod2_ConfPullupPin6(val) (PULLUP_IMOD2_P6 = val)
307 #define imod2_ConfPulldownPin6(val) (PULLDOWN_IMOD2_P6 = val)
308 
309 #define IMOD2_PIN7
310 #define IMOD2_PIN7_IS_XDIG //Port expander Digital pin
311 #define IMOD2_PIN7_IS_XANALOG //Port expander Analog pin
312 //Add implementations for following functions. This will prevent default implementation in nz_imod.h from being used:
313 // imod2_ConfDirPin7()
314 // imod2_WritePin7()
315 // imod2_ReadPin7()
316 // imod2_ConfPullupPin7()
317 // imod2_ConfPulldownPin7()
318 
319 
320 
321 // iMod 3 ///////////////////////////////////////
322 #define HAS_IMOD3
323 
324 
325 // iMod 4 ///////////////////////////////////////
326 #define HAS_IMOD4
327 
328 
329 // iMod 5 ///////////////////////////////////////
330 #define HAS_IMOD5
331 
332 
333 // iMod 6 ///////////////////////////////////////
334 #define HAS_IMOD6
335 
336 
337 
338 
339 
343 void pt66din6_Init();
344 
345 
349 void pt66din6_Service();
350 
351 
352 #endif //#if defined(XBRD_PT66DIN6)
353 
354 #endif