Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: epl: run Lindent on *.h files

It's a start, still a mess...

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+3539 -3990
+160 -166
drivers/staging/epl/Benchmark.h
··· 73 73 74 74 #include "global.h" 75 75 76 - 77 76 #if (TARGET_SYSTEM == _NO_OS_) && (DEV_SYSTEM == _DEV_GNU_CF548X_) 78 - #include "common.h" 77 + #include "common.h" 79 78 80 79 #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) 81 80 82 81 // #include <linux/config.h> 83 - #include <linux/kernel.h> 82 + #include <linux/kernel.h> 84 83 85 - #ifdef CONFIG_COLDFIRE 86 - #include <asm/coldfire.h> 87 - #include <asm/m5485gpio.h> 84 + #ifdef CONFIG_COLDFIRE 85 + #include <asm/coldfire.h> 86 + #include <asm/m5485gpio.h> 88 87 89 - #define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1) 90 - #define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1) 91 - #define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5)) 92 - #else 93 - #undef BENCHMARK_MODULES 94 - #define BENCHMARK_MODULES 0x00000000 95 - #endif 88 + #define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1) 89 + #define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1) 90 + #define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5)) 91 + #else 92 + #undef BENCHMARK_MODULES 93 + #define BENCHMARK_MODULES 0x00000000 94 + #endif 96 95 97 96 #else 98 97 // disable Benchmarking 99 - #undef BENCHMARK_MODULES 100 - #define BENCHMARK_MODULES 0x00000000 98 + #undef BENCHMARK_MODULES 99 + #define BENCHMARK_MODULES 0x00000000 101 100 #endif 102 101 103 102 /***************************************************************************/ ··· 148 149 #define BENCHMARK_MOD_31 0x40000000 149 150 #define BENCHMARK_MOD_32 0x80000000 150 151 151 - 152 152 #if (BENCHMARK_MODULES & BENCHMARK_MOD_01) 153 - #define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x) 154 - #define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x) 155 - #define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x) 153 + #define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x) 154 + #define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x) 155 + #define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x) 156 156 #else 157 - #define BENCHMARK_MOD_01_SET(x) 158 - #define BENCHMARK_MOD_01_RESET(x) 159 - #define BENCHMARK_MOD_01_TOGGLE(x) 157 + #define BENCHMARK_MOD_01_SET(x) 158 + #define BENCHMARK_MOD_01_RESET(x) 159 + #define BENCHMARK_MOD_01_TOGGLE(x) 160 160 #endif 161 161 162 162 #if (BENCHMARK_MODULES & BENCHMARK_MOD_02) 163 - #define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x) 164 - #define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x) 165 - #define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x) 163 + #define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x) 164 + #define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x) 165 + #define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x) 166 166 #else 167 - #define BENCHMARK_MOD_02_SET(x) 168 - #define BENCHMARK_MOD_02_RESET(x) 169 - #define BENCHMARK_MOD_02_TOGGLE(x) 167 + #define BENCHMARK_MOD_02_SET(x) 168 + #define BENCHMARK_MOD_02_RESET(x) 169 + #define BENCHMARK_MOD_02_TOGGLE(x) 170 170 #endif 171 171 172 172 #if (BENCHMARK_MODULES & BENCHMARK_MOD_03) 173 - #define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x) 174 - #define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x) 175 - #define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x) 173 + #define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x) 174 + #define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x) 175 + #define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x) 176 176 #else 177 - #define BENCHMARK_MOD_03_SET(x) 178 - #define BENCHMARK_MOD_03_RESET(x) 179 - #define BENCHMARK_MOD_03_TOGGLE(x) 177 + #define BENCHMARK_MOD_03_SET(x) 178 + #define BENCHMARK_MOD_03_RESET(x) 179 + #define BENCHMARK_MOD_03_TOGGLE(x) 180 180 #endif 181 181 182 182 #if (BENCHMARK_MODULES & BENCHMARK_MOD_04) 183 - #define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x) 184 - #define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x) 185 - #define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x) 183 + #define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x) 184 + #define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x) 185 + #define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x) 186 186 #else 187 - #define BENCHMARK_MOD_04_SET(x) 188 - #define BENCHMARK_MOD_04_RESET(x) 189 - #define BENCHMARK_MOD_04_TOGGLE(x) 187 + #define BENCHMARK_MOD_04_SET(x) 188 + #define BENCHMARK_MOD_04_RESET(x) 189 + #define BENCHMARK_MOD_04_TOGGLE(x) 190 190 #endif 191 191 192 192 #if (BENCHMARK_MODULES & BENCHMARK_MOD_05) 193 - #define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x) 194 - #define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x) 195 - #define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x) 193 + #define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x) 194 + #define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x) 195 + #define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x) 196 196 #else 197 - #define BENCHMARK_MOD_05_SET(x) 198 - #define BENCHMARK_MOD_05_RESET(x) 199 - #define BENCHMARK_MOD_05_TOGGLE(x) 197 + #define BENCHMARK_MOD_05_SET(x) 198 + #define BENCHMARK_MOD_05_RESET(x) 199 + #define BENCHMARK_MOD_05_TOGGLE(x) 200 200 #endif 201 201 202 202 #if (BENCHMARK_MODULES & BENCHMARK_MOD_06) 203 - #define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x) 204 - #define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x) 205 - #define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x) 203 + #define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x) 204 + #define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x) 205 + #define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x) 206 206 #else 207 - #define BENCHMARK_MOD_06_SET(x) 208 - #define BENCHMARK_MOD_06_RESET(x) 209 - #define BENCHMARK_MOD_06_TOGGLE(x) 207 + #define BENCHMARK_MOD_06_SET(x) 208 + #define BENCHMARK_MOD_06_RESET(x) 209 + #define BENCHMARK_MOD_06_TOGGLE(x) 210 210 #endif 211 211 212 212 #if (BENCHMARK_MODULES & BENCHMARK_MOD_07) 213 - #define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x) 214 - #define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x) 215 - #define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x) 213 + #define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x) 214 + #define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x) 215 + #define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x) 216 216 #else 217 - #define BENCHMARK_MOD_07_SET(x) 218 - #define BENCHMARK_MOD_07_RESET(x) 219 - #define BENCHMARK_MOD_07_TOGGLE(x) 217 + #define BENCHMARK_MOD_07_SET(x) 218 + #define BENCHMARK_MOD_07_RESET(x) 219 + #define BENCHMARK_MOD_07_TOGGLE(x) 220 220 #endif 221 221 222 222 #if (BENCHMARK_MODULES & BENCHMARK_MOD_08) 223 - #define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x) 224 - #define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x) 225 - #define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x) 223 + #define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x) 224 + #define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x) 225 + #define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x) 226 226 #else 227 - #define BENCHMARK_MOD_08_SET(x) 228 - #define BENCHMARK_MOD_08_RESET(x) 229 - #define BENCHMARK_MOD_08_TOGGLE(x) 227 + #define BENCHMARK_MOD_08_SET(x) 228 + #define BENCHMARK_MOD_08_RESET(x) 229 + #define BENCHMARK_MOD_08_TOGGLE(x) 230 230 #endif 231 231 232 232 #if (BENCHMARK_MODULES & BENCHMARK_MOD_09) 233 - #define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x) 234 - #define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x) 235 - #define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x) 233 + #define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x) 234 + #define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x) 235 + #define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x) 236 236 #else 237 - #define BENCHMARK_MOD_09_SET(x) 238 - #define BENCHMARK_MOD_09_RESET(x) 239 - #define BENCHMARK_MOD_09_TOGGLE(x) 237 + #define BENCHMARK_MOD_09_SET(x) 238 + #define BENCHMARK_MOD_09_RESET(x) 239 + #define BENCHMARK_MOD_09_TOGGLE(x) 240 240 #endif 241 241 242 242 #if (BENCHMARK_MODULES & BENCHMARK_MOD_10) 243 - #define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x) 244 - #define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x) 243 + #define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x) 244 + #define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x) 245 245 #else 246 - #define BENCHMARK_MOD_10_SET(x) 247 - #define BENCHMARK_MOD_10_RESET(x) 246 + #define BENCHMARK_MOD_10_SET(x) 247 + #define BENCHMARK_MOD_10_RESET(x) 248 248 #endif 249 249 250 250 #if (BENCHMARK_MODULES & BENCHMARK_MOD_11) 251 - #define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x) 252 - #define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x) 251 + #define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x) 252 + #define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x) 253 253 #else 254 - #define BENCHMARK_MOD_11_SET(x) 255 - #define BENCHMARK_MOD_11_RESET(x) 254 + #define BENCHMARK_MOD_11_SET(x) 255 + #define BENCHMARK_MOD_11_RESET(x) 256 256 #endif 257 257 258 258 #if (BENCHMARK_MODULES & BENCHMARK_MOD_12) 259 - #define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x) 260 - #define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x) 259 + #define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x) 260 + #define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x) 261 261 #else 262 - #define BENCHMARK_MOD_12_SET(x) 263 - #define BENCHMARK_MOD_12_RESET(x) 262 + #define BENCHMARK_MOD_12_SET(x) 263 + #define BENCHMARK_MOD_12_RESET(x) 264 264 #endif 265 265 266 266 #if (BENCHMARK_MODULES & BENCHMARK_MOD_13) 267 - #define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x) 268 - #define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x) 267 + #define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x) 268 + #define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x) 269 269 #else 270 - #define BENCHMARK_MOD_13_SET(x) 271 - #define BENCHMARK_MOD_13_RESET(x) 270 + #define BENCHMARK_MOD_13_SET(x) 271 + #define BENCHMARK_MOD_13_RESET(x) 272 272 #endif 273 273 274 274 #if (BENCHMARK_MODULES & BENCHMARK_MOD_14) 275 - #define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x) 276 - #define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x) 275 + #define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x) 276 + #define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x) 277 277 #else 278 - #define BENCHMARK_MOD_14_SET(x) 279 - #define BENCHMARK_MOD_14_RESET(x) 278 + #define BENCHMARK_MOD_14_SET(x) 279 + #define BENCHMARK_MOD_14_RESET(x) 280 280 #endif 281 281 282 282 #if (BENCHMARK_MODULES & BENCHMARK_MOD_15) 283 - #define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x) 284 - #define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x) 283 + #define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x) 284 + #define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x) 285 285 #else 286 - #define BENCHMARK_MOD_15_SET(x) 287 - #define BENCHMARK_MOD_15_RESET(x) 286 + #define BENCHMARK_MOD_15_SET(x) 287 + #define BENCHMARK_MOD_15_RESET(x) 288 288 #endif 289 289 290 290 #if (BENCHMARK_MODULES & BENCHMARK_MOD_16) 291 - #define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x) 292 - #define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x) 291 + #define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x) 292 + #define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x) 293 293 #else 294 - #define BENCHMARK_MOD_16_SET(x) 295 - #define BENCHMARK_MOD_16_RESET(x) 294 + #define BENCHMARK_MOD_16_SET(x) 295 + #define BENCHMARK_MOD_16_RESET(x) 296 296 #endif 297 297 298 298 #if (BENCHMARK_MODULES & BENCHMARK_MOD_17) 299 - #define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x) 300 - #define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x) 299 + #define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x) 300 + #define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x) 301 301 #else 302 - #define BENCHMARK_MOD_17_SET(x) 303 - #define BENCHMARK_MOD_17_RESET(x) 302 + #define BENCHMARK_MOD_17_SET(x) 303 + #define BENCHMARK_MOD_17_RESET(x) 304 304 #endif 305 305 306 306 #if (BENCHMARK_MODULES & BENCHMARK_MOD_18) 307 - #define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x) 308 - #define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x) 307 + #define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x) 308 + #define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x) 309 309 #else 310 - #define BENCHMARK_MOD_18_SET(x) 311 - #define BENCHMARK_MOD_18_RESET(x) 310 + #define BENCHMARK_MOD_18_SET(x) 311 + #define BENCHMARK_MOD_18_RESET(x) 312 312 #endif 313 313 314 314 #if (BENCHMARK_MODULES & BENCHMARK_MOD_19) 315 - #define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x) 316 - #define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x) 315 + #define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x) 316 + #define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x) 317 317 #else 318 - #define BENCHMARK_MOD_19_SET(x) 319 - #define BENCHMARK_MOD_19_RESET(x) 318 + #define BENCHMARK_MOD_19_SET(x) 319 + #define BENCHMARK_MOD_19_RESET(x) 320 320 #endif 321 321 322 322 #if (BENCHMARK_MODULES & BENCHMARK_MOD_20) 323 - #define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x) 324 - #define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x) 323 + #define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x) 324 + #define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x) 325 325 #else 326 - #define BENCHMARK_MOD_20_SET(x) 327 - #define BENCHMARK_MOD_20_RESET(x) 326 + #define BENCHMARK_MOD_20_SET(x) 327 + #define BENCHMARK_MOD_20_RESET(x) 328 328 #endif 329 329 330 330 #if (BENCHMARK_MODULES & BENCHMARK_MOD_21) 331 - #define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x) 332 - #define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x) 331 + #define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x) 332 + #define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x) 333 333 #else 334 - #define BENCHMARK_MOD_21_SET(x) 335 - #define BENCHMARK_MOD_21_RESET(x) 334 + #define BENCHMARK_MOD_21_SET(x) 335 + #define BENCHMARK_MOD_21_RESET(x) 336 336 #endif 337 337 338 338 #if (BENCHMARK_MODULES & BENCHMARK_MOD_22) 339 - #define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x) 340 - #define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x) 339 + #define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x) 340 + #define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x) 341 341 #else 342 - #define BENCHMARK_MOD_22_SET(x) 343 - #define BENCHMARK_MOD_22_RESET(x) 342 + #define BENCHMARK_MOD_22_SET(x) 343 + #define BENCHMARK_MOD_22_RESET(x) 344 344 #endif 345 345 346 346 #if (BENCHMARK_MODULES & BENCHMARK_MOD_23) 347 - #define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x) 348 - #define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x) 347 + #define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x) 348 + #define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x) 349 349 #else 350 - #define BENCHMARK_MOD_23_SET(x) 351 - #define BENCHMARK_MOD_23_RESET(x) 350 + #define BENCHMARK_MOD_23_SET(x) 351 + #define BENCHMARK_MOD_23_RESET(x) 352 352 #endif 353 353 354 354 #if (BENCHMARK_MODULES & BENCHMARK_MOD_24) 355 - #define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x) 356 - #define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x) 355 + #define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x) 356 + #define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x) 357 357 #else 358 - #define BENCHMARK_MOD_24_SET(x) 359 - #define BENCHMARK_MOD_24_RESET(x) 358 + #define BENCHMARK_MOD_24_SET(x) 359 + #define BENCHMARK_MOD_24_RESET(x) 360 360 #endif 361 361 362 362 #if (BENCHMARK_MODULES & BENCHMARK_MOD_25) 363 - #define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x) 364 - #define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x) 363 + #define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x) 364 + #define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x) 365 365 #else 366 - #define BENCHMARK_MOD_25_SET(x) 367 - #define BENCHMARK_MOD_25_RESET(x) 366 + #define BENCHMARK_MOD_25_SET(x) 367 + #define BENCHMARK_MOD_25_RESET(x) 368 368 #endif 369 369 370 370 #if (BENCHMARK_MODULES & BENCHMARK_MOD_26) 371 - #define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x) 372 - #define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x) 371 + #define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x) 372 + #define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x) 373 373 #else 374 - #define BENCHMARK_MOD_26_SET(x) 375 - #define BENCHMARK_MOD_26_RESET(x) 374 + #define BENCHMARK_MOD_26_SET(x) 375 + #define BENCHMARK_MOD_26_RESET(x) 376 376 #endif 377 377 378 378 #if (BENCHMARK_MODULES & BENCHMARK_MOD_27) 379 - #define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x) 380 - #define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x) 379 + #define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x) 380 + #define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x) 381 381 #else 382 - #define BENCHMARK_MOD_27_SET(x) 383 - #define BENCHMARK_MOD_27_RESET(x) 382 + #define BENCHMARK_MOD_27_SET(x) 383 + #define BENCHMARK_MOD_27_RESET(x) 384 384 #endif 385 385 386 386 #if (BENCHMARK_MODULES & BENCHMARK_MOD_28) 387 - #define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x) 388 - #define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x) 387 + #define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x) 388 + #define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x) 389 389 #else 390 - #define BENCHMARK_MOD_28_SET(x) 391 - #define BENCHMARK_MOD_28_RESET(x) 390 + #define BENCHMARK_MOD_28_SET(x) 391 + #define BENCHMARK_MOD_28_RESET(x) 392 392 #endif 393 393 394 394 #if (BENCHMARK_MODULES & BENCHMARK_MOD_29) 395 - #define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x) 396 - #define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x) 395 + #define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x) 396 + #define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x) 397 397 #else 398 - #define BENCHMARK_MOD_29_SET(x) 399 - #define BENCHMARK_MOD_29_RESET(x) 398 + #define BENCHMARK_MOD_29_SET(x) 399 + #define BENCHMARK_MOD_29_RESET(x) 400 400 #endif 401 401 402 402 #if (BENCHMARK_MODULES & BENCHMARK_MOD_30) 403 - #define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x) 404 - #define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x) 403 + #define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x) 404 + #define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x) 405 405 #else 406 - #define BENCHMARK_MOD_30_SET(x) 407 - #define BENCHMARK_MOD_30_RESET(x) 406 + #define BENCHMARK_MOD_30_SET(x) 407 + #define BENCHMARK_MOD_30_RESET(x) 408 408 #endif 409 409 410 410 #if (BENCHMARK_MODULES & BENCHMARK_MOD_31) 411 - #define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x) 412 - #define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x) 411 + #define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x) 412 + #define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x) 413 413 #else 414 - #define BENCHMARK_MOD_31_SET(x) 415 - #define BENCHMARK_MOD_31_RESET(x) 414 + #define BENCHMARK_MOD_31_SET(x) 415 + #define BENCHMARK_MOD_31_RESET(x) 416 416 #endif 417 417 418 418 #if (BENCHMARK_MODULES & BENCHMARK_MOD_32) 419 - #define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x) 420 - #define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x) 419 + #define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x) 420 + #define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x) 421 421 #else 422 - #define BENCHMARK_MOD_32_SET(x) 423 - #define BENCHMARK_MOD_32_RESET(x) 422 + #define BENCHMARK_MOD_32_SET(x) 423 + #define BENCHMARK_MOD_32_RESET(x) 424 424 #endif 425 - 426 425 427 426 //--------------------------------------------------------------------------- 428 427 // modul global types 429 428 //--------------------------------------------------------------------------- 430 429 431 - 432 430 //--------------------------------------------------------------------------- 433 431 // local vars 434 432 //--------------------------------------------------------------------------- 435 433 436 - 437 434 //--------------------------------------------------------------------------- 438 435 // local function prototypes 439 436 //--------------------------------------------------------------------------- 440 - 441 437 442 438 #endif // _BENCHMARK_H_
+491 -507
drivers/staging/epl/Debug.h
··· 71 71 72 72 #include "global.h" 73 73 74 - 75 74 /***************************************************************************/ 76 75 /* */ 77 76 /* */ ··· 121 122 #define DEBUG_LVL_ERROR 0x40000000 122 123 #define DEBUG_LVL_ALWAYS 0x80000000 123 124 124 - 125 125 //--------------------------------------------------------------------------- 126 126 // global types 127 127 //--------------------------------------------------------------------------- 128 - 129 128 130 129 //--------------------------------------------------------------------------- 131 130 // global vars 132 131 //--------------------------------------------------------------------------- 133 132 134 - 135 133 //--------------------------------------------------------------------------- 136 134 // global function prototypes 137 135 //--------------------------------------------------------------------------- 138 - 139 136 140 137 //--------------------------------------------------------------------------- 141 138 // global macros ··· 139 144 140 145 //--------------------------------------------------------------------------- 141 146 // this macro defines a version string 142 - #define MAKE_VERSION_STRING(product,appname,verstr,author) \ 143 - "�prd�:" product ",�app�:" appname ",�ver�:" verstr ",�dat�:" __DATE__ ",�aut�:" author 144 147 145 148 146 149 //--------------------------------------------------------------------------- ··· 152 159 prefix "Version: " verstr "\n" \ 153 160 prefix "***************************************************\n\n" 154 161 155 - 156 162 //--------------------------------------------------------------------------- 157 163 // The default debug-level is: ERROR and ALWAYS. 158 164 // You can define an other debug-level in project settings. 159 165 #ifndef DEF_DEBUG_LVL 160 - #define DEF_DEBUG_LVL (DEBUG_LVL_ALWAYS | DEBUG_LVL_ERROR) 166 + #define DEF_DEBUG_LVL (DEBUG_LVL_ALWAYS | DEBUG_LVL_ERROR) 161 167 #endif 162 168 #ifndef DEBUG_GLB_LVL 163 - #define DEBUG_GLB_LVL() (DEF_DEBUG_LVL) 169 + #define DEBUG_GLB_LVL() (DEF_DEBUG_LVL) 164 170 #endif 165 - 166 171 167 172 //--------------------------------------------------------------------------- 168 173 #if (DEV_SYSTEM == _DEV_WIN32_) && defined (TRACE_MSG) ··· 173 182 // 174 183 // Example: DEBUG_TRACE1(DEBUG_LVL_30 | DEBUG_LVL_02, "Hello %d", bCount); 175 184 176 - #define DEBUG_TRACE0(lvl,str) TraceLvl((lvl),str) 177 - #define DEBUG_TRACE1(lvl,str,p1) TraceLvl((lvl),str,p1) 178 - #define DEBUG_TRACE2(lvl,str,p1,p2) TraceLvl((lvl),str,p1,p2) 179 - #define DEBUG_TRACE3(lvl,str,p1,p2,p3) TraceLvl((lvl),str,p1,p2,p3) 180 - #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) TraceLvl((lvl),str,p1,p2,p3,p4) 181 - #define DEBUG_GLB_LVL() dwDebugLevel_g 185 + #define DEBUG_TRACE0(lvl,str) TraceLvl((lvl),str) 186 + #define DEBUG_TRACE1(lvl,str,p1) TraceLvl((lvl),str,p1) 187 + #define DEBUG_TRACE2(lvl,str,p1,p2) TraceLvl((lvl),str,p1,p2) 188 + #define DEBUG_TRACE3(lvl,str,p1,p2,p3) TraceLvl((lvl),str,p1,p2,p3) 189 + #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) TraceLvl((lvl),str,p1,p2,p3,p4) 190 + #define DEBUG_GLB_LVL() dwDebugLevel_g 182 191 183 192 #else 184 193 ··· 189 198 // 190 199 // Example: DEBUG_TRACE1(DEBUG_LVL_ERROR, "error code %d", dwRet); 191 200 192 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_ALWAYS) 193 - #define DEBUG_LVL_ALWAYS_TRACE0(str) TRACE0(str) 194 - #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) TRACE1(str,p1) 195 - #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 196 - #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 197 - #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 198 - #else 199 - #define DEBUG_LVL_ALWAYS_TRACE0(str) 200 - #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) 201 - #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) 202 - #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) 203 - #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) 204 - #endif 205 - 206 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_ERROR) 207 - #define DEBUG_LVL_ERROR_TRACE0(str) TRACE0(str) 208 - #define DEBUG_LVL_ERROR_TRACE1(str,p1) TRACE1(str,p1) 209 - #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 210 - #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 211 - #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 212 - #else 213 - #define DEBUG_LVL_ERROR_TRACE0(str) 214 - #define DEBUG_LVL_ERROR_TRACE1(str,p1) 215 - #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) 216 - #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) 217 - #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) 218 - #endif 219 - 220 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT) 221 - #define DEBUG_LVL_ASSERT_TRACE0(str) TRACE0(str) 222 - #define DEBUG_LVL_ASSERT_TRACE1(str,p1) TRACE1(str,p1) 223 - #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 224 - #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 225 - #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 226 - #else 227 - #define DEBUG_LVL_ASSERT_TRACE0(str) 228 - #define DEBUG_LVL_ASSERT_TRACE1(str,p1) 229 - #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) 230 - #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) 231 - #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) 232 - #endif 233 - 234 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_29) 235 - #define DEBUG_LVL_29_TRACE0(str) TRACE0(str) 236 - #define DEBUG_LVL_29_TRACE1(str,p1) TRACE1(str,p1) 237 - #define DEBUG_LVL_29_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 238 - #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 239 - #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 240 - #else 241 - #define DEBUG_LVL_29_TRACE0(str) 242 - #define DEBUG_LVL_29_TRACE1(str,p1) 243 - #define DEBUG_LVL_29_TRACE2(str,p1,p2) 244 - #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) 245 - #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) 246 - #endif 247 - 248 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_28) 249 - #define DEBUG_LVL_28_TRACE0(str) TRACE0(str) 250 - #define DEBUG_LVL_28_TRACE1(str,p1) TRACE1(str,p1) 251 - #define DEBUG_LVL_28_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 252 - #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 253 - #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 254 - #else 255 - #define DEBUG_LVL_28_TRACE0(str) 256 - #define DEBUG_LVL_28_TRACE1(str,p1) 257 - #define DEBUG_LVL_28_TRACE2(str,p1,p2) 258 - #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) 259 - #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) 260 - #endif 261 - 262 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_27) 263 - #define DEBUG_LVL_27_TRACE0(str) TRACE0(str) 264 - #define DEBUG_LVL_27_TRACE1(str,p1) TRACE1(str,p1) 265 - #define DEBUG_LVL_27_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 266 - #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 267 - #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 268 - #else 269 - #define DEBUG_LVL_27_TRACE0(str) 270 - #define DEBUG_LVL_27_TRACE1(str,p1) 271 - #define DEBUG_LVL_27_TRACE2(str,p1,p2) 272 - #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) 273 - #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) 274 - #endif 275 - 276 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_26) 277 - #define DEBUG_LVL_26_TRACE0(str) TRACE0(str) 278 - #define DEBUG_LVL_26_TRACE1(str,p1) TRACE1(str,p1) 279 - #define DEBUG_LVL_26_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 280 - #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 281 - #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 282 - #else 283 - #define DEBUG_LVL_26_TRACE0(str) 284 - #define DEBUG_LVL_26_TRACE1(str,p1) 285 - #define DEBUG_LVL_26_TRACE2(str,p1,p2) 286 - #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) 287 - #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) 288 - #endif 289 - 290 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_25) 291 - #define DEBUG_LVL_25_TRACE0(str) TRACE0(str) 292 - #define DEBUG_LVL_25_TRACE1(str,p1) TRACE1(str,p1) 293 - #define DEBUG_LVL_25_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 294 - #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 295 - #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 296 - #else 297 - #define DEBUG_LVL_25_TRACE0(str) 298 - #define DEBUG_LVL_25_TRACE1(str,p1) 299 - #define DEBUG_LVL_25_TRACE2(str,p1,p2) 300 - #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) 301 - #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) 302 - #endif 303 - 304 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_24) 305 - #define DEBUG_LVL_24_TRACE0(str) TRACE0(str) 306 - #define DEBUG_LVL_24_TRACE1(str,p1) TRACE1(str,p1) 307 - #define DEBUG_LVL_24_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 308 - #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 309 - #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 310 - #else 311 - #define DEBUG_LVL_24_TRACE0(str) 312 - #define DEBUG_LVL_24_TRACE1(str,p1) 313 - #define DEBUG_LVL_24_TRACE2(str,p1,p2) 314 - #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) 315 - #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) 316 - #endif 317 - 318 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_23) 319 - #define DEBUG_LVL_23_TRACE0(str) TRACE0(str) 320 - #define DEBUG_LVL_23_TRACE1(str,p1) TRACE1(str,p1) 321 - #define DEBUG_LVL_23_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 322 - #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 323 - #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 324 - #else 325 - #define DEBUG_LVL_23_TRACE0(str) 326 - #define DEBUG_LVL_23_TRACE1(str,p1) 327 - #define DEBUG_LVL_23_TRACE2(str,p1,p2) 328 - #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) 329 - #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) 330 - #endif 331 - 332 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_22) 333 - #define DEBUG_LVL_22_TRACE0(str) TRACE0(str) 334 - #define DEBUG_LVL_22_TRACE1(str,p1) TRACE1(str,p1) 335 - #define DEBUG_LVL_22_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 336 - #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 337 - #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 338 - #else 339 - #define DEBUG_LVL_22_TRACE0(str) 340 - #define DEBUG_LVL_22_TRACE1(str,p1) 341 - #define DEBUG_LVL_22_TRACE2(str,p1,p2) 342 - #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) 343 - #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) 344 - #endif 345 - 346 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_21) 347 - #define DEBUG_LVL_21_TRACE0(str) TRACE0(str) 348 - #define DEBUG_LVL_21_TRACE1(str,p1) TRACE1(str,p1) 349 - #define DEBUG_LVL_21_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 350 - #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 351 - #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 352 - #else 353 - #define DEBUG_LVL_21_TRACE0(str) 354 - #define DEBUG_LVL_21_TRACE1(str,p1) 355 - #define DEBUG_LVL_21_TRACE2(str,p1,p2) 356 - #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) 357 - #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) 358 - #endif 359 - 360 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_20) 361 - #define DEBUG_LVL_20_TRACE0(str) TRACE0(str) 362 - #define DEBUG_LVL_20_TRACE1(str,p1) TRACE1(str,p1) 363 - #define DEBUG_LVL_20_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 364 - #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 365 - #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 366 - #else 367 - #define DEBUG_LVL_20_TRACE0(str) 368 - #define DEBUG_LVL_20_TRACE1(str,p1) 369 - #define DEBUG_LVL_20_TRACE2(str,p1,p2) 370 - #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) 371 - #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) 372 - #endif 373 - 374 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_19) 375 - #define DEBUG_LVL_19_TRACE0(str) TRACE0(str) 376 - #define DEBUG_LVL_19_TRACE1(str,p1) TRACE1(str,p1) 377 - #define DEBUG_LVL_19_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 378 - #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 379 - #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 380 - #else 381 - #define DEBUG_LVL_19_TRACE0(str) 382 - #define DEBUG_LVL_19_TRACE1(str,p1) 383 - #define DEBUG_LVL_19_TRACE2(str,p1,p2) 384 - #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) 385 - #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) 386 - #endif 387 - 388 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_18) 389 - #define DEBUG_LVL_18_TRACE0(str) TRACE0(str) 390 - #define DEBUG_LVL_18_TRACE1(str,p1) TRACE1(str,p1) 391 - #define DEBUG_LVL_18_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 392 - #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 393 - #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 394 - #else 395 - #define DEBUG_LVL_18_TRACE0(str) 396 - #define DEBUG_LVL_18_TRACE1(str,p1) 397 - #define DEBUG_LVL_18_TRACE2(str,p1,p2) 398 - #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) 399 - #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) 400 - #endif 401 - 402 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_17) 403 - #define DEBUG_LVL_17_TRACE0(str) TRACE0(str) 404 - #define DEBUG_LVL_17_TRACE1(str,p1) TRACE1(str,p1) 405 - #define DEBUG_LVL_17_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 406 - #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 407 - #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 408 - #else 409 - #define DEBUG_LVL_17_TRACE0(str) 410 - #define DEBUG_LVL_17_TRACE1(str,p1) 411 - #define DEBUG_LVL_17_TRACE2(str,p1,p2) 412 - #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) 413 - #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) 414 - #endif 415 - 416 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_16) 417 - #define DEBUG_LVL_16_TRACE0(str) TRACE0(str) 418 - #define DEBUG_LVL_16_TRACE1(str,p1) TRACE1(str,p1) 419 - #define DEBUG_LVL_16_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 420 - #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 421 - #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 422 - #else 423 - #define DEBUG_LVL_16_TRACE0(str) 424 - #define DEBUG_LVL_16_TRACE1(str,p1) 425 - #define DEBUG_LVL_16_TRACE2(str,p1,p2) 426 - #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) 427 - #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) 428 - #endif 429 - 430 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_15) 431 - #define DEBUG_LVL_15_TRACE0(str) TRACE0(str) 432 - #define DEBUG_LVL_15_TRACE1(str,p1) TRACE1(str,p1) 433 - #define DEBUG_LVL_15_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 434 - #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 435 - #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 436 - #else 437 - #define DEBUG_LVL_15_TRACE0(str) 438 - #define DEBUG_LVL_15_TRACE1(str,p1) 439 - #define DEBUG_LVL_15_TRACE2(str,p1,p2) 440 - #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) 441 - #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) 442 - #endif 443 - 444 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_14) 445 - #define DEBUG_LVL_14_TRACE0(str) TRACE0(str) 446 - #define DEBUG_LVL_14_TRACE1(str,p1) TRACE1(str,p1) 447 - #define DEBUG_LVL_14_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 448 - #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 449 - #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 450 - #else 451 - #define DEBUG_LVL_14_TRACE0(str) 452 - #define DEBUG_LVL_14_TRACE1(str,p1) 453 - #define DEBUG_LVL_14_TRACE2(str,p1,p2) 454 - #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) 455 - #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) 456 - #endif 457 - 458 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_13) 459 - #define DEBUG_LVL_13_TRACE0(str) TRACE0(str) 460 - #define DEBUG_LVL_13_TRACE1(str,p1) TRACE1(str,p1) 461 - #define DEBUG_LVL_13_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 462 - #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 463 - #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 464 - #else 465 - #define DEBUG_LVL_13_TRACE0(str) 466 - #define DEBUG_LVL_13_TRACE1(str,p1) 467 - #define DEBUG_LVL_13_TRACE2(str,p1,p2) 468 - #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) 469 - #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) 470 - #endif 471 - 472 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_12) 473 - #define DEBUG_LVL_12_TRACE0(str) TRACE0(str) 474 - #define DEBUG_LVL_12_TRACE1(str,p1) TRACE1(str,p1) 475 - #define DEBUG_LVL_12_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 476 - #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 477 - #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 478 - #else 479 - #define DEBUG_LVL_12_TRACE0(str) 480 - #define DEBUG_LVL_12_TRACE1(str,p1) 481 - #define DEBUG_LVL_12_TRACE2(str,p1,p2) 482 - #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) 483 - #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) 484 - #endif 485 - 486 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_11) 487 - #define DEBUG_LVL_11_TRACE0(str) TRACE0(str) 488 - #define DEBUG_LVL_11_TRACE1(str,p1) TRACE1(str,p1) 489 - #define DEBUG_LVL_11_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 490 - #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 491 - #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 492 - #else 493 - #define DEBUG_LVL_11_TRACE0(str) 494 - #define DEBUG_LVL_11_TRACE1(str,p1) 495 - #define DEBUG_LVL_11_TRACE2(str,p1,p2) 496 - #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) 497 - #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) 498 - #endif 499 - 500 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_10) 501 - #define DEBUG_LVL_10_TRACE0(str) TRACE0(str) 502 - #define DEBUG_LVL_10_TRACE1(str,p1) TRACE1(str,p1) 503 - #define DEBUG_LVL_10_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 504 - #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 505 - #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 506 - #else 507 - #define DEBUG_LVL_10_TRACE0(str) 508 - #define DEBUG_LVL_10_TRACE1(str,p1) 509 - #define DEBUG_LVL_10_TRACE2(str,p1,p2) 510 - #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) 511 - #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) 512 - #endif 513 - 514 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_09) 515 - #define DEBUG_LVL_09_TRACE0(str) TRACE0(str) 516 - #define DEBUG_LVL_09_TRACE1(str,p1) TRACE1(str,p1) 517 - #define DEBUG_LVL_09_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 518 - #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 519 - #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 520 - #else 521 - #define DEBUG_LVL_09_TRACE0(str) 522 - #define DEBUG_LVL_09_TRACE1(str,p1) 523 - #define DEBUG_LVL_09_TRACE2(str,p1,p2) 524 - #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) 525 - #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) 526 - #endif 527 - 528 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_08) 529 - #define DEBUG_LVL_08_TRACE0(str) TRACE0(str) 530 - #define DEBUG_LVL_08_TRACE1(str,p1) TRACE1(str,p1) 531 - #define DEBUG_LVL_08_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 532 - #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 533 - #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 534 - #else 535 - #define DEBUG_LVL_08_TRACE0(str) 536 - #define DEBUG_LVL_08_TRACE1(str,p1) 537 - #define DEBUG_LVL_08_TRACE2(str,p1,p2) 538 - #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) 539 - #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) 540 - #endif 541 - 542 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_07) 543 - #define DEBUG_LVL_07_TRACE0(str) TRACE0(str) 544 - #define DEBUG_LVL_07_TRACE1(str,p1) TRACE1(str,p1) 545 - #define DEBUG_LVL_07_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 546 - #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 547 - #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 548 - #else 549 - #define DEBUG_LVL_07_TRACE0(str) 550 - #define DEBUG_LVL_07_TRACE1(str,p1) 551 - #define DEBUG_LVL_07_TRACE2(str,p1,p2) 552 - #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) 553 - #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) 554 - #endif 555 - 556 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_06) 557 - #define DEBUG_LVL_06_TRACE0(str) TRACE0(str) 558 - #define DEBUG_LVL_06_TRACE1(str,p1) TRACE1(str,p1) 559 - #define DEBUG_LVL_06_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 560 - #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 561 - #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 562 - #else 563 - #define DEBUG_LVL_06_TRACE0(str) 564 - #define DEBUG_LVL_06_TRACE1(str,p1) 565 - #define DEBUG_LVL_06_TRACE2(str,p1,p2) 566 - #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) 567 - #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) 568 - #endif 569 - 570 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_05) 571 - #define DEBUG_LVL_05_TRACE0(str) TRACE0(str) 572 - #define DEBUG_LVL_05_TRACE1(str,p1) TRACE1(str,p1) 573 - #define DEBUG_LVL_05_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 574 - #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 575 - #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 576 - #else 577 - #define DEBUG_LVL_05_TRACE0(str) 578 - #define DEBUG_LVL_05_TRACE1(str,p1) 579 - #define DEBUG_LVL_05_TRACE2(str,p1,p2) 580 - #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) 581 - #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) 582 - #endif 583 - 584 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_04) 585 - #define DEBUG_LVL_04_TRACE0(str) TRACE0(str) 586 - #define DEBUG_LVL_04_TRACE1(str,p1) TRACE1(str,p1) 587 - #define DEBUG_LVL_04_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 588 - #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 589 - #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 590 - #else 591 - #define DEBUG_LVL_04_TRACE0(str) 592 - #define DEBUG_LVL_04_TRACE1(str,p1) 593 - #define DEBUG_LVL_04_TRACE2(str,p1,p2) 594 - #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) 595 - #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) 596 - #endif 597 - 598 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_03) 599 - #define DEBUG_LVL_03_TRACE0(str) TRACE0(str) 600 - #define DEBUG_LVL_03_TRACE1(str,p1) TRACE1(str,p1) 601 - #define DEBUG_LVL_03_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 602 - #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 603 - #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 604 - #else 605 - #define DEBUG_LVL_03_TRACE0(str) 606 - #define DEBUG_LVL_03_TRACE1(str,p1) 607 - #define DEBUG_LVL_03_TRACE2(str,p1,p2) 608 - #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) 609 - #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) 610 - #endif 611 - 612 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_02) 613 - #define DEBUG_LVL_02_TRACE0(str) TRACE0(str) 614 - #define DEBUG_LVL_02_TRACE1(str,p1) TRACE1(str,p1) 615 - #define DEBUG_LVL_02_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 616 - #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 617 - #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 618 - #else 619 - #define DEBUG_LVL_02_TRACE0(str) 620 - #define DEBUG_LVL_02_TRACE1(str,p1) 621 - #define DEBUG_LVL_02_TRACE2(str,p1,p2) 622 - #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) 623 - #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) 624 - #endif 625 - 626 - #if (DEBUG_GLB_LVL() & DEBUG_LVL_01) 627 - #define DEBUG_LVL_01_TRACE0(str) TRACE0(str) 628 - #define DEBUG_LVL_01_TRACE1(str,p1) TRACE1(str,p1) 629 - #define DEBUG_LVL_01_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 630 - #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 631 - #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 632 - #else 633 - #define DEBUG_LVL_01_TRACE0(str) 634 - #define DEBUG_LVL_01_TRACE1(str,p1) 635 - #define DEBUG_LVL_01_TRACE2(str,p1,p2) 636 - #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) 637 - #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) 638 - #endif 639 - 640 - #define DEBUG_TRACE0(lvl,str) lvl##_TRACE0(str) 641 - #define DEBUG_TRACE1(lvl,str,p1) lvl##_TRACE1(str,p1) 642 - #define DEBUG_TRACE2(lvl,str,p1,p2) lvl##_TRACE2(str,p1,p2) 643 - #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) 644 - #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) 645 - 201 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_ALWAYS) 202 + #define DEBUG_LVL_ALWAYS_TRACE0(str) TRACE0(str) 203 + #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) TRACE1(str,p1) 204 + #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 205 + #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 206 + #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 207 + #else 208 + #define DEBUG_LVL_ALWAYS_TRACE0(str) 209 + #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) 210 + #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) 211 + #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) 212 + #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) 646 213 #endif 647 214 215 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_ERROR) 216 + #define DEBUG_LVL_ERROR_TRACE0(str) TRACE0(str) 217 + #define DEBUG_LVL_ERROR_TRACE1(str,p1) TRACE1(str,p1) 218 + #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 219 + #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 220 + #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 221 + #else 222 + #define DEBUG_LVL_ERROR_TRACE0(str) 223 + #define DEBUG_LVL_ERROR_TRACE1(str,p1) 224 + #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) 225 + #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) 226 + #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) 227 + #endif 228 + 229 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT) 230 + #define DEBUG_LVL_ASSERT_TRACE0(str) TRACE0(str) 231 + #define DEBUG_LVL_ASSERT_TRACE1(str,p1) TRACE1(str,p1) 232 + #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 233 + #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 234 + #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 235 + #else 236 + #define DEBUG_LVL_ASSERT_TRACE0(str) 237 + #define DEBUG_LVL_ASSERT_TRACE1(str,p1) 238 + #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) 239 + #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) 240 + #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) 241 + #endif 242 + 243 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_29) 244 + #define DEBUG_LVL_29_TRACE0(str) TRACE0(str) 245 + #define DEBUG_LVL_29_TRACE1(str,p1) TRACE1(str,p1) 246 + #define DEBUG_LVL_29_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 247 + #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 248 + #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 249 + #else 250 + #define DEBUG_LVL_29_TRACE0(str) 251 + #define DEBUG_LVL_29_TRACE1(str,p1) 252 + #define DEBUG_LVL_29_TRACE2(str,p1,p2) 253 + #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) 254 + #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) 255 + #endif 256 + 257 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_28) 258 + #define DEBUG_LVL_28_TRACE0(str) TRACE0(str) 259 + #define DEBUG_LVL_28_TRACE1(str,p1) TRACE1(str,p1) 260 + #define DEBUG_LVL_28_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 261 + #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 262 + #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 263 + #else 264 + #define DEBUG_LVL_28_TRACE0(str) 265 + #define DEBUG_LVL_28_TRACE1(str,p1) 266 + #define DEBUG_LVL_28_TRACE2(str,p1,p2) 267 + #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) 268 + #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) 269 + #endif 270 + 271 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_27) 272 + #define DEBUG_LVL_27_TRACE0(str) TRACE0(str) 273 + #define DEBUG_LVL_27_TRACE1(str,p1) TRACE1(str,p1) 274 + #define DEBUG_LVL_27_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 275 + #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 276 + #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 277 + #else 278 + #define DEBUG_LVL_27_TRACE0(str) 279 + #define DEBUG_LVL_27_TRACE1(str,p1) 280 + #define DEBUG_LVL_27_TRACE2(str,p1,p2) 281 + #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) 282 + #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) 283 + #endif 284 + 285 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_26) 286 + #define DEBUG_LVL_26_TRACE0(str) TRACE0(str) 287 + #define DEBUG_LVL_26_TRACE1(str,p1) TRACE1(str,p1) 288 + #define DEBUG_LVL_26_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 289 + #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 290 + #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 291 + #else 292 + #define DEBUG_LVL_26_TRACE0(str) 293 + #define DEBUG_LVL_26_TRACE1(str,p1) 294 + #define DEBUG_LVL_26_TRACE2(str,p1,p2) 295 + #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) 296 + #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) 297 + #endif 298 + 299 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_25) 300 + #define DEBUG_LVL_25_TRACE0(str) TRACE0(str) 301 + #define DEBUG_LVL_25_TRACE1(str,p1) TRACE1(str,p1) 302 + #define DEBUG_LVL_25_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 303 + #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 304 + #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 305 + #else 306 + #define DEBUG_LVL_25_TRACE0(str) 307 + #define DEBUG_LVL_25_TRACE1(str,p1) 308 + #define DEBUG_LVL_25_TRACE2(str,p1,p2) 309 + #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) 310 + #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) 311 + #endif 312 + 313 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_24) 314 + #define DEBUG_LVL_24_TRACE0(str) TRACE0(str) 315 + #define DEBUG_LVL_24_TRACE1(str,p1) TRACE1(str,p1) 316 + #define DEBUG_LVL_24_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 317 + #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 318 + #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 319 + #else 320 + #define DEBUG_LVL_24_TRACE0(str) 321 + #define DEBUG_LVL_24_TRACE1(str,p1) 322 + #define DEBUG_LVL_24_TRACE2(str,p1,p2) 323 + #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) 324 + #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) 325 + #endif 326 + 327 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_23) 328 + #define DEBUG_LVL_23_TRACE0(str) TRACE0(str) 329 + #define DEBUG_LVL_23_TRACE1(str,p1) TRACE1(str,p1) 330 + #define DEBUG_LVL_23_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 331 + #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 332 + #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 333 + #else 334 + #define DEBUG_LVL_23_TRACE0(str) 335 + #define DEBUG_LVL_23_TRACE1(str,p1) 336 + #define DEBUG_LVL_23_TRACE2(str,p1,p2) 337 + #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) 338 + #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) 339 + #endif 340 + 341 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_22) 342 + #define DEBUG_LVL_22_TRACE0(str) TRACE0(str) 343 + #define DEBUG_LVL_22_TRACE1(str,p1) TRACE1(str,p1) 344 + #define DEBUG_LVL_22_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 345 + #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 346 + #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 347 + #else 348 + #define DEBUG_LVL_22_TRACE0(str) 349 + #define DEBUG_LVL_22_TRACE1(str,p1) 350 + #define DEBUG_LVL_22_TRACE2(str,p1,p2) 351 + #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) 352 + #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) 353 + #endif 354 + 355 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_21) 356 + #define DEBUG_LVL_21_TRACE0(str) TRACE0(str) 357 + #define DEBUG_LVL_21_TRACE1(str,p1) TRACE1(str,p1) 358 + #define DEBUG_LVL_21_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 359 + #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 360 + #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 361 + #else 362 + #define DEBUG_LVL_21_TRACE0(str) 363 + #define DEBUG_LVL_21_TRACE1(str,p1) 364 + #define DEBUG_LVL_21_TRACE2(str,p1,p2) 365 + #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) 366 + #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) 367 + #endif 368 + 369 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_20) 370 + #define DEBUG_LVL_20_TRACE0(str) TRACE0(str) 371 + #define DEBUG_LVL_20_TRACE1(str,p1) TRACE1(str,p1) 372 + #define DEBUG_LVL_20_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 373 + #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 374 + #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 375 + #else 376 + #define DEBUG_LVL_20_TRACE0(str) 377 + #define DEBUG_LVL_20_TRACE1(str,p1) 378 + #define DEBUG_LVL_20_TRACE2(str,p1,p2) 379 + #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) 380 + #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) 381 + #endif 382 + 383 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_19) 384 + #define DEBUG_LVL_19_TRACE0(str) TRACE0(str) 385 + #define DEBUG_LVL_19_TRACE1(str,p1) TRACE1(str,p1) 386 + #define DEBUG_LVL_19_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 387 + #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 388 + #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 389 + #else 390 + #define DEBUG_LVL_19_TRACE0(str) 391 + #define DEBUG_LVL_19_TRACE1(str,p1) 392 + #define DEBUG_LVL_19_TRACE2(str,p1,p2) 393 + #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) 394 + #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) 395 + #endif 396 + 397 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_18) 398 + #define DEBUG_LVL_18_TRACE0(str) TRACE0(str) 399 + #define DEBUG_LVL_18_TRACE1(str,p1) TRACE1(str,p1) 400 + #define DEBUG_LVL_18_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 401 + #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 402 + #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 403 + #else 404 + #define DEBUG_LVL_18_TRACE0(str) 405 + #define DEBUG_LVL_18_TRACE1(str,p1) 406 + #define DEBUG_LVL_18_TRACE2(str,p1,p2) 407 + #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) 408 + #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) 409 + #endif 410 + 411 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_17) 412 + #define DEBUG_LVL_17_TRACE0(str) TRACE0(str) 413 + #define DEBUG_LVL_17_TRACE1(str,p1) TRACE1(str,p1) 414 + #define DEBUG_LVL_17_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 415 + #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 416 + #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 417 + #else 418 + #define DEBUG_LVL_17_TRACE0(str) 419 + #define DEBUG_LVL_17_TRACE1(str,p1) 420 + #define DEBUG_LVL_17_TRACE2(str,p1,p2) 421 + #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) 422 + #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) 423 + #endif 424 + 425 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_16) 426 + #define DEBUG_LVL_16_TRACE0(str) TRACE0(str) 427 + #define DEBUG_LVL_16_TRACE1(str,p1) TRACE1(str,p1) 428 + #define DEBUG_LVL_16_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 429 + #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 430 + #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 431 + #else 432 + #define DEBUG_LVL_16_TRACE0(str) 433 + #define DEBUG_LVL_16_TRACE1(str,p1) 434 + #define DEBUG_LVL_16_TRACE2(str,p1,p2) 435 + #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) 436 + #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) 437 + #endif 438 + 439 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_15) 440 + #define DEBUG_LVL_15_TRACE0(str) TRACE0(str) 441 + #define DEBUG_LVL_15_TRACE1(str,p1) TRACE1(str,p1) 442 + #define DEBUG_LVL_15_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 443 + #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 444 + #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 445 + #else 446 + #define DEBUG_LVL_15_TRACE0(str) 447 + #define DEBUG_LVL_15_TRACE1(str,p1) 448 + #define DEBUG_LVL_15_TRACE2(str,p1,p2) 449 + #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) 450 + #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) 451 + #endif 452 + 453 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_14) 454 + #define DEBUG_LVL_14_TRACE0(str) TRACE0(str) 455 + #define DEBUG_LVL_14_TRACE1(str,p1) TRACE1(str,p1) 456 + #define DEBUG_LVL_14_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 457 + #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 458 + #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 459 + #else 460 + #define DEBUG_LVL_14_TRACE0(str) 461 + #define DEBUG_LVL_14_TRACE1(str,p1) 462 + #define DEBUG_LVL_14_TRACE2(str,p1,p2) 463 + #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) 464 + #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) 465 + #endif 466 + 467 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_13) 468 + #define DEBUG_LVL_13_TRACE0(str) TRACE0(str) 469 + #define DEBUG_LVL_13_TRACE1(str,p1) TRACE1(str,p1) 470 + #define DEBUG_LVL_13_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 471 + #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 472 + #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 473 + #else 474 + #define DEBUG_LVL_13_TRACE0(str) 475 + #define DEBUG_LVL_13_TRACE1(str,p1) 476 + #define DEBUG_LVL_13_TRACE2(str,p1,p2) 477 + #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) 478 + #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) 479 + #endif 480 + 481 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_12) 482 + #define DEBUG_LVL_12_TRACE0(str) TRACE0(str) 483 + #define DEBUG_LVL_12_TRACE1(str,p1) TRACE1(str,p1) 484 + #define DEBUG_LVL_12_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 485 + #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 486 + #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 487 + #else 488 + #define DEBUG_LVL_12_TRACE0(str) 489 + #define DEBUG_LVL_12_TRACE1(str,p1) 490 + #define DEBUG_LVL_12_TRACE2(str,p1,p2) 491 + #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) 492 + #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) 493 + #endif 494 + 495 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_11) 496 + #define DEBUG_LVL_11_TRACE0(str) TRACE0(str) 497 + #define DEBUG_LVL_11_TRACE1(str,p1) TRACE1(str,p1) 498 + #define DEBUG_LVL_11_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 499 + #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 500 + #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 501 + #else 502 + #define DEBUG_LVL_11_TRACE0(str) 503 + #define DEBUG_LVL_11_TRACE1(str,p1) 504 + #define DEBUG_LVL_11_TRACE2(str,p1,p2) 505 + #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) 506 + #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) 507 + #endif 508 + 509 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_10) 510 + #define DEBUG_LVL_10_TRACE0(str) TRACE0(str) 511 + #define DEBUG_LVL_10_TRACE1(str,p1) TRACE1(str,p1) 512 + #define DEBUG_LVL_10_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 513 + #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 514 + #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 515 + #else 516 + #define DEBUG_LVL_10_TRACE0(str) 517 + #define DEBUG_LVL_10_TRACE1(str,p1) 518 + #define DEBUG_LVL_10_TRACE2(str,p1,p2) 519 + #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) 520 + #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) 521 + #endif 522 + 523 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_09) 524 + #define DEBUG_LVL_09_TRACE0(str) TRACE0(str) 525 + #define DEBUG_LVL_09_TRACE1(str,p1) TRACE1(str,p1) 526 + #define DEBUG_LVL_09_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 527 + #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 528 + #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 529 + #else 530 + #define DEBUG_LVL_09_TRACE0(str) 531 + #define DEBUG_LVL_09_TRACE1(str,p1) 532 + #define DEBUG_LVL_09_TRACE2(str,p1,p2) 533 + #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) 534 + #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) 535 + #endif 536 + 537 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_08) 538 + #define DEBUG_LVL_08_TRACE0(str) TRACE0(str) 539 + #define DEBUG_LVL_08_TRACE1(str,p1) TRACE1(str,p1) 540 + #define DEBUG_LVL_08_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 541 + #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 542 + #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 543 + #else 544 + #define DEBUG_LVL_08_TRACE0(str) 545 + #define DEBUG_LVL_08_TRACE1(str,p1) 546 + #define DEBUG_LVL_08_TRACE2(str,p1,p2) 547 + #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) 548 + #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) 549 + #endif 550 + 551 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_07) 552 + #define DEBUG_LVL_07_TRACE0(str) TRACE0(str) 553 + #define DEBUG_LVL_07_TRACE1(str,p1) TRACE1(str,p1) 554 + #define DEBUG_LVL_07_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 555 + #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 556 + #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 557 + #else 558 + #define DEBUG_LVL_07_TRACE0(str) 559 + #define DEBUG_LVL_07_TRACE1(str,p1) 560 + #define DEBUG_LVL_07_TRACE2(str,p1,p2) 561 + #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) 562 + #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) 563 + #endif 564 + 565 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_06) 566 + #define DEBUG_LVL_06_TRACE0(str) TRACE0(str) 567 + #define DEBUG_LVL_06_TRACE1(str,p1) TRACE1(str,p1) 568 + #define DEBUG_LVL_06_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 569 + #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 570 + #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 571 + #else 572 + #define DEBUG_LVL_06_TRACE0(str) 573 + #define DEBUG_LVL_06_TRACE1(str,p1) 574 + #define DEBUG_LVL_06_TRACE2(str,p1,p2) 575 + #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) 576 + #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) 577 + #endif 578 + 579 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_05) 580 + #define DEBUG_LVL_05_TRACE0(str) TRACE0(str) 581 + #define DEBUG_LVL_05_TRACE1(str,p1) TRACE1(str,p1) 582 + #define DEBUG_LVL_05_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 583 + #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 584 + #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 585 + #else 586 + #define DEBUG_LVL_05_TRACE0(str) 587 + #define DEBUG_LVL_05_TRACE1(str,p1) 588 + #define DEBUG_LVL_05_TRACE2(str,p1,p2) 589 + #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) 590 + #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) 591 + #endif 592 + 593 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_04) 594 + #define DEBUG_LVL_04_TRACE0(str) TRACE0(str) 595 + #define DEBUG_LVL_04_TRACE1(str,p1) TRACE1(str,p1) 596 + #define DEBUG_LVL_04_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 597 + #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 598 + #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 599 + #else 600 + #define DEBUG_LVL_04_TRACE0(str) 601 + #define DEBUG_LVL_04_TRACE1(str,p1) 602 + #define DEBUG_LVL_04_TRACE2(str,p1,p2) 603 + #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) 604 + #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) 605 + #endif 606 + 607 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_03) 608 + #define DEBUG_LVL_03_TRACE0(str) TRACE0(str) 609 + #define DEBUG_LVL_03_TRACE1(str,p1) TRACE1(str,p1) 610 + #define DEBUG_LVL_03_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 611 + #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 612 + #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 613 + #else 614 + #define DEBUG_LVL_03_TRACE0(str) 615 + #define DEBUG_LVL_03_TRACE1(str,p1) 616 + #define DEBUG_LVL_03_TRACE2(str,p1,p2) 617 + #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) 618 + #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) 619 + #endif 620 + 621 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_02) 622 + #define DEBUG_LVL_02_TRACE0(str) TRACE0(str) 623 + #define DEBUG_LVL_02_TRACE1(str,p1) TRACE1(str,p1) 624 + #define DEBUG_LVL_02_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 625 + #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 626 + #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 627 + #else 628 + #define DEBUG_LVL_02_TRACE0(str) 629 + #define DEBUG_LVL_02_TRACE1(str,p1) 630 + #define DEBUG_LVL_02_TRACE2(str,p1,p2) 631 + #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) 632 + #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) 633 + #endif 634 + 635 + #if (DEBUG_GLB_LVL() & DEBUG_LVL_01) 636 + #define DEBUG_LVL_01_TRACE0(str) TRACE0(str) 637 + #define DEBUG_LVL_01_TRACE1(str,p1) TRACE1(str,p1) 638 + #define DEBUG_LVL_01_TRACE2(str,p1,p2) TRACE2(str,p1,p2) 639 + #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) 640 + #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) 641 + #else 642 + #define DEBUG_LVL_01_TRACE0(str) 643 + #define DEBUG_LVL_01_TRACE1(str,p1) 644 + #define DEBUG_LVL_01_TRACE2(str,p1,p2) 645 + #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) 646 + #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) 647 + #endif 648 + 649 + #define DEBUG_TRACE0(lvl,str) lvl##_TRACE0(str) 650 + #define DEBUG_TRACE1(lvl,str,p1) lvl##_TRACE1(str,p1) 651 + #define DEBUG_TRACE2(lvl,str,p1,p2) lvl##_TRACE2(str,p1,p2) 652 + #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) 653 + #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) 654 + 655 + #endif 648 656 649 657 //--------------------------------------------------------------------------- 650 658 // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump ··· 651 661 // NOTE: DUMP_DATA has to be defined in project settings. 652 662 #if (!defined (NDEBUG) && defined (DUMP_DATA)) || (DEV_SYSTEM == _DEV_WIN32_) 653 663 654 - #ifdef __cplusplus 655 - extern "C" 656 - { 657 - #endif 658 - 659 - void DumpData (char* szStr_p, BYTE MEM* pbData_p, WORD wSize_p); 660 - 661 - #ifdef __cplusplus 662 - } // von extern "C" 663 - #endif 664 - 665 - #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \ 666 - DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz)); 667 - 668 - #else 669 - 670 - #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) 671 - 664 + #ifdef __cplusplus 665 + extern "C" { 672 666 #endif 673 667 668 + void DumpData(char *szStr_p, BYTE MEM * pbData_p, WORD wSize_p); 669 + 670 + #ifdef __cplusplus 671 + } // von extern "C" 672 + #endif 673 + #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \ 674 + DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz)); 675 + #else 676 + 677 + #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) 678 + 679 + #endif 674 680 675 681 //--------------------------------------------------------------------------- 676 682 // The macro DEBUG_ASSERT() can be used to print out an error string if the ··· 675 689 // deleted from compiler (in release version too). 676 690 #if !defined (NDEBUG) || defined (DEBUG_KEEP_ASSERT) 677 691 678 - #if (DEV_SYSTEM == _DEV_WIN32_) 692 + #if (DEV_SYSTEM == _DEV_WIN32_) 679 693 680 - // For WIN32 process will be killed after closing message box. 694 + // For WIN32 process will be killed after closing message box. 681 695 682 - #define DEBUG_ASSERT0(expr,str) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ 696 + #define DEBUG_ASSERT0(expr,str) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ 683 697 MessageBox (NULL, \ 684 698 "Assertion failed: line " __LINE__ " file " __FILE__ \ 685 699 "\n -> " str "\n"); \ 686 700 ExitProcess (-1); } 687 701 688 - #define DEBUG_ASSERT1(expr,str,p1) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ 702 + #define DEBUG_ASSERT1(expr,str,p1) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ 689 703 MessageBox (NULL, \ 690 704 "Assertion failed: line " __LINE__ " file " __FILE__ \ 691 705 "\n -> " str "\n"); \ 692 706 ExitProcess (-1); } 693 707 694 - #else 708 + #else 695 709 696 - // For microcontrollers process will be stopped using endless loop. 710 + // For microcontrollers process will be stopped using endless loop. 697 711 698 - #define DEBUG_ASSERT0(expr,str) if (!(expr )) { \ 712 + #define DEBUG_ASSERT0(expr,str) if (!(expr )) { \ 699 713 DEBUG_LVL_ASSERT_TRACE3 ( \ 700 714 "Assertion failed: line %d file '%s'\n" \ 701 715 " -> '%s'\n", __LINE__, __FILE__, str); \ 702 716 while (1); } 703 717 704 - #define DEBUG_ASSERT1(expr,str,p1) if (!(expr )) { \ 718 + #define DEBUG_ASSERT1(expr,str,p1) if (!(expr )) { \ 705 719 DEBUG_LVL_ASSERT_TRACE4 ( \ 706 720 "Assertion failed: line %d file '%s'\n" \ 707 721 " -> '%s'\n" \ 708 722 " -> 0x%08lX\n", __LINE__, __FILE__, str, (DWORD) p1); \ 709 723 while (1); } 710 724 711 - #endif 725 + #endif 712 726 713 727 #else 714 728 715 - #define DEBUG_ASSERT0(expr,str) 716 - #define DEBUG_ASSERT1(expr,str,p1) 729 + #define DEBUG_ASSERT0(expr,str) 730 + #define DEBUG_ASSERT1(expr,str,p1) 717 731 718 732 #endif 719 - 720 733 721 734 //--------------------------------------------------------------------------- 722 735 // The macro DEBUG_ONLY() implements code, if NDEBUG is not defined. 723 736 #if !defined (DEBUG_ONLY) 724 - #if !defined (NDEBUG) 737 + #if !defined (NDEBUG) 725 738 726 - #define DEBUG_ONLY(expr) expr 739 + #define DEBUG_ONLY(expr) expr 727 740 728 - #else 741 + #else 729 742 730 - #define DEBUG_ONLY(expr) 743 + #define DEBUG_ONLY(expr) 731 744 732 - #endif 733 745 #endif 734 - 746 + #endif 735 747 736 748 #endif // _DEBUG_H_
+6 -18
drivers/staging/epl/EdrvFec.h
··· 73 73 #ifndef _EDRVFEC_H_ 74 74 #define _EDRVFEC_H_ 75 75 76 - 77 76 //--------------------------------------------------------------------------- 78 77 // const defines 79 78 //--------------------------------------------------------------------------- 80 79 // do this in config header 81 80 #define TARGET_HARDWARE TGTHW_SPLC_CF54 82 81 83 - 84 82 // base addresses 85 83 #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) 86 84 87 - 88 85 #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) 89 - 90 86 91 87 #else 92 88 93 - #error 'ERROR: Target was never implemented!' 89 + #error 'ERROR: Target was never implemented!' 94 90 95 91 #endif 96 - 97 - 98 92 99 93 //--------------------------------------------------------------------------- 100 94 // types 101 95 //--------------------------------------------------------------------------- 102 96 103 - 104 97 // Rx and Tx buffer descriptor format 105 - typedef struct 106 - { 107 - WORD m_wStatus; // control / status --- used by edrv, do not change in application 108 - WORD m_wLength; // transfer length 109 - BYTE * m_pbData; // buffer address 98 + typedef struct { 99 + WORD m_wStatus; // control / status --- used by edrv, do not change in application 100 + WORD m_wLength; // transfer length 101 + BYTE *m_pbData; // buffer address 110 102 } tBufferDescr; 111 103 112 104 #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) ··· 111 119 // function prototypes 112 120 //--------------------------------------------------------------------------- 113 121 114 - 115 - 116 - #endif // #ifndef _EDRV_FEC_H_ 117 - 118 - 122 + #endif // #ifndef _EDRV_FEC_H_
+92 -99
drivers/staging/epl/EdrvFec5282.h
··· 73 73 #ifndef _EDRVFEC_H_ 74 74 #define _EDRVFEC_H_ 75 75 76 - 77 76 //--------------------------------------------------------------------------- 78 77 // const defines 79 78 //--------------------------------------------------------------------------- 80 79 // base addresses 81 80 #define FEC0_ADDR 0x0000 82 - #define FEC1_ADDR 0x0000 //tbd 81 + #define FEC1_ADDR 0x0000 //tbd 83 82 84 83 // control / status registers 85 - #define FEC_EIR 0x1004 // interrupt event register 86 - #define FEC_EIMR 0x1008 // interrupt mask register 87 - #define FEC_RDAR 0x1010 // receive descriptor active register 88 - #define FEC_TDAR 0x1014 // transmit descriptor active register 89 - #define FEC_ECR 0x1024 // ethernet control register 90 - #define FEC_MMFR 0x1040 // MII data register 91 - #define FEC_MSCR 0x1044 // MII speed register 92 - #define FEC_MIBC 0x1064 // MIB control/status register 93 - #define FEC_RCR 0x1084 // receive control register 94 - #define FEC_TCR 0x10C4 // transmit control register 95 - #define FEC_PALR 0x10E4 // physical address low register 96 - #define FEC_PAUR 0x10E8 // physical address high + type register 97 - #define FEC_OPD 0x10EC // opcode + pause register 98 - #define FEC_IAUR 0x1118 // upper 32 bit of individual hash table 99 - #define FEC_IALR 0x111C // lower 32 bit of individual hash table 100 - #define FEC_GAUR 0x1120 // upper 32 bit of group hash table 101 - #define FEC_GALR 0x1124 // lower 32 bit of group hash table 102 - #define FEC_TFWR 0x1144 // transmit FIFO watermark 103 - #define FEC_FRBR 0x114C // FIFO receive bound register 104 - #define FEC_FRSR 0x1150 // FIFO receive FIFO start register 105 - #define FEC_ERDSR 0x1180 // pointer to receive descriptor ring 106 - #define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring 107 - #define FEC_EMRBR 0x1188 // maximum receive buffer size 84 + #define FEC_EIR 0x1004 // interrupt event register 85 + #define FEC_EIMR 0x1008 // interrupt mask register 86 + #define FEC_RDAR 0x1010 // receive descriptor active register 87 + #define FEC_TDAR 0x1014 // transmit descriptor active register 88 + #define FEC_ECR 0x1024 // ethernet control register 89 + #define FEC_MMFR 0x1040 // MII data register 90 + #define FEC_MSCR 0x1044 // MII speed register 91 + #define FEC_MIBC 0x1064 // MIB control/status register 92 + #define FEC_RCR 0x1084 // receive control register 93 + #define FEC_TCR 0x10C4 // transmit control register 94 + #define FEC_PALR 0x10E4 // physical address low register 95 + #define FEC_PAUR 0x10E8 // physical address high + type register 96 + #define FEC_OPD 0x10EC // opcode + pause register 97 + #define FEC_IAUR 0x1118 // upper 32 bit of individual hash table 98 + #define FEC_IALR 0x111C // lower 32 bit of individual hash table 99 + #define FEC_GAUR 0x1120 // upper 32 bit of group hash table 100 + #define FEC_GALR 0x1124 // lower 32 bit of group hash table 101 + #define FEC_TFWR 0x1144 // transmit FIFO watermark 102 + #define FEC_FRBR 0x114C // FIFO receive bound register 103 + #define FEC_FRSR 0x1150 // FIFO receive FIFO start register 104 + #define FEC_ERDSR 0x1180 // pointer to receive descriptor ring 105 + #define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring 106 + #define FEC_EMRBR 0x1188 // maximum receive buffer size 108 107 109 108 // mib block counters memory map 110 - #define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly 111 - #define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count 112 - #define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets 113 - #define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets 114 - #define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error 115 - #define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC 116 - #define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC 117 - #define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC 118 - #define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC 119 - #define FEC_RMON_T_COL 0x1224 // RMON tx collision count 120 - #define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets 121 - #define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets 122 - #define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets 123 - #define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets 124 - #define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets 125 - #define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets 126 - #define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes 127 - #define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets 128 - #define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly 129 - #define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK 130 - #define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision 131 - #define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions 132 - #define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay 133 - #define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions 134 - #define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions 135 - #define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun 136 - #define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error 137 - #define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error 138 - #define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted 139 - #define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error 140 - #define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count 141 - #define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets 142 - #define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets 143 - #define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error 144 - #define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC 145 - #define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC 146 - #define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC 147 - #define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC 148 - #define FEC_RMON_R_RESVD_0 0x12A4 // 149 - #define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets 150 - #define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets 151 - #define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets 152 - #define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets 153 - #define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets 154 - #define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets 155 - #define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes 156 - #define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets 157 - #define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly 158 - #define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK 159 - #define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error 160 - #define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error 161 - #define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count 162 - #define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received 163 - #define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error 109 + #define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly 110 + #define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count 111 + #define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets 112 + #define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets 113 + #define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error 114 + #define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC 115 + #define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC 116 + #define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC 117 + #define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC 118 + #define FEC_RMON_T_COL 0x1224 // RMON tx collision count 119 + #define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets 120 + #define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets 121 + #define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets 122 + #define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets 123 + #define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets 124 + #define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets 125 + #define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes 126 + #define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets 127 + #define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly 128 + #define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK 129 + #define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision 130 + #define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions 131 + #define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay 132 + #define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions 133 + #define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions 134 + #define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun 135 + #define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error 136 + #define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error 137 + #define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted 138 + #define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error 139 + #define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count 140 + #define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets 141 + #define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets 142 + #define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error 143 + #define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC 144 + #define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC 145 + #define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC 146 + #define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC 147 + #define FEC_RMON_R_RESVD_0 0x12A4 // 148 + #define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets 149 + #define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets 150 + #define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets 151 + #define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets 152 + #define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets 153 + #define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets 154 + #define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes 155 + #define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets 156 + #define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly 157 + #define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK 158 + #define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error 159 + #define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error 160 + #define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count 161 + #define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received 162 + #define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error 164 163 165 164 // register bit definitions and macros 166 165 #define FEC_EIR_UN (0x00080000) ··· 314 315 //--------------------------------------------------------------------------- 315 316 316 317 // Rx and Tx buffer descriptor format 317 - typedef struct 318 - { 319 - WORD m_wStatus; // control / status --- used by edrv, do not change in application 320 - WORD m_wLength; // transfer length 321 - BYTE * m_pbData; // buffer address 318 + typedef struct { 319 + WORD m_wStatus; // control / status --- used by edrv, do not change in application 320 + WORD m_wLength; // transfer length 321 + BYTE *m_pbData; // buffer address 322 322 } tBufferDescr; 323 323 324 324 //--------------------------------------------------------------------------- ··· 325 327 //--------------------------------------------------------------------------- 326 328 327 329 #if (NO_OF_INSTANCES > 1) 328 - #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val) 329 - #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off])) 330 + #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val) 331 + #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off])) 330 332 #else 331 - #if (EDRV_USED_ETH_CTRL == 0) 332 - #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val) 333 - #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off])) 334 - #else 335 - #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val) 336 - #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off])) 337 - #endif 333 + #if (EDRV_USED_ETH_CTRL == 0) 334 + #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val) 335 + #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off])) 336 + #else 337 + #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val) 338 + #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off])) 339 + #endif 338 340 #endif 339 341 340 - 341 - 342 - 343 - #endif // #ifndef _EDRV_FEC_H_ 344 - 345 - 342 + #endif // #ifndef _EDRV_FEC_H_
+3 -8
drivers/staging/epl/EdrvSim.h
··· 71 71 #ifndef _EDRVSIM_H_ 72 72 #define _EDRVSIM_H_ 73 73 74 - 75 74 //--------------------------------------------------------------------------- 76 75 // const defines 77 76 //--------------------------------------------------------------------------- ··· 79 80 // types 80 81 //--------------------------------------------------------------------------- 81 82 82 - 83 83 //--------------------------------------------------------------------------- 84 84 // function prototypes 85 85 //--------------------------------------------------------------------------- 86 86 87 - void EdrvRxInterruptHandler (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); 87 + void EdrvRxInterruptHandler(BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, 88 + WORD wDataLen_p); 88 89 89 - 90 - 91 - #endif // #ifndef _EDRVSIM_H_ 92 - 93 - 90 + #endif // #ifndef _EDRVSIM_H_
+130 -161
drivers/staging/epl/Epl.h
··· 66 66 67 67 2006/05/22 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_API_H_ ··· 81 82 // const defines 82 83 //--------------------------------------------------------------------------- 83 84 84 - 85 85 //--------------------------------------------------------------------------- 86 86 // typedef 87 87 //--------------------------------------------------------------------------- 88 88 89 - 90 - typedef struct 91 - { 92 - unsigned int m_uiNodeId; 93 - tEplNmtState m_NmtState; 94 - tEplNmtNodeEvent m_NodeEvent; 95 - WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError 96 - BOOL m_fMandatory; 89 + typedef struct { 90 + unsigned int m_uiNodeId; 91 + tEplNmtState m_NmtState; 92 + tEplNmtNodeEvent m_NodeEvent; 93 + WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError 94 + BOOL m_fMandatory; 97 95 98 96 } tEplApiEventNode; 99 97 100 - 101 - typedef struct 102 - { 103 - tEplNmtState m_NmtState; // local NMT state 104 - tEplNmtBootEvent m_BootEvent; 105 - WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError 98 + typedef struct { 99 + tEplNmtState m_NmtState; // local NMT state 100 + tEplNmtBootEvent m_BootEvent; 101 + WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError 106 102 107 103 } tEplApiEventBoot; 108 104 109 - 110 - typedef struct 111 - { 112 - tEplLedType m_LedType; // type of the LED (e.g. Status or Error) 113 - BOOL m_fOn; // state of the LED (e.g. on or off) 105 + typedef struct { 106 + tEplLedType m_LedType; // type of the LED (e.g. Status or Error) 107 + BOOL m_fOn; // state of the LED (e.g. on or off) 114 108 115 109 } tEplApiEventLed; 116 110 117 - 118 - typedef enum 119 - { 120 - kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange 111 + typedef enum { 112 + kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange 121 113 // kEplApiEventRequestNmt = 0x11, // m_bNmtCmd 122 - kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted 123 - kEplApiEventWarning = 0x13, // m_InternalError, Stack running 124 - kEplApiEventNode = 0x20, // m_Node 125 - kEplApiEventBoot = 0x21, // m_Boot 126 - kEplApiEventSdo = 0x62, // m_Sdo 127 - kEplApiEventObdAccess = 0x69, // m_ObdCbParam 128 - kEplApiEventLed = 0x70, // m_Led 114 + kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted 115 + kEplApiEventWarning = 0x13, // m_InternalError, Stack running 116 + kEplApiEventNode = 0x20, // m_Node 117 + kEplApiEventBoot = 0x21, // m_Boot 118 + kEplApiEventSdo = 0x62, // m_Sdo 119 + kEplApiEventObdAccess = 0x69, // m_ObdCbParam 120 + kEplApiEventLed = 0x70, // m_Led 129 121 130 122 } tEplApiEventType; 131 123 132 - 133 - typedef union 134 - { 135 - tEplEventNmtStateChange m_NmtStateChange; 136 - tEplEventError m_InternalError; 137 - tEplSdoComFinished m_Sdo; 138 - tEplObdCbParam m_ObdCbParam; 139 - tEplApiEventNode m_Node; 140 - tEplApiEventBoot m_Boot; 141 - tEplApiEventLed m_Led; 124 + typedef union { 125 + tEplEventNmtStateChange m_NmtStateChange; 126 + tEplEventError m_InternalError; 127 + tEplSdoComFinished m_Sdo; 128 + tEplObdCbParam m_ObdCbParam; 129 + tEplApiEventNode m_Node; 130 + tEplApiEventBoot m_Boot; 131 + tEplApiEventLed m_Led; 142 132 143 133 } tEplApiEventArg; 144 134 135 + typedef tEplKernel(PUBLIC ROM * tEplApiCbEvent) (tEplApiEventType EventType_p, // IN: event type (enum) 136 + tEplApiEventArg * pEventArg_p, // IN: event argument (union) 137 + void GENERIC * pUserArg_p); 145 138 146 - typedef tEplKernel (PUBLIC ROM* tEplApiCbEvent) ( 147 - tEplApiEventType EventType_p, // IN: event type (enum) 148 - tEplApiEventArg* pEventArg_p, // IN: event argument (union) 149 - void GENERIC* pUserArg_p); 139 + typedef struct { 140 + unsigned int m_uiSizeOfStruct; 141 + BOOL m_fAsyncOnly; // do not need to register PRes 142 + unsigned int m_uiNodeId; // local node ID 143 + BYTE m_abMacAddress[6]; // local MAC address 150 144 145 + // 0x1F82: NMT_FeatureFlags_U32 146 + DWORD m_dwFeatureFlags; 147 + // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] 148 + DWORD m_dwCycleLen; // required for error detection 149 + // 0x1F98: NMT_CycleTiming_REC 150 + // 0x1F98.1: IsochrTxMaxPayload_U16 151 + unsigned int m_uiIsochrTxMaxPayload; // const 152 + // 0x1F98.2: IsochrRxMaxPayload_U16 153 + unsigned int m_uiIsochrRxMaxPayload; // const 154 + // 0x1F98.3: PResMaxLatency_U32 155 + DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes 156 + // 0x1F98.4: PReqActPayloadLimit_U16 157 + unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes) 158 + // 0x1F98.5: PResActPayloadLimit_U16 159 + unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes) 160 + // 0x1F98.6: ASndMaxLatency_U32 161 + DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes 162 + // 0x1F98.7: MultiplCycleCnt_U8 163 + unsigned int m_uiMultiplCycleCnt; // required for error detection 164 + // 0x1F98.8: AsyncMTU_U16 165 + unsigned int m_uiAsyncMtu; // required to set up max frame size 166 + // 0x1F98.9: Prescaler_U16 167 + unsigned int m_uiPrescaler; // required for sync 168 + // $$$ Multiplexed Slot 151 169 152 - typedef struct 153 - { 154 - unsigned int m_uiSizeOfStruct; 155 - BOOL m_fAsyncOnly; // do not need to register PRes 156 - unsigned int m_uiNodeId; // local node ID 157 - BYTE m_abMacAddress[6]; // local MAC address 170 + // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] 171 + DWORD m_dwLossOfFrameTolerance; 158 172 159 - // 0x1F82: NMT_FeatureFlags_U32 160 - DWORD m_dwFeatureFlags; 161 - // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] 162 - DWORD m_dwCycleLen; // required for error detection 163 - // 0x1F98: NMT_CycleTiming_REC 164 - // 0x1F98.1: IsochrTxMaxPayload_U16 165 - unsigned int m_uiIsochrTxMaxPayload; // const 166 - // 0x1F98.2: IsochrRxMaxPayload_U16 167 - unsigned int m_uiIsochrRxMaxPayload; // const 168 - // 0x1F98.3: PResMaxLatency_U32 169 - DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes 170 - // 0x1F98.4: PReqActPayloadLimit_U16 171 - unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes) 172 - // 0x1F98.5: PResActPayloadLimit_U16 173 - unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes) 174 - // 0x1F98.6: ASndMaxLatency_U32 175 - DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes 176 - // 0x1F98.7: MultiplCycleCnt_U8 177 - unsigned int m_uiMultiplCycleCnt; // required for error detection 178 - // 0x1F98.8: AsyncMTU_U16 179 - unsigned int m_uiAsyncMtu; // required to set up max frame size 180 - // 0x1F98.9: Prescaler_U16 181 - unsigned int m_uiPrescaler; // required for sync 182 - // $$$ Multiplexed Slot 173 + // 0x1F8A: NMT_MNCycleTiming_REC 174 + // 0x1F8A.1: WaitSoCPReq_U32 in [ns] 175 + DWORD m_dwWaitSocPreq; 183 176 184 - // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] 185 - DWORD m_dwLossOfFrameTolerance; 177 + // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] 178 + DWORD m_dwAsyncSlotTimeout; 186 179 187 - // 0x1F8A: NMT_MNCycleTiming_REC 188 - // 0x1F8A.1: WaitSoCPReq_U32 in [ns] 189 - DWORD m_dwWaitSocPreq; 180 + DWORD m_dwDeviceType; // NMT_DeviceType_U32 181 + DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 182 + DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 183 + DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 184 + DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 185 + QWORD m_qwVendorSpecificExt1; 186 + DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 187 + DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 188 + DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 189 + DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 190 + DWORD m_dwIpAddress; 191 + DWORD m_dwSubnetMask; 192 + DWORD m_dwDefaultGateway; 193 + BYTE m_sHostname[32]; 194 + BYTE m_abVendorSpecificExt2[48]; 190 195 191 - // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] 192 - DWORD m_dwAsyncSlotTimeout; 196 + char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) 197 + char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) 198 + char *m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD) 193 199 194 - DWORD m_dwDeviceType; // NMT_DeviceType_U32 195 - DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 196 - DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 197 - DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 198 - DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 199 - QWORD m_qwVendorSpecificExt1; 200 - DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 201 - DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 202 - DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 203 - DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 204 - DWORD m_dwIpAddress; 205 - DWORD m_dwSubnetMask; 206 - DWORD m_dwDefaultGateway; 207 - BYTE m_sHostname[32]; 208 - BYTE m_abVendorSpecificExt2[48]; 209 - 210 - char* m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) 211 - char* m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) 212 - char* m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD) 213 - 214 - tEplApiCbEvent m_pfnCbEvent; 215 - void* m_pEventUserArg; 216 - tEplSyncCb m_pfnCbSync; 200 + tEplApiCbEvent m_pfnCbEvent; 201 + void *m_pEventUserArg; 202 + tEplSyncCb m_pfnCbSync; 217 203 218 204 } tEplApiInitParam; 219 205 220 - 221 - typedef struct 222 - { 223 - void* m_pImage; 224 - unsigned int m_uiSize; 206 + typedef struct { 207 + void *m_pImage; 208 + unsigned int m_uiSize; 225 209 226 210 } tEplApiProcessImage; 227 - 228 211 229 212 //--------------------------------------------------------------------------- 230 213 // function prototypes 231 214 //--------------------------------------------------------------------------- 232 215 233 - tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam* pInitParam_p); 216 + tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam * pInitParam_p); 234 217 235 218 tEplKernel PUBLIC EplApiShutdown(void); 236 219 237 - tEplKernel PUBLIC EplApiReadObject( 238 - tEplSdoComConHdl* pSdoComConHdl_p, 239 - unsigned int uiNodeId_p, 240 - unsigned int uiIndex_p, 241 - unsigned int uiSubindex_p, 242 - void* pDstData_le_p, 243 - unsigned int* puiSize_p, 244 - tEplSdoType SdoType_p, 245 - void* pUserArg_p); 220 + tEplKernel PUBLIC EplApiReadObject(tEplSdoComConHdl * pSdoComConHdl_p, 221 + unsigned int uiNodeId_p, 222 + unsigned int uiIndex_p, 223 + unsigned int uiSubindex_p, 224 + void *pDstData_le_p, 225 + unsigned int *puiSize_p, 226 + tEplSdoType SdoType_p, void *pUserArg_p); 246 227 247 - tEplKernel PUBLIC EplApiWriteObject( 248 - tEplSdoComConHdl* pSdoComConHdl_p, 249 - unsigned int uiNodeId_p, 250 - unsigned int uiIndex_p, 251 - unsigned int uiSubindex_p, 252 - void* pSrcData_le_p, 253 - unsigned int uiSize_p, 254 - tEplSdoType SdoType_p, 255 - void* pUserArg_p); 228 + tEplKernel PUBLIC EplApiWriteObject(tEplSdoComConHdl * pSdoComConHdl_p, 229 + unsigned int uiNodeId_p, 230 + unsigned int uiIndex_p, 231 + unsigned int uiSubindex_p, 232 + void *pSrcData_le_p, 233 + unsigned int uiSize_p, 234 + tEplSdoType SdoType_p, void *pUserArg_p); 256 235 257 - tEplKernel PUBLIC EplApiFreeSdoChannel( 258 - tEplSdoComConHdl SdoComConHdl_p); 236 + tEplKernel PUBLIC EplApiFreeSdoChannel(tEplSdoComConHdl SdoComConHdl_p); 259 237 260 - tEplKernel PUBLIC EplApiReadLocalObject( 261 - unsigned int uiIndex_p, 262 - unsigned int uiSubindex_p, 263 - void* pDstData_p, 264 - unsigned int* puiSize_p); 238 + tEplKernel PUBLIC EplApiReadLocalObject(unsigned int uiIndex_p, 239 + unsigned int uiSubindex_p, 240 + void *pDstData_p, 241 + unsigned int *puiSize_p); 265 242 266 - tEplKernel PUBLIC EplApiWriteLocalObject( 267 - unsigned int uiIndex_p, 268 - unsigned int uiSubindex_p, 269 - void* pSrcData_p, 270 - unsigned int uiSize_p); 243 + tEplKernel PUBLIC EplApiWriteLocalObject(unsigned int uiIndex_p, 244 + unsigned int uiSubindex_p, 245 + void *pSrcData_p, 246 + unsigned int uiSize_p); 271 247 272 - tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM* pParam_p); 248 + tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM * pParam_p); 273 249 274 - tEplKernel PUBLIC EplApiLinkObject( unsigned int uiObjIndex_p, 275 - void* pVar_p, 276 - unsigned int* puiVarEntries_p, 277 - tEplObdSize* pEntrySize_p, 278 - unsigned int uiFirstSubindex_p); 250 + tEplKernel PUBLIC EplApiLinkObject(unsigned int uiObjIndex_p, 251 + void *pVar_p, 252 + unsigned int *puiVarEntries_p, 253 + tEplObdSize * pEntrySize_p, 254 + unsigned int uiFirstSubindex_p); 279 255 280 256 tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p); 281 257 282 258 tEplKernel PUBLIC EplApiProcess(void); 283 259 284 - 285 260 #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0) 286 261 tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p, 287 - tEplNmtNodeCommand NodeCommand_p); 262 + tEplNmtNodeCommand NodeCommand_p); 288 263 #endif 289 264 290 - tEplKernel PUBLIC EplApiGetIdentResponse( 291 - unsigned int uiNodeId_p, 292 - tEplIdentResponse** ppIdentResponse_p); 293 - 265 + tEplKernel PUBLIC EplApiGetIdentResponse(unsigned int uiNodeId_p, 266 + tEplIdentResponse ** 267 + ppIdentResponse_p); 294 268 295 269 // functions for process image will be implemented in separate file 296 270 tEplKernel PUBLIC EplApiProcessImageSetup(void); 297 - tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage* pPI_p); 298 - tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage* pPI_p); 271 + tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage * pPI_p); 272 + tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage * pPI_p); 299 273 300 - 301 - #endif // #ifndef _EPL_API_H_ 302 - 303 - 274 + #endif // #ifndef _EPL_API_H_
+54 -72
drivers/staging/epl/EplAmi.h
··· 86 86 #ifndef _EPLAMI_H_ 87 87 #define _EPLAMI_H_ 88 88 89 - 90 89 #if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0) 91 90 // #ifdef USE_VAR64 92 - #error 'ERROR: development system does not support 64 bit operations!' 91 + #error 'ERROR: development system does not support 64 bit operations!' 93 92 // #endif 94 93 #endif 95 - 96 94 97 95 //--------------------------------------------------------------------------- 98 96 // types 99 97 //--------------------------------------------------------------------------- 100 - 101 98 102 99 //--------------------------------------------------------------------------- 103 100 // Prototypen 104 101 //--------------------------------------------------------------------------- 105 102 106 103 #ifdef __cplusplus 107 - extern "C" { 104 + extern "C" { 108 105 #endif 109 106 110 107 #if (TARGET_SYSTEM == _WIN32_) 111 - #if defined(INLINE_FUNCTION_DEF) 112 - #undef INLINE_FUNCTION 113 - #define INLINE_FUNCTION INLINE_FUNCTION_DEF 114 - #define INLINE_ENABLED TRUE 115 - #define EPL_AMI_INLINED 116 - #include "../EplStack/amix86.c" 117 - #endif 108 + #if defined(INLINE_FUNCTION_DEF) 109 + #undef INLINE_FUNCTION 110 + #define INLINE_FUNCTION INLINE_FUNCTION_DEF 111 + #define INLINE_ENABLED TRUE 112 + #define EPL_AMI_INLINED 113 + #include "../EplStack/amix86.c" 114 + #endif 118 115 119 116 #elif (TARGET_SYSTEM == _LINUX_) 120 - #if defined(__m68k__) // it is an big endian machine 121 - #if defined(INLINE_FUNCTION_DEF) 122 - #undef INLINE_FUNCTION 123 - #define INLINE_FUNCTION INLINE_FUNCTION_DEF 124 - #define INLINE_ENABLED TRUE 125 - #define EPL_AMI_INLINED 126 - #include "../EplStack/amibe.c" 127 - #endif 128 - #endif 117 + #if defined(__m68k__) // it is an big endian machine 118 + #if defined(INLINE_FUNCTION_DEF) 119 + #undef INLINE_FUNCTION 120 + #define INLINE_FUNCTION INLINE_FUNCTION_DEF 121 + #define INLINE_ENABLED TRUE 122 + #define EPL_AMI_INLINED 123 + #include "../EplStack/amibe.c" 124 + #endif 125 + #endif 129 126 #endif 130 127 131 128 //--------------------------------------------------------------------------- ··· 137 140 #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} 138 141 139 142 #if !defined(INLINE_ENABLED) 140 - void PUBLIC AmiSetWordToBe (void FAR* pAddr_p, WORD wWordVal_p); 141 - void PUBLIC AmiSetDwordToBe (void FAR* pAddr_p, DWORD dwDwordVal_p); 142 - void PUBLIC AmiSetWordToLe (void FAR* pAddr_p, WORD wWordVal_p); 143 - void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); 143 + void PUBLIC AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p); 144 + void PUBLIC AmiSetDwordToBe(void FAR * pAddr_p, DWORD dwDwordVal_p); 145 + void PUBLIC AmiSetWordToLe(void FAR * pAddr_p, WORD wWordVal_p); 146 + void PUBLIC AmiSetDwordToLe(void FAR * pAddr_p, DWORD dwDwordVal_p); 144 147 #endif 145 - 146 148 147 149 //--------------------------------------------------------------------------- 148 150 // ··· 156 160 157 161 #if !defined(INLINE_ENABLED) 158 162 159 - WORD PUBLIC AmiGetWordFromBe (void FAR* pAddr_p); 160 - DWORD PUBLIC AmiGetDwordFromBe (void FAR* pAddr_p); 161 - WORD PUBLIC AmiGetWordFromLe (void FAR* pAddr_p); 162 - DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p); 163 + WORD PUBLIC AmiGetWordFromBe(void FAR * pAddr_p); 164 + DWORD PUBLIC AmiGetDwordFromBe(void FAR * pAddr_p); 165 + WORD PUBLIC AmiGetWordFromLe(void FAR * pAddr_p); 166 + DWORD PUBLIC AmiGetDwordFromLe(void FAR * pAddr_p); 163 167 164 168 //--------------------------------------------------------------------------- 165 169 // ··· 174 178 // 175 179 //--------------------------------------------------------------------------- 176 180 177 - void PUBLIC AmiSetDword24ToBe (void FAR* pAddr_p, DWORD dwDwordVal_p); 178 - void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); 179 - 181 + void PUBLIC AmiSetDword24ToBe(void FAR * pAddr_p, DWORD dwDwordVal_p); 182 + void PUBLIC AmiSetDword24ToLe(void FAR * pAddr_p, DWORD dwDwordVal_p); 180 183 181 184 //--------------------------------------------------------------------------- 182 185 // ··· 189 194 // 190 195 //--------------------------------------------------------------------------- 191 196 192 - DWORD PUBLIC AmiGetDword24FromBe (void FAR* pAddr_p); 193 - DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p); 194 - 197 + DWORD PUBLIC AmiGetDword24FromBe(void FAR * pAddr_p); 198 + DWORD PUBLIC AmiGetDword24FromLe(void FAR * pAddr_p); 195 199 196 200 //#ifdef USE_VAR64 197 201 ··· 207 213 // 208 214 //--------------------------------------------------------------------------- 209 215 210 - void PUBLIC AmiSetQword40ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); 211 - void PUBLIC AmiSetQword40ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); 212 - 216 + void PUBLIC AmiSetQword40ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); 217 + void PUBLIC AmiSetQword40ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); 213 218 214 219 //--------------------------------------------------------------------------- 215 220 // ··· 222 229 // 223 230 //--------------------------------------------------------------------------- 224 231 225 - QWORD PUBLIC AmiGetQword40FromBe (void FAR* pAddr_p); 226 - QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p); 227 - 232 + QWORD PUBLIC AmiGetQword40FromBe(void FAR * pAddr_p); 233 + QWORD PUBLIC AmiGetQword40FromLe(void FAR * pAddr_p); 228 234 229 235 //--------------------------------------------------------------------------- 230 236 // ··· 238 246 // 239 247 //--------------------------------------------------------------------------- 240 248 241 - void PUBLIC AmiSetQword48ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); 242 - void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); 243 - 249 + void PUBLIC AmiSetQword48ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); 250 + void PUBLIC AmiSetQword48ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); 244 251 245 252 //--------------------------------------------------------------------------- 246 253 // ··· 253 262 // 254 263 //--------------------------------------------------------------------------- 255 264 256 - QWORD PUBLIC AmiGetQword48FromBe (void FAR* pAddr_p); 257 - QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p); 258 - 265 + QWORD PUBLIC AmiGetQword48FromBe(void FAR * pAddr_p); 266 + QWORD PUBLIC AmiGetQword48FromLe(void FAR * pAddr_p); 259 267 260 268 //--------------------------------------------------------------------------- 261 269 // ··· 269 279 // 270 280 //--------------------------------------------------------------------------- 271 281 272 - void PUBLIC AmiSetQword56ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); 273 - void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); 274 - 282 + void PUBLIC AmiSetQword56ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); 283 + void PUBLIC AmiSetQword56ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); 275 284 276 285 //--------------------------------------------------------------------------- 277 286 // ··· 284 295 // 285 296 //--------------------------------------------------------------------------- 286 297 287 - QWORD PUBLIC AmiGetQword56FromBe (void FAR* pAddr_p); 288 - QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p); 289 - 298 + QWORD PUBLIC AmiGetQword56FromBe(void FAR * pAddr_p); 299 + QWORD PUBLIC AmiGetQword56FromLe(void FAR * pAddr_p); 290 300 291 301 //--------------------------------------------------------------------------- 292 302 // ··· 300 312 // 301 313 //--------------------------------------------------------------------------- 302 314 303 - void PUBLIC AmiSetQword64ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); 304 - void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); 305 - 315 + void PUBLIC AmiSetQword64ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); 316 + void PUBLIC AmiSetQword64ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); 306 317 307 318 //--------------------------------------------------------------------------- 308 319 // ··· 315 328 // 316 329 //--------------------------------------------------------------------------- 317 330 318 - QWORD PUBLIC AmiGetQword64FromBe (void FAR* pAddr_p); 319 - QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p); 320 - 331 + QWORD PUBLIC AmiGetQword64FromBe(void FAR * pAddr_p); 332 + QWORD PUBLIC AmiGetQword64FromLe(void FAR * pAddr_p); 321 333 322 334 //--------------------------------------------------------------------------- 323 335 // ··· 331 345 // 332 346 //--------------------------------------------------------------------------- 333 347 334 - void PUBLIC AmiSetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p); 335 - 348 + void PUBLIC AmiSetTimeOfDay(void FAR * pAddr_p, 349 + tTimeOfDay FAR * pTimeOfDay_p); 336 350 337 351 //--------------------------------------------------------------------------- 338 352 // ··· 347 361 // 348 362 //--------------------------------------------------------------------------- 349 363 350 - void PUBLIC AmiGetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p); 364 + void PUBLIC AmiGetTimeOfDay(void FAR * pAddr_p, 365 + tTimeOfDay FAR * pTimeOfDay_p); 351 366 352 367 #endif 353 368 354 - 355 - #undef INLINE_ENABLED // disable actual inlining of functions 369 + #undef INLINE_ENABLED // disable actual inlining of functions 356 370 #define EPL_AMI_INCLUDED 357 371 358 372 #ifdef __cplusplus 359 - } 373 + } 360 374 #endif 361 - 362 - 363 - #endif // ifndef _EPLAMI_H_ 364 - 365 - // Die letzte Zeile mu� unbedingt eine leere Zeile sein, weil manche Compiler 366 - // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). 375 + #endif // ifndef _EPLAMI_H_ 376 + // Die letzte Zeile mu� unbedingt eine leere Zeile sein, weil manche Compiler// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
+38 -50
drivers/staging/epl/EplApiLinux.h
··· 66 66 67 67 2006/10/11 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_API_LINUX_H_ 73 72 #define _EPL_API_LINUX_H_ 74 73 75 - 76 74 //--------------------------------------------------------------------------- 77 75 // const defines 78 76 //--------------------------------------------------------------------------- 79 77 80 - #define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry 81 - 78 + #define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry 82 79 83 80 //--------------------------------------------------------------------------- 84 81 // Commands for <ioctl> 85 82 //--------------------------------------------------------------------------- 86 83 87 - #define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam* 88 - #define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage* 89 - #define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage* 90 - #define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject* 91 - #define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject* 92 - #define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject* 93 - #define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject* 94 - #define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl 95 - #define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent 96 - #define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent* 97 - #define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject* 98 - #define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0 99 - #define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0 100 - 84 + #define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam* 85 + #define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage* 86 + #define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage* 87 + #define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject* 88 + #define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject* 89 + #define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject* 90 + #define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject* 91 + #define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl 92 + #define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent 93 + #define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent* 94 + #define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject* 95 + #define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0 96 + #define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0 101 97 102 98 //--------------------------------------------------------------------------- 103 99 // typedef 104 100 //--------------------------------------------------------------------------- 105 101 106 - typedef struct 107 - { 108 - unsigned int m_uiEventArgSize; 109 - tEplApiEventArg* m_pEventArg; 110 - tEplApiEventType* m_pEventType; 111 - tEplKernel m_RetCbEvent; 102 + typedef struct { 103 + unsigned int m_uiEventArgSize; 104 + tEplApiEventArg *m_pEventArg; 105 + tEplApiEventType *m_pEventType; 106 + tEplKernel m_RetCbEvent; 112 107 113 108 } tEplLinEvent; 114 109 115 - typedef struct 116 - { 117 - tEplSdoComConHdl m_SdoComConHdl; 118 - BOOL m_fValidSdoComConHdl; 119 - unsigned int m_uiNodeId; 120 - unsigned int m_uiIndex; 121 - unsigned int m_uiSubindex; 122 - void* m_le_pData; 123 - unsigned int m_uiSize; 124 - tEplSdoType m_SdoType; 125 - void* m_pUserArg; 110 + typedef struct { 111 + tEplSdoComConHdl m_SdoComConHdl; 112 + BOOL m_fValidSdoComConHdl; 113 + unsigned int m_uiNodeId; 114 + unsigned int m_uiIndex; 115 + unsigned int m_uiSubindex; 116 + void *m_le_pData; 117 + unsigned int m_uiSize; 118 + tEplSdoType m_SdoType; 119 + void *m_pUserArg; 126 120 127 121 } tEplLinSdoObject; 128 122 129 - typedef struct 130 - { 131 - unsigned int m_uiIndex; 132 - unsigned int m_uiSubindex; 133 - void* m_pData; 134 - unsigned int m_uiSize; 123 + typedef struct { 124 + unsigned int m_uiIndex; 125 + unsigned int m_uiSubindex; 126 + void *m_pData; 127 + unsigned int m_uiSize; 135 128 136 129 } tEplLinLocalObject; 137 130 138 - typedef struct 139 - { 140 - unsigned int m_uiNodeId; 141 - tEplNmtNodeCommand m_NodeCommand; 131 + typedef struct { 132 + unsigned int m_uiNodeId; 133 + tEplNmtNodeCommand m_NodeCommand; 142 134 143 135 } tEplLinNodeCmdObject; 144 136 ··· 138 146 // function prototypes 139 147 //--------------------------------------------------------------------------- 140 148 141 - 142 - 143 - #endif // #ifndef _EPL_API_LINUX_H_ 144 - 145 - 149 + #endif // #ifndef _EPL_API_LINUX_H_
+1 -12
drivers/staging/epl/EplCfg.h
··· 71 71 #ifndef _EPLCFG_H_ 72 72 #define _EPLCFG_H_ 73 73 74 - 75 - 76 - 77 74 // ========================================================================= 78 75 // generic defines which for whole EPL Stack 79 76 // ========================================================================= ··· 97 100 #define EPL_NO_USER_KERNEL 98 101 99 102 #ifndef BENCHMARK_MODULES 100 - #define BENCHMARK_MODULES 0 //0xEE800042L 103 + #define BENCHMARK_MODULES 0 //0xEE800042L 101 104 #endif 102 105 103 106 // Default defug level: ··· 109 112 // * EPL_DBGLVL_ASSERT = 0x20000000L 110 113 // * EPL_DBGLVL_ERROR = 0x40000000L 111 114 // * EPL_DBGLVL_ALWAYS = 0x80000000L 112 - 113 115 114 116 // EPL_MODULE_INTEGRATION defines all modules which are included in 115 117 // EPL application. Please add or delete modules for your application. ··· 151 155 // number of used ethernet controller 152 156 //#define EDRV_USED_ETH_CTRL 1 153 157 154 - 155 158 // ========================================================================= 156 159 // Data Link Layer (DLL) specific defines 157 160 // ========================================================================= ··· 164 169 // and DLL shall pass PRes as ready to Edrv after SoA 165 170 #define EPL_DLL_PRES_READY_AFTER_SOA FALSE 166 171 //#define EPL_DLL_PRES_READY_AFTER_SOA TRUE 167 - 168 172 169 173 // ========================================================================= 170 174 // OBD specific defines ··· 182 188 183 189 #define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE 184 190 185 - 186 191 // ========================================================================= 187 192 // Timer module specific defines 188 193 // ========================================================================= ··· 193 200 #define EPL_TIMER_USE_HIGHRES TRUE 194 201 //#define EPL_TIMER_USE_HIGHRES FALSE 195 202 196 - 197 203 #endif //_EPLCFG_H_ 198 - 199 - 200 -
+86 -93
drivers/staging/epl/EplDef.h
··· 66 66 67 67 2006/05/22 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_DEF_H_ 73 72 #define _EPL_DEF_H_ 74 73 75 - 76 74 //--------------------------------------------------------------------------- 77 75 // const defines 78 76 //--------------------------------------------------------------------------- 79 77 80 - #define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address 81 - #define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device 82 - #define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address 83 - #define EPL_C_ADR_INVALID 0x00 // invalid EPL address 84 - #define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN 85 - #define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1 86 - #define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests 87 - #define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority 78 + #define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address 79 + #define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device 80 + #define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address 81 + #define EPL_C_ADR_INVALID 0x00 // invalid EPL address 82 + #define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN 83 + #define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1 84 + #define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests 85 + #define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority 88 86 #define EPL_C_DLL_ETHERTYPE_EPL 0x88AB 89 - #define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU 90 - #define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes 91 - #define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU 87 + #define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU 88 + #define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes 89 + #define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU 92 90 #define EPL_C_DLL_MAX_RS 7 93 - #define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes. 94 - #define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload 95 - #define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form 96 - #define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form 97 - #define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form 98 - #define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form 99 - #define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1 100 - #define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network 101 - #define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header 102 - #define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum 103 - #define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap 104 - #define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble) 105 - #define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble 91 + #define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes. 92 + #define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload 93 + #define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form 94 + #define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form 95 + #define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form 96 + #define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form 97 + #define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1 98 + #define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network 99 + #define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header 100 + #define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum 101 + #define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap 102 + #define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble) 103 + #define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble 106 104 107 - #define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC 108 - #define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC 109 - #define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC 110 - #define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC 111 - #define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC 112 - #define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC 113 - #define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC 114 - #define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC 115 - #define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC 116 - #define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC 105 + #define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC 106 + #define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC 107 + #define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC 108 + #define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC 109 + #define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC 110 + #define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC 111 + #define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC 112 + #define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC 113 + #define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC 114 + #define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC 117 115 118 - #define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0) 119 - #define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change 120 - #define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change 121 - #define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed. 122 - #define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed. 123 - #define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands 124 - #define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs 116 + #define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0) 117 + #define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change 118 + #define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change 119 + #define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed. 120 + #define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed. 121 + #define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands 122 + #define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs 125 123 #define EPL_C_SDO_EPL_PORT 3819 126 124 127 - #define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h 128 - 129 - 125 + #define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h 130 126 131 127 // Default configuration 132 128 // ====================== 133 129 134 130 #ifndef EPL_D_PDO_Granularity_U8 135 - #define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1 131 + #define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1 136 132 #endif 137 133 138 134 #ifndef EPL_NMT_MAX_NODE_ID 139 - #define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID 135 + #define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID 140 136 #endif 141 137 142 138 #ifndef EPL_D_NMT_MaxCNNumber_U8 143 - #define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239 139 + #define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239 144 140 #endif 145 141 146 142 // defines for EPL API layer static process image ··· 158 162 #endif 159 163 160 164 #ifndef EPL_OBD_MAX_STRING_SIZE 161 - #define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A 165 + #define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A 162 166 #endif 163 167 164 168 #ifndef EPL_OBD_USE_STORE_RESTORE ··· 190 194 #endif 191 195 192 196 #ifndef EPL_VETH_NAME 193 - #define EPL_VETH_NAME "epl" // name of net device in Linux 197 + #define EPL_VETH_NAME "epl" // name of net device in Linux 194 198 #endif 195 199 196 200 /* ··· 299 303 #define EPL_E_DLL_LOSS_SOA_TH 0x8244 300 304 #define EPL_E_DLL_LOSS_SOC_TH 0x8245 301 305 // 0x84xx BootUp Errors 302 - #define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active 303 - #define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported 304 - #define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1 305 - #define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received 306 - #define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type 307 - #define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID 308 - #define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code 309 - #define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number 310 - #define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number 311 - #define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed 312 - #define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2 313 - #define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN 314 - #define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state 306 + #define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active 307 + #define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported 308 + #define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1 309 + #define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received 310 + #define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type 311 + #define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID 312 + #define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code 313 + #define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number 314 + #define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number 315 + #define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed 316 + #define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2 317 + #define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN 318 + #define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state 315 319 316 320 // Defines for object 0x1F80 NMT_StartUp_U32 317 321 // ========================================== 318 - #define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1 319 - #define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2 320 - #define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3 321 - #define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4 322 - #define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6 323 - #define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7 324 - #define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8 325 - #define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9 326 - #define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10 327 - #define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11 328 - #define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12 329 - #define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13 322 + #define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1 323 + #define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2 324 + #define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3 325 + #define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4 326 + #define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6 327 + #define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7 328 + #define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8 329 + #define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9 330 + #define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10 331 + #define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11 332 + #define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12 333 + #define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13 330 334 331 335 // Defines for object 0x1F81 NMT_NodeAssignment_AU32 332 336 // ================================================== 333 - #define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0 334 - #define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1 335 - #define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2 336 - #define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3 337 - #define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard 338 - #define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5 339 - #define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6 340 - #define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8 341 - #define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9 342 - #define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10 343 - #define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11 344 - #define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12 345 - #define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31 337 + #define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0 338 + #define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1 339 + #define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2 340 + #define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3 341 + #define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard 342 + #define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5 343 + #define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6 344 + #define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8 345 + #define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9 346 + #define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10 347 + #define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11 348 + #define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12 349 + #define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31 346 350 347 351 //--------------------------------------------------------------------------- 348 352 // typedef 349 353 //--------------------------------------------------------------------------- 350 354 351 - 352 - 353 355 //--------------------------------------------------------------------------- 354 356 // function prototypes 355 357 //--------------------------------------------------------------------------- 356 358 357 - 358 - #endif // #ifndef _EPL_DEF_H_ 359 + #endif // #ifndef _EPL_DEF_H_
+88 -103
drivers/staging/epl/EplDll.h
··· 66 66 67 67 2006/06/08 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_DLL_H_ ··· 78 79 // const defines 79 80 //--------------------------------------------------------------------------- 80 81 81 - 82 82 #ifndef EPL_DLL_MAX_ASND_SERVICE_ID 83 - #define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5 83 + #define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5 84 84 #endif 85 85 86 86 //--------------------------------------------------------------------------- 87 87 // typedef 88 88 //--------------------------------------------------------------------------- 89 89 90 - typedef enum 91 - { 92 - kEplDllAsndNotDefined = 0x00, 93 - kEplDllAsndIdentResponse = 0x01, 94 - kEplDllAsndStatusResponse = 0x02, 95 - kEplDllAsndNmtRequest = 0x03, 96 - kEplDllAsndNmtCommand = 0x04, 97 - kEplDllAsndSdo = 0x05 98 - 90 + typedef enum { 91 + kEplDllAsndNotDefined = 0x00, 92 + kEplDllAsndIdentResponse = 0x01, 93 + kEplDllAsndStatusResponse = 0x02, 94 + kEplDllAsndNmtRequest = 0x03, 95 + kEplDllAsndNmtCommand = 0x04, 96 + kEplDllAsndSdo = 0x05 99 97 } tEplDllAsndServiceId; 100 98 101 - typedef enum 102 - { 103 - kEplDllAsndFilterNone = 0x00, 104 - kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID 105 - kEplDllAsndFilterAny = 0x02, // receive any ASnd frame 99 + typedef enum { 100 + kEplDllAsndFilterNone = 0x00, 101 + kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID 102 + kEplDllAsndFilterAny = 0x02, // receive any ASnd frame 106 103 } tEplDllAsndFilter; 107 104 108 - typedef enum 109 - { 110 - kEplDllReqServiceNo = 0x00, 111 - kEplDllReqServiceIdent = 0x01, 112 - kEplDllReqServiceStatus = 0x02, 113 - kEplDllReqServiceNmtRequest = 0x03, 114 - kEplDllReqServiceUnspecified= 0xFF, 105 + typedef enum { 106 + kEplDllReqServiceNo = 0x00, 107 + kEplDllReqServiceIdent = 0x01, 108 + kEplDllReqServiceStatus = 0x02, 109 + kEplDllReqServiceNmtRequest = 0x03, 110 + kEplDllReqServiceUnspecified = 0xFF, 115 111 116 112 } tEplDllReqServiceId; 117 113 118 - typedef enum 119 - { 120 - kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST 121 - kEplDllAsyncReqPrio6 = 0x06, 122 - kEplDllAsyncReqPrio5 = 0x05, 123 - kEplDllAsyncReqPrio4 = 0x04, 124 - kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST 125 - kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC 126 - kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC 127 - kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST 114 + typedef enum { 115 + kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST 116 + kEplDllAsyncReqPrio6 = 0x06, 117 + kEplDllAsyncReqPrio5 = 0x05, 118 + kEplDllAsyncReqPrio4 = 0x04, 119 + kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST 120 + kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC 121 + kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC 122 + kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST 128 123 129 124 } tEplDllAsyncReqPriority; 130 125 131 - typedef struct 132 - { 133 - unsigned int m_uiFrameSize; 134 - tEplFrame * m_pFrame; 135 - tEplNetTime m_NetTime; 126 + typedef struct { 127 + unsigned int m_uiFrameSize; 128 + tEplFrame *m_pFrame; 129 + tEplNetTime m_NetTime; 136 130 137 131 } tEplFrameInfo; 138 132 139 - typedef struct 140 - { 141 - unsigned int m_uiSizeOfStruct; 142 - BOOL m_fAsyncOnly; // do not need to register PRes-Frame 143 - unsigned int m_uiNodeId; // local node ID 133 + typedef struct { 134 + unsigned int m_uiSizeOfStruct; 135 + BOOL m_fAsyncOnly; // do not need to register PRes-Frame 136 + unsigned int m_uiNodeId; // local node ID 144 137 145 - // 0x1F82: NMT_FeatureFlags_U32 146 - DWORD m_dwFeatureFlags; 147 - // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] 148 - DWORD m_dwCycleLen; // required for error detection 149 - // 0x1F98: NMT_CycleTiming_REC 150 - // 0x1F98.1: IsochrTxMaxPayload_U16 151 - unsigned int m_uiIsochrTxMaxPayload; // const 152 - // 0x1F98.2: IsochrRxMaxPayload_U16 153 - unsigned int m_uiIsochrRxMaxPayload; // const 154 - // 0x1F98.3: PResMaxLatency_U32 155 - DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes 156 - // 0x1F98.4: PReqActPayloadLimit_U16 157 - unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes) 158 - // 0x1F98.5: PResActPayloadLimit_U16 159 - unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes) 160 - // 0x1F98.6: ASndMaxLatency_U32 161 - DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes 162 - // 0x1F98.7: MultiplCycleCnt_U8 163 - unsigned int m_uiMultiplCycleCnt; // required for error detection 164 - // 0x1F98.8: AsyncMTU_U16 165 - unsigned int m_uiAsyncMtu; // required to set up max frame size 166 - // $$$ 0x1F98.9: Prescaler_U16 167 - // $$$ Multiplexed Slot 138 + // 0x1F82: NMT_FeatureFlags_U32 139 + DWORD m_dwFeatureFlags; 140 + // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] 141 + DWORD m_dwCycleLen; // required for error detection 142 + // 0x1F98: NMT_CycleTiming_REC 143 + // 0x1F98.1: IsochrTxMaxPayload_U16 144 + unsigned int m_uiIsochrTxMaxPayload; // const 145 + // 0x1F98.2: IsochrRxMaxPayload_U16 146 + unsigned int m_uiIsochrRxMaxPayload; // const 147 + // 0x1F98.3: PResMaxLatency_U32 148 + DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes 149 + // 0x1F98.4: PReqActPayloadLimit_U16 150 + unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes) 151 + // 0x1F98.5: PResActPayloadLimit_U16 152 + unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes) 153 + // 0x1F98.6: ASndMaxLatency_U32 154 + DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes 155 + // 0x1F98.7: MultiplCycleCnt_U8 156 + unsigned int m_uiMultiplCycleCnt; // required for error detection 157 + // 0x1F98.8: AsyncMTU_U16 158 + unsigned int m_uiAsyncMtu; // required to set up max frame size 159 + // $$$ 0x1F98.9: Prescaler_U16 160 + // $$$ Multiplexed Slot 168 161 169 - // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] 170 - DWORD m_dwLossOfFrameTolerance; 162 + // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] 163 + DWORD m_dwLossOfFrameTolerance; 171 164 172 - // 0x1F8A: NMT_MNCycleTiming_REC 173 - // 0x1F8A.1: WaitSoCPReq_U32 in [ns] 174 - DWORD m_dwWaitSocPreq; 165 + // 0x1F8A: NMT_MNCycleTiming_REC 166 + // 0x1F8A.1: WaitSoCPReq_U32 in [ns] 167 + DWORD m_dwWaitSocPreq; 175 168 176 - // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] 177 - DWORD m_dwAsyncSlotTimeout; 169 + // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] 170 + DWORD m_dwAsyncSlotTimeout; 178 171 179 172 } tEplDllConfigParam; 180 173 181 - typedef struct 182 - { 183 - unsigned int m_uiSizeOfStruct; 184 - DWORD m_dwDeviceType; // NMT_DeviceType_U32 185 - DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 186 - DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 187 - DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 188 - DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 189 - QWORD m_qwVendorSpecificExt1; 190 - DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 191 - DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 192 - DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 193 - DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 194 - DWORD m_dwIpAddress; 195 - DWORD m_dwSubnetMask; 196 - DWORD m_dwDefaultGateway; 197 - BYTE m_sHostname[32]; 198 - BYTE m_abVendorSpecificExt2[48]; 174 + typedef struct { 175 + unsigned int m_uiSizeOfStruct; 176 + DWORD m_dwDeviceType; // NMT_DeviceType_U32 177 + DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 178 + DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 179 + DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 180 + DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 181 + QWORD m_qwVendorSpecificExt1; 182 + DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 183 + DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 184 + DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 185 + DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 186 + DWORD m_dwIpAddress; 187 + DWORD m_dwSubnetMask; 188 + DWORD m_dwDefaultGateway; 189 + BYTE m_sHostname[32]; 190 + BYTE m_abVendorSpecificExt2[48]; 199 191 200 192 } tEplDllIdentParam; 201 193 202 - typedef struct 203 - { 204 - unsigned int m_uiNodeId; 205 - WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 206 - WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 207 - DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32 194 + typedef struct { 195 + unsigned int m_uiNodeId; 196 + WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 197 + WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 198 + DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32 208 199 209 200 } tEplDllNodeInfo; 210 201 ··· 202 213 // function prototypes 203 214 //--------------------------------------------------------------------------- 204 215 205 - 206 - 207 - #endif // #ifndef _EPL_DLL_H_ 208 - 209 - 216 + #endif // #ifndef _EPL_DLL_H_
+8 -16
drivers/staging/epl/EplDllCal.h
··· 66 66 67 67 2006/06/20 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_DLLCAL_H_ 73 72 #define _EPL_DLLCAL_H_ 74 - 75 73 76 74 //--------------------------------------------------------------------------- 77 75 // const defines ··· 103 105 // typedef 104 106 //--------------------------------------------------------------------------- 105 107 106 - typedef struct 107 - { 108 - tEplDllAsndServiceId m_ServiceId; 109 - tEplDllAsndFilter m_Filter; 108 + typedef struct { 109 + tEplDllAsndServiceId m_ServiceId; 110 + tEplDllAsndFilter m_Filter; 110 111 111 112 } tEplDllCalAsndServiceIdFilter; 112 113 113 - typedef struct 114 - { 115 - tEplDllReqServiceId m_Service; 116 - unsigned int m_uiNodeId; 117 - BYTE m_bSoaFlag1; 114 + typedef struct { 115 + tEplDllReqServiceId m_Service; 116 + unsigned int m_uiNodeId; 117 + BYTE m_bSoaFlag1; 118 118 119 119 } tEplDllCalIssueRequest; 120 120 ··· 120 124 // function prototypes 121 125 //--------------------------------------------------------------------------- 122 126 123 - 124 - 125 - #endif // #ifndef _EPL_DLLKCAL_H_ 126 - 127 - 127 + #endif // #ifndef _EPL_DLLKCAL_H_
+123 -131
drivers/staging/epl/EplErrDef.h
··· 71 71 #ifndef _EPL_ERRORDEF_H_ 72 72 #define _EPL_ERRORDEF_H_ 73 73 74 - 75 74 //--------------------------------------------------------------------------- 76 75 // return codes 77 76 //--------------------------------------------------------------------------- 78 77 79 - typedef enum 80 - { 81 - // area for generic errors 0x0000 - 0x000F 82 - kEplSuccessful = 0x0000, // no error/successful run 83 - kEplIllegalInstance = 0x0001, // the called Instanz does not exist 84 - kEplInvalidInstanceParam = 0x0002, // 85 - kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available 86 - kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011 87 - kEplInvalidOperation = 0x0005, // operation not allowed in this situation 88 - kEplInvalidNodeId = 0x0007, // invalid NodeId was specified 89 - kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...) 90 - kEplShutdown = 0x0009, // stack is shutting down 91 - kEplReject = 0x000A, // reject the subsequent command 78 + typedef enum { 79 + // area for generic errors 0x0000 - 0x000F 80 + kEplSuccessful = 0x0000, // no error/successful run 81 + kEplIllegalInstance = 0x0001, // the called Instanz does not exist 82 + kEplInvalidInstanceParam = 0x0002, // 83 + kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available 84 + kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011 85 + kEplInvalidOperation = 0x0005, // operation not allowed in this situation 86 + kEplInvalidNodeId = 0x0007, // invalid NodeId was specified 87 + kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...) 88 + kEplShutdown = 0x0009, // stack is shutting down 89 + kEplReject = 0x000A, // reject the subsequent command 92 90 93 - // area for EDRV module 0x0010 - 0x001F 91 + // area for EDRV module 0x0010 - 0x001F 94 92 // kEplEdrvNoFrame = 0x0010, // no CAN message was received 95 93 // kEplEdrvMsgHigh = 0x0011, // CAN message with high priority was received 96 94 // kEplEdrvMsgLow = 0x0012, // CAN message with low priority was received 97 - kEplEdrvInitError = 0x0013, // initialisation error 98 - kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames 99 - kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist 95 + kEplEdrvInitError = 0x0013, // initialisation error 96 + kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames 97 + kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist 100 98 // kEplEdrvNoFreeChannel = 0x0014, // CAN controller has not a free channel 101 99 // kEplEdrvTxBuffHighOverrun = 0x0015, // buffer for high priority CAN transmit messages has overrun 102 100 // kEplEdrvTxBuffLowOverrun = 0x0016, // buffer for low priority CAN transmit messages has overrun 103 101 // kEplEdrvIllegalBdi = 0x0017, // unsupported baudrate within baudrate table 104 102 // kEplEdrvBusy = 0x0018, // remote frame can not be updated because no bus contact or CAN 105 - // transmission is activ 103 + // transmission is activ 106 104 // kEplEdrvInvalidDriverType = 0x0019, // (PC: Windows or Linux) invalid driver type 107 105 // kEplEdrvDriverNotFound = 0x001A, // (PC: Windows or Linux) driver (DLL) could not be found 108 106 // kEplEdrvInvalidBaseAddress = 0x001B, // (PC: Windows or Linux) driver could not found the CAN controller 109 107 // kEplEdrvInvalidParam = 0x001C, // invalid param in function call 110 108 111 - // area for COB module 0x0020 - 0x002F 109 + // area for COB module 0x0020 - 0x002F 112 110 /* kEplCobNoFreeEntry = 0x0020, // no free entry in RX- or TX-COB table 113 111 kEplCobAlreadyExist = 0x0021, // COB-ID already exists in RX- resp. TX-COB table 114 112 */ 115 - kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed 116 - kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before 113 + kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed 114 + kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before 117 115 // kEplDllAsyncRxBufferFull = 0x0024, // receive buffer for asynchronous frames is full 118 - kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty 119 - kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full 120 - kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure 121 - kEplDllInvalidParam = 0x0028, // invalid parameters passed to function 122 - kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet 123 - kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist 116 + kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty 117 + kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full 118 + kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure 119 + kEplDllInvalidParam = 0x0028, // invalid parameters passed to function 120 + kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet 121 + kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist 124 122 /* kEplCobIllegalCanId = 0x0023, // COB-ID is not allowed (like 0x000 is reserved for NMT, ...) 125 123 kEplCobInvalidCanId = 0x0024, // COB-ID is switched off 126 124 kEplCobCdrvStateSet = 0x0025, // at least one bit of CAN driver state is set 127 125 kEplCobNoFreeEntryHighBuf = 0x0026, // no free entry in high priotity RX- or TX-COB table 128 126 kEplCobOwnId = 0x0027, // COB-ID already exists in own module which calls CobDefine() or CobCheck() 129 127 */ 130 - // area for OBD module 0x0030 - 0x003F 131 - kEplObdIllegalPart = 0x0030, // unknown OD part 132 - kEplObdIndexNotExist = 0x0031, // object index does not exist in OD 133 - kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index 134 - kEplObdReadViolation = 0x0033, // read access to a write-only object 135 - kEplObdWriteViolation = 0x0034, // write access to a read-only object 136 - kEplObdAccessViolation = 0x0035, // access not allowed 137 - kEplObdUnknownObjectType = 0x0036, // object type not defined/known 138 - kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure 139 - kEplObdValueTooLow = 0x0038, // value to write to an object is too low 140 - kEplObdValueTooHigh = 0x0039, // value to write to an object is too high 141 - kEplObdValueLengthError = 0x003A, // value to write is to long or to short 128 + // area for OBD module 0x0030 - 0x003F 129 + kEplObdIllegalPart = 0x0030, // unknown OD part 130 + kEplObdIndexNotExist = 0x0031, // object index does not exist in OD 131 + kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index 132 + kEplObdReadViolation = 0x0033, // read access to a write-only object 133 + kEplObdWriteViolation = 0x0034, // write access to a read-only object 134 + kEplObdAccessViolation = 0x0035, // access not allowed 135 + kEplObdUnknownObjectType = 0x0036, // object type not defined/known 136 + kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure 137 + kEplObdValueTooLow = 0x0038, // value to write to an object is too low 138 + kEplObdValueTooHigh = 0x0039, // value to write to an object is too high 139 + kEplObdValueLengthError = 0x003A, // value to write is to long or to short 142 140 // kEplObdIllegalFloat = 0x003B, // illegal float variable 143 141 // kEplObdWrongOdBuilderKey = 0x003F, // OD was generated with demo version of tool ODBuilder 144 142 145 - // area for NMT module 0x0040 - 0x004F 146 - kEplNmtUnknownCommand = 0x0040, // unknown NMT command 147 - kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid 148 - kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul 149 - kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine 150 - kEplNmtInvalidParam = 0x0044, // invalid parameters specified 143 + // area for NMT module 0x0040 - 0x004F 144 + kEplNmtUnknownCommand = 0x0040, // unknown NMT command 145 + kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid 146 + kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul 147 + kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine 148 + kEplNmtInvalidParam = 0x0044, // invalid parameters specified 151 149 152 - // area for SDO/UDP module 0x0050 - 0x005F 153 - kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of 154 - // module 155 - kEplSdoUdpNoSocket = 0x0051, // error during init of socket 156 - kEplSdoUdpSocketError = 0x0052, // error during usage of socket 157 - kEplSdoUdpThreadError = 0x0053, // error during start of listen thread 158 - kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp 159 - kEplSdoUdpSendError = 0x0055, // Error during send of frame 160 - kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid 150 + // area for SDO/UDP module 0x0050 - 0x005F 151 + kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of 152 + // module 153 + kEplSdoUdpNoSocket = 0x0051, // error during init of socket 154 + kEplSdoUdpSocketError = 0x0052, // error during usage of socket 155 + kEplSdoUdpThreadError = 0x0053, // error during start of listen thread 156 + kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp 157 + kEplSdoUdpSendError = 0x0055, // Error during send of frame 158 + kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid 161 159 162 - // area for SDO Sequence layer module 0x0060 - 0x006F 163 - kEplSdoSeqMissCb = 0x0060, // no callback-function assign 164 - kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection 165 - kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer 166 - kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected 167 - kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history 168 - kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct 169 - kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full 170 - // and a ack request is needed 171 - kEplSdoSeqInvalidFrame = 0x0067, // frame not valid 172 - kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later 173 - kEplSdoSeqInvalidEvent = 0x0069, // invalid event received 160 + // area for SDO Sequence layer module 0x0060 - 0x006F 161 + kEplSdoSeqMissCb = 0x0060, // no callback-function assign 162 + kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection 163 + kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer 164 + kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected 165 + kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history 166 + kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct 167 + kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full 168 + // and a ack request is needed 169 + kEplSdoSeqInvalidFrame = 0x0067, // frame not valid 170 + kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later 171 + kEplSdoSeqInvalidEvent = 0x0069, // invalid event received 174 172 175 - // area for SDO Command Layer Module 0x0070 - 0x007F 176 - kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected 177 - kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection 178 - kEplSdoComInvalidServiceType= 0x0072, // invalid SDO service type specified 179 - kEplSdoComInvalidHandle = 0x0073, // handle invalid 180 - kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is 181 - // not possible 182 - kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is 183 - // not responsible for this event from sequence layer 184 - kEplSdoComHandleExists = 0x0076, // handle to same node already exists 185 - kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running 186 - kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function 173 + // area for SDO Command Layer Module 0x0070 - 0x007F 174 + kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected 175 + kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection 176 + kEplSdoComInvalidServiceType = 0x0072, // invalid SDO service type specified 177 + kEplSdoComInvalidHandle = 0x0073, // handle invalid 178 + kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is 179 + // not possible 180 + kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is 181 + // not responsible for this event from sequence layer 182 + kEplSdoComHandleExists = 0x0076, // handle to same node already exists 183 + kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running 184 + kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function 187 185 188 - // area for EPL Event-Modul 0x0080 - 0x008F 189 - kEplEventUnknownSink = 0x0080, // unknown sink for event 190 - kEplEventPostError = 0x0081, // error during post of event 186 + // area for EPL Event-Modul 0x0080 - 0x008F 187 + kEplEventUnknownSink = 0x0080, // unknown sink for event 188 + kEplEventPostError = 0x0081, // error during post of event 191 189 190 + // area for EPL Timer Modul 0x0090 - 0x009F 191 + kEplTimerInvalidHandle = 0x0090, // invalid handle for timer 192 + kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by 193 + // an error 192 194 195 + // area for EPL SDO/Asnd Module 0x00A0 - 0x0AF 196 + kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid 197 + kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection 198 + kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid 193 199 194 - // area for EPL Timer Modul 0x0090 - 0x009F 195 - kEplTimerInvalidHandle = 0x0090, // invalid handle for timer 196 - kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by 197 - // an error 200 + // area for PDO module 0x00B0 - 0x00BF 201 + kEplPdoNotExist = 0x00B0, // selected PDO does not exist 202 + kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis 203 + kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity 204 + kEplPdoInitError = 0x00B3, // error during initialisation of PDO module 205 + kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO 206 + kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO 207 + kEplPdoErrorSend = 0x00B6, // error during sending a PDO 208 + kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs 209 + kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping 210 + kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar() 211 + kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value 212 + kEplPdoWriteConstObject = 0x00BB, // constant object can not be written 213 + // (only TxType, Inhibit-, Event Time for CANopen Kit) 198 214 199 - // area for EPL SDO/Asnd Module 0x00A0 - 0x0AF 200 - kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid 201 - kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection 202 - kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid 203 - 204 - 205 - // area for PDO module 0x00B0 - 0x00BF 206 - kEplPdoNotExist = 0x00B0, // selected PDO does not exist 207 - kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis 208 - kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity 209 - kEplPdoInitError = 0x00B3, // error during initialisation of PDO module 210 - kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO 211 - kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO 212 - kEplPdoErrorSend = 0x00B6, // error during sending a PDO 213 - kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs 214 - kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping 215 - kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar() 216 - kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value 217 - kEplPdoWriteConstObject = 0x00BB, // constant object can not be written 218 - // (only TxType, Inhibit-, Event Time for CANopen Kit) 219 - 220 - // area for LSS slave module 215 + // area for LSS slave module 221 216 /* kEplLsssResetNode = 0x0080, // NMT command "reset node" has to be processed after LSS configuration 222 217 // new of NodeId 223 218 kEplLsssInvalidNodeId = 0x0081, // no valid NodeId is configured -> wait until it is configured with 224 219 // LSS service before calling CcmConnectToNet() 225 220 */ 226 - // area for emergency consumer module 0x0090 - 0x009F 221 + // area for emergency consumer module 0x0090 - 0x009F 227 222 /* kEplEmccNoFreeProducerEntry = 0x0090, // no free entry to add a Emergency Producer 228 223 kEplEmccNodeIdNotExist = 0x0091, // selected NodeId was never added 229 224 kEplEmccNodeIdInvalid = 0x0092, // selected NodeId is outside of range (0x01 until 0x7F) 230 225 kEplEmccNodeIdExist = 0x0093, // selected NodeId already exist 231 226 */ 232 - // area for dynamic OD 0x00A0 - 0x00AF 227 + // area for dynamic OD 0x00A0 - 0x00AF 233 228 /* kEplDynNoMemory = 0x00A0, // no memory available 234 229 kEplDynInvalidConfig = 0x00A1, // invalid configuration in segment container 235 230 */ 236 - // area for hertbeat consumer module 0x00B0 - 0x00BF 231 + // area for hertbeat consumer module 0x00B0 - 0x00BF 237 232 /* kEplHbcEntryNotExist = 0x00B0, // Heartbeat Producer node not configured 238 233 kEplHbcEntryAlreadyExist = 0x00B1, // NodeId was already defined in heartbeat consumer table (object 0x1016) 239 234 */ 240 - // Configuration manager module 0x00C0 - 0x00CF 241 - kEplCfgMaConfigError = 0x00C0, // error in configuration manager 242 - kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout 243 - kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid 244 - kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format 245 - kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors 246 - kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry 247 - kEplCfgMaNoConfigData = 0x00C6, // no configuration data present 248 - kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf 249 - // -> this entry was not configured 235 + // Configuration manager module 0x00C0 - 0x00CF 236 + kEplCfgMaConfigError = 0x00C0, // error in configuration manager 237 + kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout 238 + kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid 239 + kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format 240 + kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors 241 + kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry 242 + kEplCfgMaNoConfigData = 0x00C6, // no configuration data present 243 + kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf 244 + // -> this entry was not configured 250 245 251 - 252 - // area for LSS master module 0x00D0 - 0x00DF 246 + // area for LSS master module 0x00D0 - 0x00DF 253 247 /* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration) 254 248 kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master 255 249 kEplLssmBusy = 0x00D2, // LSS process is busy with an previous service ··· 251 257 kEplLssmTimeout = 0x00D4, // LSS slave did not answer a LSS service 252 258 kEplLssmErrorInConfirm = 0x00D5, // LSS slave replied an error code for a LSS service 253 259 */ 254 - // area for CCM modules 0x00E0 - 0xEF 260 + // area for CCM modules 0x00E0 - 0xEF 255 261 /* kEplCcmStoreUnvalidState = 0x00E0, // memory device not available due device state 256 262 kEplCcmStoreHwError = 0x00E1, // hw error due device access 257 263 */ 258 - // area for SRDO module 0x0100 - 0x011F 264 + // area for SRDO module 0x0100 - 0x011F 259 265 /* kEplSrdoNotExist = 0x0100, // selected SRDO does not exist 260 266 kEplSrdoGranularityMismatch = 0x0101, // configured SRDO granularity is not equal to supported granularity 261 267 kEplSrdoCfgTimingError = 0x0102, // configuration is not ok (Timing) ··· 279 285 kEplSrdoOverrun = 0x0114 // a RxSRDO was received but the pevious one was not else processed 280 286 */ 281 287 282 - kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished 283 - kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id) 288 + kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished 289 + kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id) 284 290 285 - // area untill 0x07FF is reserved 286 - // area for user application from 0x0800 to 0x7FFF 291 + // area untill 0x07FF is reserved 292 + // area for user application from 0x0800 to 0x7FFF 287 293 288 294 } tEplKernel; 289 - 290 295 291 296 #endif 292 297 //EOF 293 298 294 299 // Die letzte Zeile mu� unbedingt eine leere Zeile sein, weil manche Compiler 295 300 // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). 296 -
+139 -163
drivers/staging/epl/EplEvent.h
··· 66 66 67 67 2006/06/12 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_EVENT_H_ ··· 81 82 // name and size of event queues 82 83 #define EPL_EVENT_NAME_SHB_KERNEL_TO_USER "ShbKernelToUser" 83 84 #ifndef EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 84 - #define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte 85 + #define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte 85 86 #endif 86 87 87 88 #define EPL_EVENT_NAME_SHB_USER_TO_KERNEL "ShbUserToKernel" 88 89 #ifndef EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 89 - #define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte 90 + #define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte 90 91 #endif 91 - 92 92 93 93 // max size of event argument 94 94 #ifndef EPL_MAX_EVENT_ARG_SIZE 95 - #define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO 95 + #define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO 96 96 #endif 97 97 98 - #define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00 99 - #define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01 100 - #define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02 101 - #define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03 102 - #define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06 103 - #define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09 104 - #define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A 105 - #define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B 106 - #define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C 107 - #define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D 108 - #define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2 109 - #define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E 110 - #define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F 111 - #define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10 112 - #define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module) 113 - #define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object 114 - #define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6) 115 - #define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6) 116 - #define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration) 117 - 98 + #define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00 99 + #define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01 100 + #define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02 101 + #define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03 102 + #define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06 103 + #define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09 104 + #define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A 105 + #define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B 106 + #define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C 107 + #define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D 108 + #define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2 109 + #define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E 110 + #define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F 111 + #define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10 112 + #define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module) 113 + #define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object 114 + #define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6) 115 + #define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6) 116 + #define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration) 118 117 119 118 //--------------------------------------------------------------------------- 120 119 // typedef 121 120 //--------------------------------------------------------------------------- 122 121 123 122 // EventType determines the argument of the event 124 - typedef enum 125 - { 126 - kEplEventTypeNmtEvent = 0x01, // NMT event 127 - // arg is pointer to tEplNmtEvent 128 - kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq) 129 - // arg is pointer to tEplFrame 130 - kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq) 131 - // arg is pointer to tEplFrameInfo 132 - kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed) 133 - // arg is pointer to nothing 134 - kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC) 135 - // arg is pointer to nothing 136 - kEplEventTypeTimer = 0x06, // Timer event 137 - // arg is pointer to tEplTimerEventArg 138 - kEplEventTypeHeartbeat = 0x07, // Heartbeat event 139 - // arg is pointer to tEplHeartbeatEvent 140 - kEplEventTypeDllkCreate = 0x08, // DLL kernel create event 141 - // arg is pointer to the new tEplNmtState 142 - kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event 143 - // arg is pointer to the old tEplNmtState 144 - kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event 145 - // arg is pointer to tEplDllAsyncReqPriority 146 - kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event 147 - // arg is pointer to nothing 148 - kEplEventTypeError = 0x0C, // Error event for API layer 149 - // arg is pointer to tEplEventError 150 - kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State 151 - // arg is pointer to tEplEventNmtStateChange 152 - kEplEventTypeDllError = 0x0E, // DLL error event for Error handler 153 - // arg is pointer to tEplErrorHandlerkEvent 154 - kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module 155 - // arg is pointer to tEplFrame 156 - kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter 157 - // arg is pointer to tEplDllCalServiceIdFilter 158 - kEplEventTypeDllkIdentity = 0x11, // configure Identity 159 - // arg is pointer to tEplDllIdentParam 160 - kEplEventTypeDllkConfig = 0x12, // configure ConfigParam 161 - // arg is pointer to tEplDllConfigParam 162 - kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request 163 - // arg is pointer to tEplDllCalIssueRequest 164 - kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase 165 - // arg is pointer to tEplDllNodeInfo 166 - kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase 167 - // arg is pointer to unsigned int 168 - kEplEventTypeDllkSoftDelNode= 0x16, // remove node softly from isochronous phase 169 - // arg is pointer to unsigned int 170 - kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN 171 - // arg is pointer to nothing 172 - kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent 173 - // arg is pointer to tEplFrame 123 + typedef enum { 124 + kEplEventTypeNmtEvent = 0x01, // NMT event 125 + // arg is pointer to tEplNmtEvent 126 + kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq) 127 + // arg is pointer to tEplFrame 128 + kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq) 129 + // arg is pointer to tEplFrameInfo 130 + kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed) 131 + // arg is pointer to nothing 132 + kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC) 133 + // arg is pointer to nothing 134 + kEplEventTypeTimer = 0x06, // Timer event 135 + // arg is pointer to tEplTimerEventArg 136 + kEplEventTypeHeartbeat = 0x07, // Heartbeat event 137 + // arg is pointer to tEplHeartbeatEvent 138 + kEplEventTypeDllkCreate = 0x08, // DLL kernel create event 139 + // arg is pointer to the new tEplNmtState 140 + kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event 141 + // arg is pointer to the old tEplNmtState 142 + kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event 143 + // arg is pointer to tEplDllAsyncReqPriority 144 + kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event 145 + // arg is pointer to nothing 146 + kEplEventTypeError = 0x0C, // Error event for API layer 147 + // arg is pointer to tEplEventError 148 + kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State 149 + // arg is pointer to tEplEventNmtStateChange 150 + kEplEventTypeDllError = 0x0E, // DLL error event for Error handler 151 + // arg is pointer to tEplErrorHandlerkEvent 152 + kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module 153 + // arg is pointer to tEplFrame 154 + kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter 155 + // arg is pointer to tEplDllCalServiceIdFilter 156 + kEplEventTypeDllkIdentity = 0x11, // configure Identity 157 + // arg is pointer to tEplDllIdentParam 158 + kEplEventTypeDllkConfig = 0x12, // configure ConfigParam 159 + // arg is pointer to tEplDllConfigParam 160 + kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request 161 + // arg is pointer to tEplDllCalIssueRequest 162 + kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase 163 + // arg is pointer to tEplDllNodeInfo 164 + kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase 165 + // arg is pointer to unsigned int 166 + kEplEventTypeDllkSoftDelNode = 0x16, // remove node softly from isochronous phase 167 + // arg is pointer to unsigned int 168 + kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN 169 + // arg is pointer to nothing 170 + kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent 171 + // arg is pointer to tEplFrame 174 172 175 173 } tEplEventType; 176 174 177 - 178 175 // EventSink determines the consumer of the event 179 - typedef enum 180 - { 181 - kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module 182 - kEplEventSinkNmtk = 0x01, // events for Nmtk module 183 - kEplEventSinkDllk = 0x02, // events for Dllk module 184 - kEplEventSinkDlluCal = 0x03, // events for DlluCal module 185 - kEplEventSinkDllkCal = 0x04, // events for DllkCal module 186 - kEplEventSinkPdok = 0x05, // events for Pdok module 187 - kEplEventSinkNmtu = 0x06, // events for Nmtu module 188 - kEplEventSinkErrk = 0x07, // events for Error handler module 189 - kEplEventSinkErru = 0x08, // events for Error signaling module 190 - kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module 191 - kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module 192 - kEplEventSinkLedu = 0x0B, // events for Ledu module 193 - kEplEventSinkApi = 0x0F, // events for API module 176 + typedef enum { 177 + kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module 178 + kEplEventSinkNmtk = 0x01, // events for Nmtk module 179 + kEplEventSinkDllk = 0x02, // events for Dllk module 180 + kEplEventSinkDlluCal = 0x03, // events for DlluCal module 181 + kEplEventSinkDllkCal = 0x04, // events for DllkCal module 182 + kEplEventSinkPdok = 0x05, // events for Pdok module 183 + kEplEventSinkNmtu = 0x06, // events for Nmtu module 184 + kEplEventSinkErrk = 0x07, // events for Error handler module 185 + kEplEventSinkErru = 0x08, // events for Error signaling module 186 + kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module 187 + kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module 188 + kEplEventSinkLedu = 0x0B, // events for Ledu module 189 + kEplEventSinkApi = 0x0F, // events for API module 194 190 195 191 } tEplEventSink; 196 192 197 - 198 193 // EventSource determines the source of an errorevent 199 - typedef enum 200 - { 201 - // kernelspace modules 202 - kEplEventSourceDllk = 0x01, // Dllk module 203 - kEplEventSourceNmtk = 0x02, // Nmtk module 204 - kEplEventSourceObdk = 0x03, // Obdk module 205 - kEplEventSourcePdok = 0x04, // Pdok module 206 - kEplEventSourceTimerk = 0x05, // Timerk module 207 - kEplEventSourceEventk = 0x06, // Eventk module 208 - kEplEventSourceSyncCb = 0x07, // sync-Cb 209 - kEplEventSourceErrk = 0x08, // Error handler module 194 + typedef enum { 195 + // kernelspace modules 196 + kEplEventSourceDllk = 0x01, // Dllk module 197 + kEplEventSourceNmtk = 0x02, // Nmtk module 198 + kEplEventSourceObdk = 0x03, // Obdk module 199 + kEplEventSourcePdok = 0x04, // Pdok module 200 + kEplEventSourceTimerk = 0x05, // Timerk module 201 + kEplEventSourceEventk = 0x06, // Eventk module 202 + kEplEventSourceSyncCb = 0x07, // sync-Cb 203 + kEplEventSourceErrk = 0x08, // Error handler module 210 204 211 - // userspace modules 212 - kEplEventSourceDllu = 0x10, // Dllu module 213 - kEplEventSourceNmtu = 0x11, // Nmtu module 214 - kEplEventSourceNmtCnu = 0x12, // NmtCnu module 215 - kEplEventSourceNmtMnu = 0x13, // NmtMnu module 216 - kEplEventSourceObdu = 0x14, // Obdu module 217 - kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module 218 - kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module 219 - kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module 220 - kEplEventSourceSdoCom = 0x18, // Sdo command layer module 221 - kEplEventSourceTimeru = 0x19, // Timeru module 222 - kEplEventSourceCfgMau = 0x1A, // CfgMau module 223 - kEplEventSourceEventu = 0x1B, // Eventu module 224 - kEplEventSourceEplApi = 0x1C, // Api module 225 - kEplEventSourceLedu = 0x1D, // Ledu module 205 + // userspace modules 206 + kEplEventSourceDllu = 0x10, // Dllu module 207 + kEplEventSourceNmtu = 0x11, // Nmtu module 208 + kEplEventSourceNmtCnu = 0x12, // NmtCnu module 209 + kEplEventSourceNmtMnu = 0x13, // NmtMnu module 210 + kEplEventSourceObdu = 0x14, // Obdu module 211 + kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module 212 + kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module 213 + kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module 214 + kEplEventSourceSdoCom = 0x18, // Sdo command layer module 215 + kEplEventSourceTimeru = 0x19, // Timeru module 216 + kEplEventSourceCfgMau = 0x1A, // CfgMau module 217 + kEplEventSourceEventu = 0x1B, // Eventu module 218 + kEplEventSourceEplApi = 0x1C, // Api module 219 + kEplEventSourceLedu = 0x1D, // Ledu module 226 220 227 221 } tEplEventSource; 228 222 229 - 230 223 // structure of EPL event (element order must not be changed!) 231 - typedef struct 232 - { 233 - tEplEventType m_EventType /*:28*/; // event type 234 - tEplEventSink m_EventSink /*:4*/; // event sink 235 - tEplNetTime m_NetTime; // timestamp 236 - unsigned int m_uiSize; // size of argument 237 - void * m_pArg; // argument of event 224 + typedef struct { 225 + tEplEventType m_EventType /*:28 */ ; // event type 226 + tEplEventSink m_EventSink /*:4 */ ; // event sink 227 + tEplNetTime m_NetTime; // timestamp 228 + unsigned int m_uiSize; // size of argument 229 + void *m_pArg; // argument of event 238 230 239 231 } tEplEvent; 240 232 241 - 242 233 // short structure of EPL event without argument and its size (element order must not be changed!) 243 - typedef struct 244 - { 245 - tEplEventType m_EventType /*:28*/; // event type 246 - tEplEventSink m_EventSink /*:4*/; // event sink 247 - tEplNetTime m_NetTime; // timestamp 234 + typedef struct { 235 + tEplEventType m_EventType /*:28 */ ; // event type 236 + tEplEventSink m_EventSink /*:4 */ ; // event sink 237 + tEplNetTime m_NetTime; // timestamp 248 238 249 239 } tEplEventShort; 250 240 251 - 252 - typedef struct 253 - { 254 - unsigned int m_uiIndex; 255 - unsigned int m_uiSubIndex; 241 + typedef struct { 242 + unsigned int m_uiIndex; 243 + unsigned int m_uiSubIndex; 256 244 257 245 } tEplEventObdError; 258 246 259 - 260 247 // structure for kEplEventTypeError 261 - typedef struct 262 - { 263 - tEplEventSource m_EventSource; // module which posted this error event 264 - tEplKernel m_EplError; // EPL error which occured 265 - union 266 - { 267 - BYTE m_bArg; 268 - DWORD m_dwArg; 269 - tEplEventSource m_EventSource; // from Eventk/u module (originating error source) 270 - tEplEventObdError m_ObdError; // from Obd module 248 + typedef struct { 249 + tEplEventSource m_EventSource; // module which posted this error event 250 + tEplKernel m_EplError; // EPL error which occured 251 + union { 252 + BYTE m_bArg; 253 + DWORD m_dwArg; 254 + tEplEventSource m_EventSource; // from Eventk/u module (originating error source) 255 + tEplEventObdError m_ObdError; // from Obd module 271 256 // tEplErrHistoryEntry m_HistoryEntry; // from Nmtk/u module 272 257 273 - } m_Arg; 258 + } m_Arg; 274 259 275 260 } tEplEventError; 276 261 277 - 278 262 // structure for kEplEventTypeDllError 279 - typedef struct 280 - { 281 - unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_* 282 - unsigned int m_uiNodeId; 283 - tEplNmtState m_NmtState; 263 + typedef struct { 264 + unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_* 265 + unsigned int m_uiNodeId; 266 + tEplNmtState m_NmtState; 284 267 285 268 } tEplErrorHandlerkEvent; 286 269 287 - 288 270 // callback function to get informed about sync event 289 - typedef tEplKernel (PUBLIC* tEplSyncCb) (void); 271 + typedef tEplKernel(PUBLIC * tEplSyncCb) (void); 290 272 291 273 // callback function for generic events 292 - typedef tEplKernel (PUBLIC* tEplProcessEventCb) (tEplEvent* pEplEvent_p); 274 + typedef tEplKernel(PUBLIC * tEplProcessEventCb) (tEplEvent * pEplEvent_p); 293 275 294 276 //--------------------------------------------------------------------------- 295 277 // function prototypes 296 278 //--------------------------------------------------------------------------- 297 279 298 - 299 - 300 - #endif // #ifndef _EPL_EVENT_H_ 301 - 302 - 280 + #endif // #ifndef _EPL_EVENT_H_
+178 -208
drivers/staging/epl/EplFrame.h
··· 66 66 67 67 2006/05/22 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_FRAME_H_ 73 72 #define _EPL_FRAME_H_ 74 73 75 - 76 74 //--------------------------------------------------------------------------- 77 75 // const defines 78 76 //--------------------------------------------------------------------------- 79 77 80 - 81 78 // defines for EplFrame.m_wFlag 82 - #define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes) 83 - #define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA) 84 - #define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA) 85 - #define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes) 86 - #define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes) 87 - #define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq) 88 - #define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC) 89 - #define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC) 90 - #define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes) 91 - #define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes) 92 - #define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame 79 + #define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes) 80 + #define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA) 81 + #define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA) 82 + #define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes) 83 + #define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes) 84 + #define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq) 85 + #define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC) 86 + #define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC) 87 + #define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes) 88 + #define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes) 89 + #define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame 93 90 94 91 // error history/status entry types 95 92 #define EPL_ERR_ENTRYTYPE_STATUS 0x8000 ··· 101 104 #define EPL_ERR_ENTRYTYPE_PROF_MASK 0x0FFF 102 105 103 106 // defines for EPL version / PDO version 104 - #define EPL_VERSION_SUB 0x0F // sub version 105 - #define EPL_VERSION_MAIN 0xF0 // main version 106 - 107 + #define EPL_VERSION_SUB 0x0F // sub version 108 + #define EPL_VERSION_MAIN 0xF0 // main version 107 109 108 110 //--------------------------------------------------------------------------- 109 111 // typedef 110 112 //--------------------------------------------------------------------------- 111 - 112 113 113 114 // $$$ d.k.: move this definition to global.h 114 115 // byte-align structures ··· 120 125 # error you must byte-align these structures with the appropriate compiler directives 121 126 #endif 122 127 123 - 124 - typedef struct 125 - { 126 - // Offset 17 127 - BYTE m_le_bRes1; // reserved 128 - // Offset 18 129 - BYTE m_le_bFlag1; // Flags: MC, PS 130 - // Offset 19 131 - BYTE m_le_bFlag2; // Flags: res 132 - // Offset 20 133 - tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set 134 - // Offset 28 135 - QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set) 128 + typedef struct { 129 + // Offset 17 130 + BYTE m_le_bRes1; // reserved 131 + // Offset 18 132 + BYTE m_le_bFlag1; // Flags: MC, PS 133 + // Offset 19 134 + BYTE m_le_bFlag2; // Flags: res 135 + // Offset 20 136 + tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set 137 + // Offset 28 138 + QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set) 136 139 137 140 } PACK_STRUCT tEplSocFrame; 138 141 139 - typedef struct 140 - { 141 - // Offset 17 142 - BYTE m_le_bRes1; // reserved 143 - // Offset 18 144 - BYTE m_le_bFlag1; // Flags: MS, EA, RD 145 - // Offset 19 146 - BYTE m_le_bFlag2; // Flags: res 147 - // Offset 20 148 - BYTE m_le_bPdoVersion; 149 - // Offset 21 150 - BYTE m_le_bRes2; // reserved 151 - // Offset 22 152 - WORD m_le_wSize; 153 - // Offset 24 154 - BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16*/]; 142 + typedef struct { 143 + // Offset 17 144 + BYTE m_le_bRes1; // reserved 145 + // Offset 18 146 + BYTE m_le_bFlag1; // Flags: MS, EA, RD 147 + // Offset 19 148 + BYTE m_le_bFlag2; // Flags: res 149 + // Offset 20 150 + BYTE m_le_bPdoVersion; 151 + // Offset 21 152 + BYTE m_le_bRes2; // reserved 153 + // Offset 22 154 + WORD m_le_wSize; 155 + // Offset 24 156 + BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ]; 155 157 156 158 } PACK_STRUCT tEplPreqFrame; 157 159 158 - typedef struct 159 - { 160 - // Offset 17 161 - BYTE m_le_bNmtStatus; // NMT state 162 - // Offset 18 163 - BYTE m_le_bFlag1; // Flags: MS, EN, RD 164 - // Offset 19 165 - BYTE m_le_bFlag2; // Flags: PR, RS 166 - // Offset 20 167 - BYTE m_le_bPdoVersion; 168 - // Offset 21 169 - BYTE m_le_bRes2; // reserved 170 - // Offset 22 171 - WORD m_le_wSize; 172 - // Offset 24 173 - BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 174 - / D_NMT_IsochrTxMaxPayload_U16*/]; 160 + typedef struct { 161 + // Offset 17 162 + BYTE m_le_bNmtStatus; // NMT state 163 + // Offset 18 164 + BYTE m_le_bFlag1; // Flags: MS, EN, RD 165 + // Offset 19 166 + BYTE m_le_bFlag2; // Flags: PR, RS 167 + // Offset 20 168 + BYTE m_le_bPdoVersion; 169 + // Offset 21 170 + BYTE m_le_bRes2; // reserved 171 + // Offset 22 172 + WORD m_le_wSize; 173 + // Offset 24 174 + BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 175 + / D_NMT_IsochrTxMaxPayload_U16 */ ]; 175 176 176 177 } PACK_STRUCT tEplPresFrame; 177 178 178 - typedef struct 179 - { 180 - // Offset 17 181 - BYTE m_le_bNmtStatus; // NMT state 182 - // Offset 18 183 - BYTE m_le_bFlag1; // Flags: EA, ER 184 - // Offset 19 185 - BYTE m_le_bFlag2; // Flags: res 186 - // Offset 20 187 - BYTE m_le_bReqServiceId; 188 - // Offset 21 189 - BYTE m_le_bReqServiceTarget; 190 - // Offset 22 191 - BYTE m_le_bEplVersion; 179 + typedef struct { 180 + // Offset 17 181 + BYTE m_le_bNmtStatus; // NMT state 182 + // Offset 18 183 + BYTE m_le_bFlag1; // Flags: EA, ER 184 + // Offset 19 185 + BYTE m_le_bFlag2; // Flags: res 186 + // Offset 20 187 + BYTE m_le_bReqServiceId; 188 + // Offset 21 189 + BYTE m_le_bReqServiceTarget; 190 + // Offset 22 191 + BYTE m_le_bEplVersion; 192 192 193 193 } PACK_STRUCT tEplSoaFrame; 194 194 195 - typedef struct 196 - { 197 - WORD m_wEntryType; 198 - WORD m_wErrorCode; 199 - tEplNetTime m_TimeStamp; 200 - BYTE m_abAddInfo[8]; 195 + typedef struct { 196 + WORD m_wEntryType; 197 + WORD m_wErrorCode; 198 + tEplNetTime m_TimeStamp; 199 + BYTE m_abAddInfo[8]; 201 200 202 201 } PACK_STRUCT tEplErrHistoryEntry; 203 202 204 - typedef struct 205 - { 206 - // Offset 18 207 - BYTE m_le_bFlag1; // Flags: EN, EC 208 - BYTE m_le_bFlag2; // Flags: PR, RS 209 - BYTE m_le_bNmtStatus; // NMT state 210 - BYTE m_le_bRes1[3]; 211 - QWORD m_le_qwStaticError; // static error bit field 212 - tEplErrHistoryEntry m_le_aErrHistoryEntry[14]; 203 + typedef struct { 204 + // Offset 18 205 + BYTE m_le_bFlag1; // Flags: EN, EC 206 + BYTE m_le_bFlag2; // Flags: PR, RS 207 + BYTE m_le_bNmtStatus; // NMT state 208 + BYTE m_le_bRes1[3]; 209 + QWORD m_le_qwStaticError; // static error bit field 210 + tEplErrHistoryEntry m_le_aErrHistoryEntry[14]; 213 211 214 212 } PACK_STRUCT tEplStatusResponse; 215 213 216 - typedef struct 217 - { 218 - // Offset 18 219 - BYTE m_le_bFlag1; // Flags: res 220 - BYTE m_le_bFlag2; // Flags: PR, RS 221 - BYTE m_le_bNmtStatus; // NMT state 222 - BYTE m_le_bIdentRespFlags; // Flags: FW 223 - BYTE m_le_bEplProfileVersion; 224 - BYTE m_le_bRes1; 225 - DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32 226 - WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU 227 - WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16 228 - WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16 229 - DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32 230 - WORD m_le_wRes2; 231 - DWORD m_le_dwDeviceType; // NMT_DeviceType_U32 232 - DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 233 - DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 234 - DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 235 - DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 236 - QWORD m_le_qwVendorSpecificExt1; 237 - DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 238 - DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 239 - DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 240 - DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 241 - DWORD m_le_dwIpAddress; 242 - DWORD m_le_dwSubnetMask; 243 - DWORD m_le_dwDefaultGateway; 244 - BYTE m_le_sHostname[32]; 245 - BYTE m_le_abVendorSpecificExt2[48]; 214 + typedef struct { 215 + // Offset 18 216 + BYTE m_le_bFlag1; // Flags: res 217 + BYTE m_le_bFlag2; // Flags: PR, RS 218 + BYTE m_le_bNmtStatus; // NMT state 219 + BYTE m_le_bIdentRespFlags; // Flags: FW 220 + BYTE m_le_bEplProfileVersion; 221 + BYTE m_le_bRes1; 222 + DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32 223 + WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU 224 + WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16 225 + WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16 226 + DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32 227 + WORD m_le_wRes2; 228 + DWORD m_le_dwDeviceType; // NMT_DeviceType_U32 229 + DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 230 + DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 231 + DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 232 + DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 233 + QWORD m_le_qwVendorSpecificExt1; 234 + DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 235 + DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 236 + DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device 237 + DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device 238 + DWORD m_le_dwIpAddress; 239 + DWORD m_le_dwSubnetMask; 240 + DWORD m_le_dwDefaultGateway; 241 + BYTE m_le_sHostname[32]; 242 + BYTE m_le_abVendorSpecificExt2[48]; 246 243 247 244 } PACK_STRUCT tEplIdentResponse; 248 245 249 - typedef struct 250 - { 251 - // Offset 18 252 - BYTE m_le_bNmtCommandId; 253 - BYTE m_le_bRes1; 254 - BYTE m_le_abNmtCommandData[32]; 246 + typedef struct { 247 + // Offset 18 248 + BYTE m_le_bNmtCommandId; 249 + BYTE m_le_bRes1; 250 + BYTE m_le_abNmtCommandData[32]; 255 251 256 252 } PACK_STRUCT tEplNmtCommandService; 257 253 258 - typedef struct 259 - { 260 - BYTE m_le_bReserved; 261 - BYTE m_le_bTransactionId; 262 - BYTE m_le_bFlags; 263 - BYTE m_le_bCommandId; 264 - WORD m_le_wSegmentSize; 265 - WORD m_le_wReserved; 266 - BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder 254 + typedef struct { 255 + BYTE m_le_bReserved; 256 + BYTE m_le_bTransactionId; 257 + BYTE m_le_bFlags; 258 + BYTE m_le_bCommandId; 259 + WORD m_le_wSegmentSize; 260 + WORD m_le_wReserved; 261 + BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder 267 262 268 - }PACK_STRUCT tEplAsySdoCom; 269 - 263 + } PACK_STRUCT tEplAsySdoCom; 270 264 271 265 // asynchronous SDO Sequence Header 272 - typedef struct 273 - { 274 - BYTE m_le_bRecSeqNumCon; 275 - BYTE m_le_bSendSeqNumCon; 276 - BYTE m_le_abReserved[2]; 277 - tEplAsySdoCom m_le_abSdoSeqPayload; 266 + typedef struct { 267 + BYTE m_le_bRecSeqNumCon; 268 + BYTE m_le_bSendSeqNumCon; 269 + BYTE m_le_abReserved[2]; 270 + tEplAsySdoCom m_le_abSdoSeqPayload; 278 271 279 272 } PACK_STRUCT tEplAsySdoSeq; 280 273 281 - typedef struct 282 - { 283 - // Offset 18 284 - BYTE m_le_bNmtCommandId; 285 - BYTE m_le_bTargetNodeId; 286 - BYTE m_le_abNmtCommandData[32]; 274 + typedef struct { 275 + // Offset 18 276 + BYTE m_le_bNmtCommandId; 277 + BYTE m_le_bTargetNodeId; 278 + BYTE m_le_abNmtCommandData[32]; 287 279 288 280 } PACK_STRUCT tEplNmtRequestService; 289 281 290 - 291 - typedef union 292 - { 293 - // Offset 18 294 - tEplStatusResponse m_StatusResponse; 295 - tEplIdentResponse m_IdentResponse; 296 - tEplNmtCommandService m_NmtCommandService; 297 - tEplNmtRequestService m_NmtRequestService; 298 - tEplAsySdoSeq m_SdoSequenceFrame; 299 - BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 300 - / D_NMT_ASndRxMaxPayload_U16*/]; 282 + typedef union { 283 + // Offset 18 284 + tEplStatusResponse m_StatusResponse; 285 + tEplIdentResponse m_IdentResponse; 286 + tEplNmtCommandService m_NmtCommandService; 287 + tEplNmtRequestService m_NmtRequestService; 288 + tEplAsySdoSeq m_SdoSequenceFrame; 289 + BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 290 + / D_NMT_ASndRxMaxPayload_U16 */ ]; 301 291 302 292 } tEplAsndPayload; 303 293 304 - typedef struct 305 - { 306 - // Offset 17 307 - BYTE m_le_bServiceId; 308 - // Offset 18 309 - tEplAsndPayload m_Payload; 294 + typedef struct { 295 + // Offset 17 296 + BYTE m_le_bServiceId; 297 + // Offset 18 298 + tEplAsndPayload m_Payload; 310 299 311 300 } PACK_STRUCT tEplAsndFrame; 312 301 313 - typedef union 314 - { 315 - // Offset 17 316 - tEplSocFrame m_Soc; 317 - tEplPreqFrame m_Preq; 318 - tEplPresFrame m_Pres; 319 - tEplSoaFrame m_Soa; 320 - tEplAsndFrame m_Asnd; 302 + typedef union { 303 + // Offset 17 304 + tEplSocFrame m_Soc; 305 + tEplPreqFrame m_Preq; 306 + tEplPresFrame m_Pres; 307 + tEplSoaFrame m_Soa; 308 + tEplAsndFrame m_Asnd; 321 309 322 310 } tEplFrameData; 323 311 324 - typedef struct 325 - { 326 - // Offset 0 327 - BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes 328 - // Offset 6 329 - BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node 330 - // Offset 12 331 - WORD m_be_wEtherType; // Ethernet message type (big endian) 332 - // Offset 14 333 - BYTE m_le_bMessageType; // EPL message type 334 - // Offset 15 335 - BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes 336 - // Offset 16 337 - BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node 338 - // Offset 17 339 - tEplFrameData m_Data; 312 + typedef struct { 313 + // Offset 0 314 + BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes 315 + // Offset 6 316 + BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node 317 + // Offset 12 318 + WORD m_be_wEtherType; // Ethernet message type (big endian) 319 + // Offset 14 320 + BYTE m_le_bMessageType; // EPL message type 321 + // Offset 15 322 + BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes 323 + // Offset 16 324 + BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node 325 + // Offset 17 326 + tEplFrameData m_Data; 340 327 341 328 } PACK_STRUCT tEplFrame; 342 329 ··· 327 350 # pragma pack( pop, packing ) 328 351 #endif 329 352 330 - 331 - typedef enum 332 - { 333 - kEplMsgTypeNonEpl = 0x00, 334 - kEplMsgTypeSoc = 0x01, 335 - kEplMsgTypePreq = 0x03, 336 - kEplMsgTypePres = 0x04, 337 - kEplMsgTypeSoa = 0x05, 338 - kEplMsgTypeAsnd = 0x06, 353 + typedef enum { 354 + kEplMsgTypeNonEpl = 0x00, 355 + kEplMsgTypeSoc = 0x01, 356 + kEplMsgTypePreq = 0x03, 357 + kEplMsgTypePres = 0x04, 358 + kEplMsgTypeSoa = 0x05, 359 + kEplMsgTypeAsnd = 0x06, 339 360 340 361 } tEplMsgType; 341 - 342 - 343 362 344 363 //--------------------------------------------------------------------------- 345 364 // function prototypes 346 365 //--------------------------------------------------------------------------- 347 366 348 - 349 - #endif // #ifndef _EPL_FRAME_H_ 350 - 351 - 367 + #endif // #ifndef _EPL_FRAME_H_
+96 -109
drivers/staging/epl/EplInc.h
··· 66 66 67 67 2006/05/22 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_INC_H_ ··· 76 77 // ============================================================================ 77 78 #if defined(WIN32) || defined(_WIN32) 78 79 79 - #ifdef UNDER_RTSS 80 - // RTX header 81 - #include <windows.h> 82 - #include <process.h> 83 - #include <rtapi.h> 80 + #ifdef UNDER_RTSS 81 + // RTX header 82 + #include <windows.h> 83 + #include <process.h> 84 + #include <rtapi.h> 84 85 85 - #elif __BORLANDC__ 86 - // borland C header 87 - #include <windows.h> 88 - #include <process.h> 86 + #elif __BORLANDC__ 87 + // borland C header 88 + #include <windows.h> 89 + #include <process.h> 89 90 90 - #elif WINCE 91 - #include <windows.h> 91 + #elif WINCE 92 + #include <windows.h> 92 93 93 - #else 94 - // MSVC needs to include windows.h at first 95 - // the following defines ar necessary for function prototypes for waitable timers 96 - #define _WIN32_WINDOWS 0x0401 97 - #define _WIN32_WINNT 0x0400 98 - #include <windows.h> 99 - #include <process.h> 100 - #endif 94 + #else 95 + // MSVC needs to include windows.h at first 96 + // the following defines ar necessary for function prototypes for waitable timers 97 + #define _WIN32_WINDOWS 0x0401 98 + #define _WIN32_WINNT 0x0400 99 + #include <windows.h> 100 + #include <process.h> 101 + #endif 101 102 102 103 #endif 103 104 ··· 105 106 // possible other include file needed 106 107 // These constants defines modules which can be included in the Epl application. 107 108 // Use this constants for define EPL_MODULE_INTEGRATION in file EplCfg.h. 108 - #define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module 109 - #define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module 110 - #define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module 111 - #define EPL_MODULE_SDOS 0x00000008L // SDO Server module 112 - #define EPL_MODULE_SDOC 0x00000010L // SDO Client module 113 - #define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module 114 - #define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module 115 - #define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module 116 - #define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module 117 - #define EPL_MODULE_NMTU 0x00000200L // NMT user part module 118 - #define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module 119 - #define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module 120 - #define EPL_MODULE_DLLU 0x00001000L // DLL user part module 121 - #define EPL_MODULE_OBDU 0x00002000L // OBD user part module 122 - #define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module 123 - #define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module 124 - #define EPL_MODULE_PDOU 0x00010000L // PDO user part module 125 - #define EPL_MODULE_LEDU 0x00020000L // LED user part module 109 + #define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module 110 + #define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module 111 + #define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module 112 + #define EPL_MODULE_SDOS 0x00000008L // SDO Server module 113 + #define EPL_MODULE_SDOC 0x00000010L // SDO Client module 114 + #define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module 115 + #define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module 116 + #define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module 117 + #define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module 118 + #define EPL_MODULE_NMTU 0x00000200L // NMT user part module 119 + #define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module 120 + #define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module 121 + #define EPL_MODULE_DLLU 0x00001000L // DLL user part module 122 + #define EPL_MODULE_OBDU 0x00002000L // OBD user part module 123 + #define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module 124 + #define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module 125 + #define EPL_MODULE_PDOU 0x00010000L // PDO user part module 126 + #define EPL_MODULE_LEDU 0x00020000L // LED user part module 126 127 127 - #include "EplCfg.h" // EPL configuration file (configuration from application) 128 + #include "EplCfg.h" // EPL configuration file (configuration from application) 128 129 129 - #include "global.h" // global definitions 130 + #include "global.h" // global definitions 130 131 131 - #include "EplDef.h" // EPL configuration file (default configuration) 132 - #include "EplInstDef.h" // defines macros for instance types and table 133 - #include "Debug.h" // debug definitions 132 + #include "EplDef.h" // EPL configuration file (default configuration) 133 + #include "EplInstDef.h" // defines macros for instance types and table 134 + #include "Debug.h" // debug definitions 134 135 135 - #include "EplErrDef.h" // EPL error codes for API funtions 136 + #include "EplErrDef.h" // EPL error codes for API funtions 136 137 137 138 //--------------------------------------------------------------------------- 138 139 // typedef 139 140 //--------------------------------------------------------------------------- 140 141 141 142 // IEEE 1588 conformant net time structure 142 - typedef struct 143 - { 144 - DWORD m_dwSec; 145 - DWORD m_dwNanoSec; 143 + typedef struct { 144 + DWORD m_dwSec; 145 + DWORD m_dwNanoSec; 146 146 147 147 } tEplNetTime; 148 148 149 - 150 - #include "EplTarget.h" // target specific functions and definitions 149 + #include "EplTarget.h" // target specific functions and definitions 151 150 152 151 #include "EplAmi.h" 153 152 ··· 153 156 // macros 154 157 // ------------------------------------------------------------------------- 155 158 156 - #define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0 159 + #define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0 157 160 #define EPL_STACK_VERSION(ver,rev,rel) ((((DWORD)(ver)) & 0xFF)|((((DWORD)(rev))&0xFF)<<8)|(((DWORD)(rel))<<16)) 158 161 #define EPL_OBJ1018_VERSION(ver,rev,rel) ((((DWORD)(ver))<<16) |(((DWORD)(rev))&0xFFFF)) 159 162 #define EPL_STRING_VERSION(ver,rev,rel) "V" #ver "." #rev " r" #rel ··· 176 179 #define EPL_FEATURE_RT1 0x00001000 177 180 #define EPL_FEATURE_RT2 0x00002000 178 181 179 - 180 182 // generate EPL NMT_FeatureFlags_U32 181 183 #ifndef EPL_DEF_FEATURE_ISOCHR 182 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0) 183 - #define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR) 184 - #else 185 - #define EPL_DEF_FEATURE_ISOCHR 0 186 - #endif 184 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0) 185 + #define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR) 186 + #else 187 + #define EPL_DEF_FEATURE_ISOCHR 0 188 + #endif 187 189 #endif 188 190 189 191 #ifndef EPL_DEF_FEATURE_SDO_ASND 190 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0) 191 - #define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND) 192 - #else 193 - #define EPL_DEF_FEATURE_SDO_ASND 0 194 - #endif 192 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0) 193 + #define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND) 194 + #else 195 + #define EPL_DEF_FEATURE_SDO_ASND 0 196 + #endif 195 197 #endif 196 198 197 199 #ifndef EPL_DEF_FEATURE_SDO_UDP 198 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0) 199 - #define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP) 200 - #else 201 - #define EPL_DEF_FEATURE_SDO_UDP 0 202 - #endif 200 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0) 201 + #define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP) 202 + #else 203 + #define EPL_DEF_FEATURE_SDO_UDP 0 204 + #endif 203 205 #endif 204 206 205 207 #ifndef EPL_DEF_FEATURE_SDO_PDO 206 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0) 207 - #define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO) 208 - #else 209 - #define EPL_DEF_FEATURE_SDO_PDO 0 210 - #endif 208 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0) 209 + #define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO) 210 + #else 211 + #define EPL_DEF_FEATURE_SDO_PDO 0 212 + #endif 211 213 #endif 212 214 213 215 #ifndef EPL_DEF_FEATURE_PDO_DYN 214 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) 215 - #define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN) 216 - #else 217 - #define EPL_DEF_FEATURE_PDO_DYN 0 218 - #endif 216 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) 217 + #define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN) 218 + #else 219 + #define EPL_DEF_FEATURE_PDO_DYN 0 220 + #endif 219 221 #endif 220 222 221 223 #ifndef EPL_DEF_FEATURE_CFGMA 222 - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0) 223 - #define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA) 224 - #else 225 - #define EPL_DEF_FEATURE_CFGMA 0 226 - #endif 224 + #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0) 225 + #define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA) 226 + #else 227 + #define EPL_DEF_FEATURE_CFGMA 0 228 + #endif 227 229 #endif 228 230 229 231 #define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \ ··· 232 236 | EPL_DEF_FEATURE_PDO_DYN \ 233 237 | EPL_DEF_FEATURE_CFGMA) 234 238 235 - 236 239 #ifndef tabentries 237 240 #define tabentries(a) (sizeof(a)/sizeof(*(a))) 238 241 #endif 239 - 240 242 241 243 //--------------------------------------------------------------------------- 242 244 // const defines ··· 243 249 // definitions for DLL export 244 250 #if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB) 245 251 246 - #define EPLDLLEXPORT __declspec (dllexport) 252 + #define EPLDLLEXPORT __declspec (dllexport) 247 253 248 254 #else 249 255 250 - #define EPLDLLEXPORT 256 + #define EPLDLLEXPORT 251 257 252 258 #endif 253 - 254 259 255 260 // ============================================================================ 256 261 // common debug macros ··· 266 273 // default level is defined in copdef.h 267 274 268 275 // debug-level and TRACE-macros // standard-level // flags for DEF_DEBUG_LVL 269 - #define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L 276 + #define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L 270 277 #define EPL_DBGLVL_EDRV_TRACE0 DEBUG_LVL_01_TRACE0 271 278 #define EPL_DBGLVL_EDRV_TRACE1 DEBUG_LVL_01_TRACE1 272 279 #define EPL_DBGLVL_EDRV_TRACE2 DEBUG_LVL_01_TRACE2 273 280 #define EPL_DBGLVL_EDRV_TRACE3 DEBUG_LVL_01_TRACE3 274 281 #define EPL_DBGLVL_EDRV_TRACE4 DEBUG_LVL_01_TRACE4 275 282 276 - #define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L 283 + #define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L 277 284 #define EPL_DBGLVL_DLL_TRACE0 DEBUG_LVL_02_TRACE0 278 285 #define EPL_DBGLVL_DLL_TRACE1 DEBUG_LVL_02_TRACE1 279 286 #define EPL_DBGLVL_DLL_TRACE2 DEBUG_LVL_02_TRACE2 280 287 #define EPL_DBGLVL_DLL_TRACE3 DEBUG_LVL_02_TRACE3 281 288 #define EPL_DBGLVL_DLL_TRACE4 DEBUG_LVL_02_TRACE4 282 289 283 - #define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L 290 + #define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L 284 291 #define EPL_DBGLVL_OBD_TRACE0 DEBUG_LVL_03_TRACE0 285 292 #define EPL_DBGLVL_OBD_TRACE1 DEBUG_LVL_03_TRACE1 286 293 #define EPL_DBGLVL_OBD_TRACE2 DEBUG_LVL_03_TRACE2 287 294 #define EPL_DBGLVL_OBD_TRACE3 DEBUG_LVL_03_TRACE3 288 295 #define EPL_DBGLVL_OBD_TRACE4 DEBUG_LVL_03_TRACE4 289 296 290 - #define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L 297 + #define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L 291 298 #define EPL_DBGLVL_NMTK_TRACE0 DEBUG_LVL_04_TRACE0 292 299 #define EPL_DBGLVL_NMTK_TRACE1 DEBUG_LVL_04_TRACE1 293 300 #define EPL_DBGLVL_NMTK_TRACE2 DEBUG_LVL_04_TRACE2 294 301 #define EPL_DBGLVL_NMTK_TRACE3 DEBUG_LVL_04_TRACE3 295 302 #define EPL_DBGLVL_NMTK_TRACE4 DEBUG_LVL_04_TRACE4 296 303 297 - #define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L 304 + #define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L 298 305 #define EPL_DBGLVL_NMTCN_TRACE0 DEBUG_LVL_05_TRACE0 299 306 #define EPL_DBGLVL_NMTCN_TRACE1 DEBUG_LVL_05_TRACE1 300 307 #define EPL_DBGLVL_NMTCN_TRACE2 DEBUG_LVL_05_TRACE2 301 308 #define EPL_DBGLVL_NMTCN_TRACE3 DEBUG_LVL_05_TRACE3 302 309 #define EPL_DBGLVL_NMTCN_TRACE4 DEBUG_LVL_05_TRACE4 303 310 304 - #define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L 311 + #define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L 305 312 #define EPL_DBGLVL_NMTU_TRACE0 DEBUG_LVL_06_TRACE0 306 313 #define EPL_DBGLVL_NMTU_TRACE1 DEBUG_LVL_06_TRACE1 307 314 #define EPL_DBGLVL_NMTU_TRACE2 DEBUG_LVL_06_TRACE2 308 315 #define EPL_DBGLVL_NMTU_TRACE3 DEBUG_LVL_06_TRACE3 309 316 #define EPL_DBGLVL_NMTU_TRACE4 DEBUG_LVL_06_TRACE4 310 317 311 - #define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L 318 + #define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L 312 319 #define EPL_DBGLVL_NMTMN_TRACE0 DEBUG_LVL_07_TRACE0 313 320 #define EPL_DBGLVL_NMTMN_TRACE1 DEBUG_LVL_07_TRACE1 314 321 #define EPL_DBGLVL_NMTMN_TRACE2 DEBUG_LVL_07_TRACE2 ··· 317 324 318 325 //... 319 326 320 - #define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000 327 + #define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000 321 328 #define EPL_DBGLVL_SDO_TRACE0 DEBUG_LVL_25_TRACE0 322 329 #define EPL_DBGLVL_SDO_TRACE1 DEBUG_LVL_25_TRACE1 323 330 #define EPL_DBGLVL_SDO_TRACE2 DEBUG_LVL_25_TRACE2 324 331 #define EPL_DBGLVL_SDO_TRACE3 DEBUG_LVL_25_TRACE3 325 332 #define EPL_DBGLVL_SDO_TRACE4 DEBUG_LVL_25_TRACE4 326 333 327 - #define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000 334 + #define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000 328 335 #define EPL_DBGLVL_VETH_TRACE0 DEBUG_LVL_26_TRACE0 329 336 #define EPL_DBGLVL_VETH_TRACE1 DEBUG_LVL_26_TRACE1 330 337 #define EPL_DBGLVL_VETH_TRACE2 DEBUG_LVL_26_TRACE2 331 338 #define EPL_DBGLVL_VETH_TRACE3 DEBUG_LVL_26_TRACE3 332 339 #define EPL_DBGLVL_VETH_TRACE4 DEBUG_LVL_26_TRACE4 333 340 334 - #define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000 341 + #define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000 335 342 #define EPL_DBGLVL_EVENTK_TRACE0 DEBUG_LVL_27_TRACE0 336 343 #define EPL_DBGLVL_EVENTK_TRACE1 DEBUG_LVL_27_TRACE1 337 344 #define EPL_DBGLVL_EVENTK_TRACE2 DEBUG_LVL_27_TRACE2 338 345 #define EPL_DBGLVL_EVENTK_TRACE3 DEBUG_LVL_27_TRACE3 339 346 #define EPL_DBGLVL_EVENTK_TRACE4 DEBUG_LVL_27_TRACE4 340 347 341 - #define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000 348 + #define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000 342 349 #define EPL_DBGLVL_EVENTU_TRACE0 DEBUG_LVL_28_TRACE0 343 350 #define EPL_DBGLVL_EVENTU_TRACE1 DEBUG_LVL_28_TRACE1 344 351 #define EPL_DBGLVL_EVENTU_TRACE2 DEBUG_LVL_28_TRACE2 ··· 346 353 #define EPL_DBGLVL_EVENTU_TRACE4 DEBUG_LVL_28_TRACE4 347 354 348 355 // SharedBuff 349 - #define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000 356 + #define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000 350 357 #define EPL_DBGLVL_SHB_TRACE0 DEBUG_LVL_29_TRACE0 351 358 #define EPL_DBGLVL_SHB_TRACE1 DEBUG_LVL_29_TRACE1 352 359 #define EPL_DBGLVL_SHB_TRACE2 DEBUG_LVL_29_TRACE2 353 360 #define EPL_DBGLVL_SHB_TRACE3 DEBUG_LVL_29_TRACE3 354 361 #define EPL_DBGLVL_SHB_TRACE4 DEBUG_LVL_29_TRACE4 355 362 356 - #define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L 363 + #define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L 357 364 #define EPL_DBGLVL_ASSERT_TRACE0 DEBUG_LVL_ASSERT_TRACE0 358 365 #define EPL_DBGLVL_ASSERT_TRACE1 DEBUG_LVL_ASSERT_TRACE1 359 366 #define EPL_DBGLVL_ASSERT_TRACE2 DEBUG_LVL_ASSERT_TRACE2 360 367 #define EPL_DBGLVL_ASSERT_TRACE3 DEBUG_LVL_ASSERT_TRACE3 361 368 #define EPL_DBGLVL_ASSERT_TRACE4 DEBUG_LVL_ASSERT_TRACE4 362 369 363 - #define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L 370 + #define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L 364 371 #define EPL_DBGLVL_ERROR_TRACE0 DEBUG_LVL_ERROR_TRACE0 365 372 #define EPL_DBGLVL_ERROR_TRACE1 DEBUG_LVL_ERROR_TRACE1 366 373 #define EPL_DBGLVL_ERROR_TRACE2 DEBUG_LVL_ERROR_TRACE2 367 374 #define EPL_DBGLVL_ERROR_TRACE3 DEBUG_LVL_ERROR_TRACE3 368 375 #define EPL_DBGLVL_ERROR_TRACE4 DEBUG_LVL_ERROR_TRACE4 369 376 370 - #define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L 377 + #define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L 371 378 #define EPL_DBGLVL_ALWAYS_TRACE0 DEBUG_LVL_ALWAYS_TRACE0 372 379 #define EPL_DBGLVL_ALWAYS_TRACE1 DEBUG_LVL_ALWAYS_TRACE1 373 380 #define EPL_DBGLVL_ALWAYS_TRACE2 DEBUG_LVL_ALWAYS_TRACE2 374 381 #define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3 375 382 #define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4 376 383 377 - 378 384 //--------------------------------------------------------------------------- 379 385 // typedef 380 386 //--------------------------------------------------------------------------- 381 - 382 - 383 387 384 388 //--------------------------------------------------------------------------- 385 389 // function prototypes 386 390 //--------------------------------------------------------------------------- 387 391 388 - 389 - #endif // #ifndef _EPL_INC_H_ 390 - 391 - 392 + #endif // #ifndef _EPL_INC_H_
+106 -115
drivers/staging/epl/EplInstDef.h
··· 71 71 #ifndef _EPLINSTDEF_H_ 72 72 #define _EPLINSTDEF_H_ 73 73 74 - 75 74 // ========================================================================= 76 75 // types and macros for generating instances 77 76 // ========================================================================= 78 77 79 - typedef enum 80 - { 81 - kStateUnused = 0, 82 - kStateDeleted = 1, 83 - kStateUsed = 0xFF 84 - 78 + typedef enum { 79 + kStateUnused = 0, 80 + kStateDeleted = 1, 81 + kStateUsed = 0xFF 85 82 } tInstState; 86 83 87 84 //------------------------------------------------------------------------------------------ 88 85 89 - typedef void MEM* tEplPtrInstance; 90 - typedef BYTE tEplInstanceHdl; 86 + typedef void MEM *tEplPtrInstance; 87 + typedef BYTE tEplInstanceHdl; 91 88 92 89 // define const for illegale values 93 90 #define CCM_ILLINSTANCE NULL ··· 99 102 //-------------------------------------------------------------------------------------- 100 103 101 104 // memory attributes for instance table 102 - #define INST_NEAR // faster access to variables 103 - #define INST_FAR // variables wich have to located in xdata 104 - #define STATIC // prevent warnings for variables with same name 105 + #define INST_NEAR // faster access to variables 106 + #define INST_FAR // variables wich have to located in xdata 107 + #define STATIC // prevent warnings for variables with same name 105 108 106 - #define INSTANCE_TYPE_BEGIN typedef struct { 107 - #define INSTANCE_TYPE_END } tEplInstanceInfo; 108 - 109 + #define INSTANCE_TYPE_BEGIN typedef struct { 110 + #define INSTANCE_TYPE_END } tEplInstanceInfo; 109 111 110 112 //-------------------------------------------------------------------------------------- 111 113 // macro definition for API interface ··· 113 117 // declaration: 114 118 115 119 // macros for declaration within function header or prototype of API functions 116 - #define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle 117 - #define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle, 120 + #define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle 121 + #define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle, 118 122 119 123 // macros for declaration of pointer to instance handle within function header or prototype of API functions 120 - #define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle 121 - #define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle, 124 + #define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle 125 + #define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle, 122 126 123 127 // macros for declaration instance as lokacl variable within functions 124 - #define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance; 125 - #define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle; 128 + #define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance; 129 + #define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle; 126 130 127 131 // reference: 128 132 129 133 // macros for reference of instance handle for function parameters 130 - #define CCM_INSTANCE_HDL InstanceHandle 131 - #define CCM_INSTANCE_HDL_ InstanceHandle, 134 + #define CCM_INSTANCE_HDL InstanceHandle 135 + #define CCM_INSTANCE_HDL_ InstanceHandle, 132 136 133 137 // macros for reference of instance parameter for function parameters 134 - #define CCM_INSTANCE_PARAM(par) par 135 - #define CCM_INSTANCE_PARAM_(par) par, 138 + #define CCM_INSTANCE_PARAM(par) par 139 + #define CCM_INSTANCE_PARAM_(par) par, 136 140 137 141 // macros for reference of instance parameter for writing or reading values 138 - #define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance)) 142 + #define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance)) 139 143 140 144 // processing: 141 145 142 146 // macros for process instance handle 143 - #define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \ 147 + #define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \ 144 148 {return (kEplIllegalInstance);} 145 149 146 - 147 150 // macros for process pointer to instance handle 148 - #define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \ 151 + #define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \ 149 152 {return (kEplInvalidInstanceParam);} 150 153 151 154 // This macro returned the handle and pointer to next free instance. 152 - #define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \ 155 + #define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \ 153 156 ASSERT (*pInstanceHandle != CCM_ILLINSTANCE_HDL); 154 157 155 - #define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \ 158 + #define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \ 156 159 {return (kEplNoFreeInstance);} 157 160 158 - #define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle); 159 - #define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \ 161 + #define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle); 162 + #define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \ 160 163 ASSERT (pInstance != CCM_ILLINSTANCE); 161 - 162 164 163 165 //-------------------------------------------------------------------------------------- 164 166 // macro definition for stack interface ··· 165 171 // macros for declaration within the function header, prototype or local var list 166 172 // Declaration of pointers within function paramater list must defined as void MEM* 167 173 // pointer. 168 - #define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance 169 - #define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance, 170 - #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance; 174 + #define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance 175 + #define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance, 176 + #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance; 171 177 172 178 // macros for reference of pointer to instance 173 179 // These macros are used for parameter passing to called function. 174 - #define EPL_MCO_INSTANCE_PTR pInstance 175 - #define EPL_MCO_INSTANCE_PTR_ pInstance, 176 - #define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance, 180 + #define EPL_MCO_INSTANCE_PTR pInstance 181 + #define EPL_MCO_INSTANCE_PTR_ pInstance, 182 + #define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance, 177 183 178 184 // macro for access of struct members of one instance 179 185 // An access to a member of instance table must be casted by the local 180 186 // defined type of instance table. 181 - #define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance) 182 - #define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var) 187 + #define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance) 188 + #define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var) 183 189 184 190 // macros for process pointer to instance 185 - #define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle); 186 - #define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \ 191 + #define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle); 192 + #define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \ 187 193 ASSERT (pInstance != CCM_ILLINSTANCE); 188 194 189 195 // This macro should be used to check the passed pointer to an public function 190 - #define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \ 196 + #define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \ 191 197 ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed); 192 198 193 199 // macros for declaration of pointer to instance pointer 194 - #define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr 195 - #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr, 200 + #define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr 201 + #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr, 196 202 197 203 // macros for reference of pointer to instance pointer 198 204 // These macros are used for parameter passing to called function. 199 - #define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr 200 - #define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr, 205 + #define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr 206 + #define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr, 201 207 202 208 // macros for process pointer to instance pointer 203 - #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL); 204 - #define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance); 209 + #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL); 210 + #define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance); 205 211 206 - #define EPL_MCO_INSTANCE_PARAM(a) (a) 207 - #define EPL_MCO_INSTANCE_PARAM_(a) (a), 208 - #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) 209 - #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) 210 - #define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a; 212 + #define EPL_MCO_INSTANCE_PARAM(a) (a) 213 + #define EPL_MCO_INSTANCE_PARAM_(a) (a), 214 + #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) 215 + #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) 216 + #define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a; 211 217 212 218 // this macro deletes all instance entries as unused 213 - #define EPL_MCO_DELETE_INSTANCE_TABLE() \ 219 + #define EPL_MCO_DELETE_INSTANCE_TABLE() \ 214 220 { \ 215 221 tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \ 216 222 tFastByte InstNumber = 0; \ ··· 223 229 } 224 230 225 231 // definition of functions which has to be defined in each module of CANopen stack 226 - #define EPL_MCO_DEFINE_INSTANCE_FCT() \ 232 + #define EPL_MCO_DEFINE_INSTANCE_FCT() \ 227 233 static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p); \ 228 234 static tEplPtrInstance GetFreeInstance (void); 229 - #define EPL_MCO_DECL_INSTANCE_FCT() \ 235 + #define EPL_MCO_DECL_INSTANCE_FCT() \ 230 236 static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \ 231 237 return &aEplInstanceTable_g[InstHandle_p]; } \ 232 238 static tEplPtrInstance GetFreeInstance (void) { \ ··· 239 245 return CCM_ILLINSTANCE; } 240 246 241 247 // this macro defines the instance table. Each entry is reserved for an instance of CANopen. 242 - #define EPL_MCO_DECL_INSTANCE_VAR() \ 248 + #define EPL_MCO_DECL_INSTANCE_VAR() \ 243 249 static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES]; 244 250 245 251 // this macro defines member variables in instance table which are needed in 246 252 // all modules of Epl stack 247 - #define EPL_MCO_DECL_INSTANCE_MEMBER() \ 253 + #define EPL_MCO_DECL_INSTANCE_MEMBER() \ 248 254 STATIC BYTE m_InstState; \ 249 255 STATIC BYTE m_bInstIndex; 250 256 251 - #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) 252 - #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) 257 + #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) 258 + #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) 253 259 254 - #else // only one instance is used 260 + #else // only one instance is used 255 261 256 262 // Memory attributes for instance table. 257 - #define INST_NEAR NEAR // faster access to variables 258 - #define INST_FAR MEM // variables wich have to located in xdata 259 - #define STATIC static // prevent warnings for variables with same name 263 + #define INST_NEAR NEAR // faster access to variables 264 + #define INST_FAR MEM // variables wich have to located in xdata 265 + #define STATIC static // prevent warnings for variables with same name 260 266 261 - #define INSTANCE_TYPE_BEGIN 262 - #define INSTANCE_TYPE_END 267 + #define INSTANCE_TYPE_BEGIN 268 + #define INSTANCE_TYPE_END 263 269 264 270 // macros for declaration, initializing and member access for instance handle 265 271 // This class of macros are used by API function to inform CCM-modul which ··· 267 273 268 274 // macros for reference of instance handle 269 275 // These macros are used for parameter passing to CANopen API function. 270 - #define CCM_INSTANCE_HDL 271 - #define CCM_INSTANCE_HDL_ 276 + #define CCM_INSTANCE_HDL 277 + #define CCM_INSTANCE_HDL_ 272 278 273 - #define CCM_DECL_INSTANCE_PTR_LOCAL 279 + #define CCM_DECL_INSTANCE_PTR_LOCAL 274 280 275 281 // macros for declaration within the function header or prototype 276 - #define CCM_DECL_INSTANCE_HDL void 277 - #define CCM_DECL_INSTANCE_HDL_ 282 + #define CCM_DECL_INSTANCE_HDL void 283 + #define CCM_DECL_INSTANCE_HDL_ 278 284 279 285 // macros for process instance handle 280 - #define CCM_CHECK_INSTANCE_HDL() 286 + #define CCM_CHECK_INSTANCE_HDL() 281 287 282 288 // macros for declaration of pointer to instance handle 283 - #define CCM_DECL_PTR_INSTANCE_HDL void 284 - #define CCM_DECL_PTR_INSTANCE_HDL_ 289 + #define CCM_DECL_PTR_INSTANCE_HDL void 290 + #define CCM_DECL_PTR_INSTANCE_HDL_ 285 291 286 292 // macros for process pointer to instance handle 287 - #define CCM_CHECK_PTR_INSTANCE_HDL() 293 + #define CCM_CHECK_PTR_INSTANCE_HDL() 288 294 289 295 // This macro returned the handle and pointer to next free instance. 290 - #define CCM_GET_FREE_INSTANCE_AND_HDL() 296 + #define CCM_GET_FREE_INSTANCE_AND_HDL() 291 297 292 - #define CCM_CHECK_INSTANCE_PTR() 298 + #define CCM_CHECK_INSTANCE_PTR() 293 299 294 - #define CCM_GET_INSTANCE_PTR() 295 - #define CCM_GET_FREE_INSTANCE_PTR() 300 + #define CCM_GET_INSTANCE_PTR() 301 + #define CCM_GET_FREE_INSTANCE_PTR() 296 302 297 - #define CCM_INSTANCE_PARAM(par) 298 - #define CCM_INSTANCE_PARAM_(par) 303 + #define CCM_INSTANCE_PARAM(par) 304 + #define CCM_INSTANCE_PARAM_(par) 299 305 300 - #define CCM_INST_ENTRY aCcmInstanceTable_g[0] 306 + #define CCM_INST_ENTRY aCcmInstanceTable_g[0] 301 307 302 308 // macros for declaration, initializing and member access for instance pointer 303 309 // This class of macros are used by CANopen internal function to point to one instance. 304 310 305 311 // macros for declaration within the function header, prototype or local var list 306 - #define EPL_MCO_DECL_INSTANCE_PTR void 307 - #define EPL_MCO_DECL_INSTANCE_PTR_ 308 - #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL 312 + #define EPL_MCO_DECL_INSTANCE_PTR void 313 + #define EPL_MCO_DECL_INSTANCE_PTR_ 314 + #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL 309 315 310 316 // macros for reference of pointer to instance 311 317 // These macros are used for parameter passing to called function. 312 - #define EPL_MCO_INSTANCE_PTR 313 - #define EPL_MCO_INSTANCE_PTR_ 314 - #define EPL_MCO_ADDR_INSTANCE_PTR_ 318 + #define EPL_MCO_INSTANCE_PTR 319 + #define EPL_MCO_INSTANCE_PTR_ 320 + #define EPL_MCO_ADDR_INSTANCE_PTR_ 315 321 316 322 // macros for process pointer to instance 317 - #define EPL_MCO_GET_INSTANCE_PTR() 318 - #define EPL_MCO_GET_FREE_INSTANCE_PTR() 323 + #define EPL_MCO_GET_INSTANCE_PTR() 324 + #define EPL_MCO_GET_FREE_INSTANCE_PTR() 319 325 320 326 // This macro should be used to check the passed pointer to an public function 321 - #define EPL_MCO_CHECK_INSTANCE_STATE() 327 + #define EPL_MCO_CHECK_INSTANCE_STATE() 322 328 323 329 // macros for declaration of pointer to instance pointer 324 - #define EPL_MCO_DECL_PTR_INSTANCE_PTR void 325 - #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ 330 + #define EPL_MCO_DECL_PTR_INSTANCE_PTR void 331 + #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ 326 332 327 333 // macros for reference of pointer to instance pointer 328 334 // These macros are used for parameter passing to called function. 329 - #define EPL_MCO_PTR_INSTANCE_PTR 330 - #define EPL_MCO_PTR_INSTANCE_PTR_ 335 + #define EPL_MCO_PTR_INSTANCE_PTR 336 + #define EPL_MCO_PTR_INSTANCE_PTR_ 331 337 332 338 // macros for process pointer to instance pointer 333 - #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() 334 - #define EPL_MCO_SET_PTR_INSTANCE_PTR() 339 + #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() 340 + #define EPL_MCO_SET_PTR_INSTANCE_PTR() 335 341 336 - #define EPL_MCO_INSTANCE_PARAM(a) 337 - #define EPL_MCO_INSTANCE_PARAM_(a) 338 - #define EPL_MCO_INSTANCE_PARAM_IDX_() 339 - #define EPL_MCO_INSTANCE_PARAM_IDX() 342 + #define EPL_MCO_INSTANCE_PARAM(a) 343 + #define EPL_MCO_INSTANCE_PARAM_(a) 344 + #define EPL_MCO_INSTANCE_PARAM_IDX_() 345 + #define EPL_MCO_INSTANCE_PARAM_IDX() 340 346 341 347 // macro for access of struct members of one instance 342 - #define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0] 343 - #define EPL_MCO_GLB_VAR(var) (var) 344 - #define EPL_MCO_WRITE_INSTANCE_STATE(a) 348 + #define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0] 349 + #define EPL_MCO_GLB_VAR(var) (var) 350 + #define EPL_MCO_WRITE_INSTANCE_STATE(a) 345 351 346 352 // this macro deletes all instance entries as unused 347 - #define EPL_MCO_DELETE_INSTANCE_TABLE() 353 + #define EPL_MCO_DELETE_INSTANCE_TABLE() 348 354 349 355 // definition of functions which has to be defined in each module of CANopen stack 350 - #define EPL_MCO_DEFINE_INSTANCE_FCT() 351 - #define EPL_MCO_DECL_INSTANCE_FCT() 356 + #define EPL_MCO_DEFINE_INSTANCE_FCT() 357 + #define EPL_MCO_DECL_INSTANCE_FCT() 352 358 353 359 // this macro defines the instance table. Each entry is reserved for an instance of CANopen. 354 - #define EPL_MCO_DECL_INSTANCE_VAR() 360 + #define EPL_MCO_DECL_INSTANCE_VAR() 355 361 356 362 // this macro defines member variables in instance table which are needed in 357 363 // all modules of CANopen stack 358 - #define EPL_MCO_DECL_INSTANCE_MEMBER() 364 + #define EPL_MCO_DECL_INSTANCE_MEMBER() 359 365 360 366 #endif 361 - 362 367 363 368 /* 364 369 #if (CDRV_MAX_INSTANCES > 1) ··· 371 378 #endif 372 379 */ 373 380 374 - 375 381 #endif // _EPLINSTDEF_H_ 376 382 377 383 // Die letzte Zeile mu� unbedingt eine leere Zeile sein, weil manche Compiler 378 384 // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). 379 -
+4 -16
drivers/staging/epl/EplLed.h
··· 66 66 67 67 2008/11/17 d.k.: start of the implementation 68 68 69 - 70 69 ****************************************************************************/ 71 - 72 70 73 71 #ifndef _EPLLED_H_ 74 72 #define _EPLLED_H_ 75 - 76 73 77 74 //--------------------------------------------------------------------------- 78 75 // const defines 79 76 //--------------------------------------------------------------------------- 80 77 81 - 82 78 //--------------------------------------------------------------------------- 83 79 // typedef 84 80 //--------------------------------------------------------------------------- 85 81 86 - 87 - typedef enum 88 - { 89 - kEplLedTypeStatus = 0x00, 90 - kEplLedTypeError = 0x01, 82 + typedef enum { 83 + kEplLedTypeStatus = 0x00, 84 + kEplLedTypeError = 0x01, 91 85 92 86 } tEplLedType; 93 - 94 - 95 - 96 87 97 88 //--------------------------------------------------------------------------- 98 89 // function prototypes 99 90 //--------------------------------------------------------------------------- 100 91 101 - 102 - #endif // #ifndef _EPLLED_H_ 103 - 104 - 92 + #endif // #ifndef _EPLLED_H_
+101 -119
drivers/staging/epl/EplNmt.h
··· 66 66 67 67 2006/06/09 k.t.: start of the implementation 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPLNMT_H_ ··· 78 79 //--------------------------------------------------------------------------- 79 80 80 81 // define super-states and masks to identify a super-state 81 - #define EPL_NMT_GS_POWERED 0x0008 // super state 82 - #define EPL_NMT_GS_INITIALISATION 0x0009 // super state 83 - #define EPL_NMT_GS_COMMUNICATING 0x000C // super state 84 - #define EPL_NMT_CS_EPLMODE 0x000D // super state 85 - #define EPL_NMT_MS_EPLMODE 0x000D // super state 82 + #define EPL_NMT_GS_POWERED 0x0008 // super state 83 + #define EPL_NMT_GS_INITIALISATION 0x0009 // super state 84 + #define EPL_NMT_GS_COMMUNICATING 0x000C // super state 85 + #define EPL_NMT_CS_EPLMODE 0x000D // super state 86 + #define EPL_NMT_MS_EPLMODE 0x000D // super state 86 87 87 - #define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state 88 + #define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state 88 89 89 - #define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined 90 - #define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state 91 - #define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state 92 - #define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS) 90 + #define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined 91 + #define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state 92 + #define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state 93 + #define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS) 93 94 94 95 //--------------------------------------------------------------------------- 95 96 // typedef ··· 105 106 // --> there are masks defined to indentify the 106 107 // super-states 107 108 108 - typedef enum 109 - { 110 - kEplNmtGsOff = 0x0000, 111 - kEplNmtGsInitialising = 0x0019, 112 - kEplNmtGsResetApplication = 0x0029, 113 - kEplNmtGsResetCommunication = 0x0039, 114 - kEplNmtGsResetConfiguration = 0x0079, 115 - kEplNmtCsNotActive = 0x011C, 116 - kEplNmtCsPreOperational1 = 0x011D, 117 - kEplNmtCsStopped = 0x014D, 118 - kEplNmtCsPreOperational2 = 0x015D, 119 - kEplNmtCsReadyToOperate = 0x016D, 120 - kEplNmtCsOperational = 0x01FD, 121 - kEplNmtCsBasicEthernet = 0x011E, 122 - kEplNmtMsNotActive = 0x021C, 123 - kEplNmtMsPreOperational1 = 0x021D, 124 - kEplNmtMsPreOperational2 = 0x025D, 125 - kEplNmtMsReadyToOperate = 0x026D, 126 - kEplNmtMsOperational = 0x02FD, 127 - kEplNmtMsBasicEthernet = 0x021E 128 - 109 + typedef enum { 110 + kEplNmtGsOff = 0x0000, 111 + kEplNmtGsInitialising = 0x0019, 112 + kEplNmtGsResetApplication = 0x0029, 113 + kEplNmtGsResetCommunication = 0x0039, 114 + kEplNmtGsResetConfiguration = 0x0079, 115 + kEplNmtCsNotActive = 0x011C, 116 + kEplNmtCsPreOperational1 = 0x011D, 117 + kEplNmtCsStopped = 0x014D, 118 + kEplNmtCsPreOperational2 = 0x015D, 119 + kEplNmtCsReadyToOperate = 0x016D, 120 + kEplNmtCsOperational = 0x01FD, 121 + kEplNmtCsBasicEthernet = 0x011E, 122 + kEplNmtMsNotActive = 0x021C, 123 + kEplNmtMsPreOperational1 = 0x021D, 124 + kEplNmtMsPreOperational2 = 0x025D, 125 + kEplNmtMsReadyToOperate = 0x026D, 126 + kEplNmtMsOperational = 0x02FD, 127 + kEplNmtMsBasicEthernet = 0x021E 129 128 } tEplNmtState; 130 129 131 130 // NMT-events 132 - typedef enum 133 - { 134 - // Events from DLL 135 - // Events defined by EPL V2 specification 136 - kEplNmtEventNoEvent = 0x00, 131 + typedef enum { 132 + // Events from DLL 133 + // Events defined by EPL V2 specification 134 + kEplNmtEventNoEvent = 0x00, 137 135 // kEplNmtEventDllMePres = 0x01, 138 - kEplNmtEventDllMePresTimeout = 0x02, 136 + kEplNmtEventDllMePresTimeout = 0x02, 139 137 // kEplNmtEventDllMeAsnd = 0x03, 140 138 // kEplNmtEventDllMeAsndTimeout = 0x04, 141 - kEplNmtEventDllMeSoaSent = 0x04, 142 - kEplNmtEventDllMeSocTrig = 0x05, 143 - kEplNmtEventDllMeSoaTrig = 0x06, 144 - kEplNmtEventDllCeSoc = 0x07, 145 - kEplNmtEventDllCePreq = 0x08, 146 - kEplNmtEventDllCePres = 0x09, 147 - kEplNmtEventDllCeSoa = 0x0A, 148 - kEplNmtEventDllCeAsnd = 0x0B, 149 - kEplNmtEventDllCeFrameTimeout = 0x0C, 139 + kEplNmtEventDllMeSoaSent = 0x04, 140 + kEplNmtEventDllMeSocTrig = 0x05, 141 + kEplNmtEventDllMeSoaTrig = 0x06, 142 + kEplNmtEventDllCeSoc = 0x07, 143 + kEplNmtEventDllCePreq = 0x08, 144 + kEplNmtEventDllCePres = 0x09, 145 + kEplNmtEventDllCeSoa = 0x0A, 146 + kEplNmtEventDllCeAsnd = 0x0B, 147 + kEplNmtEventDllCeFrameTimeout = 0x0C, 150 148 151 - // Events triggered by NMT-Commands 152 - kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8 153 - kEplNmtEventResetNode = 0x11, 154 - kEplNmtEventResetCom = 0x12, 155 - kEplNmtEventResetConfig = 0x13, 156 - kEplNmtEventEnterPreOperational2= 0x14, 157 - kEplNmtEventEnableReadyToOperate= 0x15, 158 - kEplNmtEventStartNode = 0x16, // NMT_CT7 159 - kEplNmtEventStopNode = 0x17, 149 + // Events triggered by NMT-Commands 150 + kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8 151 + kEplNmtEventResetNode = 0x11, 152 + kEplNmtEventResetCom = 0x12, 153 + kEplNmtEventResetConfig = 0x13, 154 + kEplNmtEventEnterPreOperational2 = 0x14, 155 + kEplNmtEventEnableReadyToOperate = 0x15, 156 + kEplNmtEventStartNode = 0x16, // NMT_CT7 157 + kEplNmtEventStopNode = 0x17, 160 158 161 - // Events triggered by higher layer 162 - kEplNmtEventEnterResetApp = 0x20, 163 - kEplNmtEventEnterResetCom = 0x21, 164 - kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication 165 - kEplNmtEventEnterResetConfig = 0x23, 166 - kEplNmtEventEnterCsNotActive = 0x24, 167 - kEplNmtEventEnterMsNotActive = 0x25, 168 - kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth) 169 - kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1) 170 - kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1 171 - kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent) 172 - kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2 173 - kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp 174 - kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN 175 - kEplNmtEventSwitchOff = 0x2D, // enter state Off 176 - kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error 159 + // Events triggered by higher layer 160 + kEplNmtEventEnterResetApp = 0x20, 161 + kEplNmtEventEnterResetCom = 0x21, 162 + kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication 163 + kEplNmtEventEnterResetConfig = 0x23, 164 + kEplNmtEventEnterCsNotActive = 0x24, 165 + kEplNmtEventEnterMsNotActive = 0x25, 166 + kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth) 167 + kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1) 168 + kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1 169 + kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent) 170 + kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2 171 + kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp 172 + kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN 173 + kEplNmtEventSwitchOff = 0x2D, // enter state Off 174 + kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error 177 175 178 176 } tEplNmtEvent; 179 177 180 - 181 178 // type for argument of event kEplEventTypeNmtStateChange 182 - typedef struct 183 - { 184 - tEplNmtState m_NewNmtState; 185 - tEplNmtEvent m_NmtEvent; 179 + typedef struct { 180 + tEplNmtState m_NewNmtState; 181 + tEplNmtEvent m_NmtEvent; 186 182 187 183 } tEplEventNmtStateChange; 188 184 189 - 190 185 // structure for kEplEventTypeHeartbeat 191 - typedef struct 192 - { 193 - unsigned int m_uiNodeId; // NodeId 194 - tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN) 195 - WORD m_wErrorCode; // EPL error code in case of NMT state NotActive 186 + typedef struct { 187 + unsigned int m_uiNodeId; // NodeId 188 + tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN) 189 + WORD m_wErrorCode; // EPL error code in case of NMT state NotActive 196 190 197 191 } tEplHeartbeatEvent; 198 192 199 - 200 - typedef enum 201 - { 202 - kEplNmtNodeEventFound = 0x00, 203 - kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN 204 - kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN 205 - kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module) 206 - kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN 207 - kEplNmtNodeEventReadyToStart= 0x05, // issued if EPL_NMTST_NO_STARTNODE set 208 - // application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually 209 - kEplNmtNodeEventNmtState = 0x06, 210 - kEplNmtNodeEventError = 0x07, // NMT error of CN 193 + typedef enum { 194 + kEplNmtNodeEventFound = 0x00, 195 + kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN 196 + kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN 197 + kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module) 198 + kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN 199 + kEplNmtNodeEventReadyToStart = 0x05, // issued if EPL_NMTST_NO_STARTNODE set 200 + // application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually 201 + kEplNmtNodeEventNmtState = 0x06, 202 + kEplNmtNodeEventError = 0x07, // NMT error of CN 211 203 212 204 } tEplNmtNodeEvent; 213 205 214 - 215 - typedef enum 216 - { 217 - kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound 218 - kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully 219 - kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully 220 - kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully 221 - kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully 222 - // and CN needs ResetConf so that the configuration gets actived 223 - kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN 224 - kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart 206 + typedef enum { 207 + kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound 208 + kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully 209 + kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully 210 + kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully 211 + kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully 212 + // and CN needs ResetConf so that the configuration gets actived 213 + kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN 214 + kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart 225 215 226 216 } tEplNmtNodeCommand; 227 217 228 - 229 - typedef enum 230 - { 231 - kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible 232 - kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible 233 - kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible 234 - kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational 235 - kEplNmtBootEventError = 0x04, // boot process halted because of an error 218 + typedef enum { 219 + kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible 220 + kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible 221 + kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible 222 + kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational 223 + kEplNmtBootEventError = 0x04, // boot process halted because of an error 236 224 237 225 } tEplNmtBootEvent; 238 - 239 226 240 227 //--------------------------------------------------------------------------- 241 228 // function prototypes 242 229 //--------------------------------------------------------------------------- 243 230 244 - 245 - #endif // #ifndef _EPLNMT_H_ 246 - 247 - 231 + #endif // #ifndef _EPLNMT_H_
+181 -221
drivers/staging/epl/EplObd.h
··· 66 66 67 67 2006/06/02 k.t.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #include "EplInc.h" 73 72 74 73 #ifndef _EPLOBD_H_ 75 74 #define _EPLOBD_H_ 76 - 77 75 78 76 // ============================================================================ 79 77 // defines ··· 95 97 // ============================================================================ 96 98 97 99 // directions for access to object dictionary 98 - typedef enum 99 - { 100 - kEplObdDirInit = 0x00, // initialising after power on 101 - kEplObdDirStore = 0x01, // store all object values to non volatile memory 102 - kEplObdDirLoad = 0x02, // load all object values from non volatile memory 103 - kEplObdDirRestore = 0x03, // deletes non volatile memory (restore) 104 - kEplObdDirOBKCheck = 0xFF // reserved 105 - 106 - }tEplObdDir; 100 + typedef enum { 101 + kEplObdDirInit = 0x00, // initialising after power on 102 + kEplObdDirStore = 0x01, // store all object values to non volatile memory 103 + kEplObdDirLoad = 0x02, // load all object values from non volatile memory 104 + kEplObdDirRestore = 0x03, // deletes non volatile memory (restore) 105 + kEplObdDirOBKCheck = 0xFF // reserved 106 + } tEplObdDir; 107 107 108 108 // commands for store 109 - typedef enum 110 - { 111 - kEplObdCommNothing = 0x00, 112 - kEplObdCommOpenWrite = 0x01, 113 - kEplObdCommWriteObj = 0x02, 114 - kEplObdCommCloseWrite = 0x03, 115 - kEplObdCommOpenRead = 0x04, 116 - kEplObdCommReadObj = 0x05, 117 - kEplObdCommCloseRead = 0x06, 118 - kEplObdCommClear = 0x07, 119 - kEplObdCommUnknown = 0xFF 120 - }tEplObdCommand; 109 + typedef enum { 110 + kEplObdCommNothing = 0x00, 111 + kEplObdCommOpenWrite = 0x01, 112 + kEplObdCommWriteObj = 0x02, 113 + kEplObdCommCloseWrite = 0x03, 114 + kEplObdCommOpenRead = 0x04, 115 + kEplObdCommReadObj = 0x05, 116 + kEplObdCommCloseRead = 0x06, 117 + kEplObdCommClear = 0x07, 118 + kEplObdCommUnknown = 0xFF 119 + } tEplObdCommand; 121 120 122 121 //----------------------------------------------------------------------------------------------------------- 123 122 // events of object callback function 124 - typedef enum 125 - { 123 + typedef enum { 126 124 // m_pArg points to 127 125 // --------------------- 128 - kEplObdEvCheckExist = 0x06, // checking if object does exist (reading and writing) NULL 129 - kEplObdEvPreRead = 0x00, // before reading an object source data buffer in OD 130 - kEplObdEvPostRead = 0x01, // after reading an object destination data buffer from caller 131 - kEplObdEvWrStringDomain = 0x07, // event for changing string/domain data pointer or size struct tEplObdVStringDomain in RAM 132 - kEplObdEvInitWrite = 0x04, // initializes writing an object (checking object size) size of object in OD (tEplObdSize) 133 - kEplObdEvPreWrite = 0x02, // before writing an object source data buffer from caller 134 - kEplObdEvPostWrite = 0x03, // after writing an object destination data buffer in OD 126 + kEplObdEvCheckExist = 0x06, // checking if object does exist (reading and writing) NULL 127 + kEplObdEvPreRead = 0x00, // before reading an object source data buffer in OD 128 + kEplObdEvPostRead = 0x01, // after reading an object destination data buffer from caller 129 + kEplObdEvWrStringDomain = 0x07, // event for changing string/domain data pointer or size struct tEplObdVStringDomain in RAM 130 + kEplObdEvInitWrite = 0x04, // initializes writing an object (checking object size) size of object in OD (tEplObdSize) 131 + kEplObdEvPreWrite = 0x02, // before writing an object source data buffer from caller 132 + kEplObdEvPostWrite = 0x03, // after writing an object destination data buffer in OD 135 133 // kEplObdEvAbortSdo = 0x05 // after an abort of an SDO transfer 136 134 137 135 } tEplObdEvent; ··· 135 141 // part of OD (bit oriented) 136 142 typedef unsigned int tEplObdPart; 137 143 138 - #define kEplObdPartNo 0x00 // nothing 139 - #define kEplObdPartGen 0x01 // part (0x1000 - 0x1FFF) 140 - #define kEplObdPartMan 0x02 // manufacturer part (0x2000 - 0x5FFF) 141 - #define kEplObdPartDev 0x04 // device part (0x6000 - 0x9FFF) 142 - #define kEplObdPartUsr 0x08 // dynamic part e.g. for ICE61131-3 144 + #define kEplObdPartNo 0x00 // nothing 145 + #define kEplObdPartGen 0x01 // part (0x1000 - 0x1FFF) 146 + #define kEplObdPartMan 0x02 // manufacturer part (0x2000 - 0x5FFF) 147 + #define kEplObdPartDev 0x04 // device part (0x6000 - 0x9FFF) 148 + #define kEplObdPartUsr 0x08 // dynamic part e.g. for ICE61131-3 143 149 144 150 // combinations 145 - #define kEplObdPartApp ( kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // manufacturer and device part (0x2000 - 0x9FFF) and user OD 146 - #define kEplObdPartAll (kEplObdPartGen | kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // whole OD 151 + #define kEplObdPartApp ( kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // manufacturer and device part (0x2000 - 0x9FFF) and user OD 152 + #define kEplObdPartAll (kEplObdPartGen | kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // whole OD 147 153 148 154 //----------------------------------------------------------------------------------------------------------- 149 155 // access types for objects 150 156 // must be a difine because bit-flags 151 157 typedef unsigned int tEplObdAccess; 152 158 153 - #define kEplObdAccRead 0x01 // object can be read 154 - #define kEplObdAccWrite 0x02 // object can be written 155 - #define kEplObdAccConst 0x04 // object contains a constant value 156 - #define kEplObdAccPdo 0x08 // object can be mapped in a PDO 157 - #define kEplObdAccArray 0x10 // object contains an array of numerical values 158 - #define kEplObdAccRange 0x20 // object contains lower and upper limit 159 - #define kEplObdAccVar 0x40 // object data is placed in application 160 - #define kEplObdAccStore 0x80 // object data can be stored to non volatile memory 159 + #define kEplObdAccRead 0x01 // object can be read 160 + #define kEplObdAccWrite 0x02 // object can be written 161 + #define kEplObdAccConst 0x04 // object contains a constant value 162 + #define kEplObdAccPdo 0x08 // object can be mapped in a PDO 163 + #define kEplObdAccArray 0x10 // object contains an array of numerical values 164 + #define kEplObdAccRange 0x20 // object contains lower and upper limit 165 + #define kEplObdAccVar 0x40 // object data is placed in application 166 + #define kEplObdAccStore 0x80 // object data can be stored to non volatile memory 161 167 162 168 // combinations (not all combinations are required) 163 169 #define kEplObdAccR (0 | 0 | 0 | 0 | 0 | 0 | kEplObdAccRead) ··· 199 205 #define kEplObdAccSVGPW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | 0 ) 200 206 #define kEplObdAccSVGPRW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | kEplObdAccRead) 201 207 202 - 203 - 204 - typedef unsigned int tEplObdSize; // For all objects as objects size are used an unsigned int. 205 - 208 + typedef unsigned int tEplObdSize; // For all objects as objects size are used an unsigned int. 206 209 207 210 // ------------------------------------------------------------------------- 208 211 // types for data types defined in DS301 ··· 207 216 208 217 // types of objects in object dictionary 209 218 // DS-301 defines these types as WORD 210 - typedef enum 211 - { 219 + typedef enum { 212 220 // types which are always supported 213 - kEplObdTypBool = 0x0001, 221 + kEplObdTypBool = 0x0001, 214 222 215 - kEplObdTypInt8 = 0x0002, 216 - kEplObdTypInt16 = 0x0003, 217 - kEplObdTypInt32 = 0x0004, 218 - kEplObdTypUInt8 = 0x0005, 219 - kEplObdTypUInt16 = 0x0006, 220 - kEplObdTypUInt32 = 0x0007, 221 - kEplObdTypReal32 = 0x0008, 222 - kEplObdTypVString = 0x0009, 223 - kEplObdTypOString = 0x000A, 224 - kEplObdTypDomain = 0x000F, 223 + kEplObdTypInt8 = 0x0002, 224 + kEplObdTypInt16 = 0x0003, 225 + kEplObdTypInt32 = 0x0004, 226 + kEplObdTypUInt8 = 0x0005, 227 + kEplObdTypUInt16 = 0x0006, 228 + kEplObdTypUInt32 = 0x0007, 229 + kEplObdTypReal32 = 0x0008, 230 + kEplObdTypVString = 0x0009, 231 + kEplObdTypOString = 0x000A, 232 + kEplObdTypDomain = 0x000F, 225 233 226 - kEplObdTypInt24 = 0x0010, 227 - kEplObdTypUInt24 = 0x0016, 234 + kEplObdTypInt24 = 0x0010, 235 + kEplObdTypUInt24 = 0x0016, 228 236 229 - kEplObdTypReal64 = 0x0011, 230 - kEplObdTypInt40 = 0x0012, 231 - kEplObdTypInt48 = 0x0013, 232 - kEplObdTypInt56 = 0x0014, 233 - kEplObdTypInt64 = 0x0015, 234 - kEplObdTypUInt40 = 0x0018, 235 - kEplObdTypUInt48 = 0x0019, 236 - kEplObdTypUInt56 = 0x001A, 237 - kEplObdTypUInt64 = 0x001B, 238 - kEplObdTypTimeOfDay = 0x000C, 239 - kEplObdTypTimeDiff = 0x000D 240 - 241 - }tEplObdType; 237 + kEplObdTypReal64 = 0x0011, 238 + kEplObdTypInt40 = 0x0012, 239 + kEplObdTypInt48 = 0x0013, 240 + kEplObdTypInt56 = 0x0014, 241 + kEplObdTypInt64 = 0x0015, 242 + kEplObdTypUInt40 = 0x0018, 243 + kEplObdTypUInt48 = 0x0019, 244 + kEplObdTypUInt56 = 0x001A, 245 + kEplObdTypUInt64 = 0x001B, 246 + kEplObdTypTimeOfDay = 0x000C, 247 + kEplObdTypTimeDiff = 0x000D 248 + } tEplObdType; 242 249 // other types are not supported in this version 243 - 244 250 245 251 // ------------------------------------------------------------------------- 246 252 // types for data types defined in DS301 247 253 // ------------------------------------------------------------------------- 248 254 249 - typedef unsigned char tEplObdBoolean; // 0001 250 - typedef signed char tEplObdInteger8; // 0002 251 - typedef signed short int tEplObdInteger16; // 0003 252 - typedef signed long tEplObdInteger32; // 0004 253 - typedef unsigned char tEplObdUnsigned8; // 0005 254 - typedef unsigned short int tEplObdUnsigned16; // 0006 255 - typedef unsigned long tEplObdUnsigned32; // 0007 256 - typedef float tEplObdReal32; // 0008 257 - typedef unsigned char tEplObdDomain; // 000F 258 - typedef signed long tEplObdInteger24; // 0010 259 - typedef unsigned long tEplObdUnsigned24; // 0016 255 + typedef unsigned char tEplObdBoolean; // 0001 256 + typedef signed char tEplObdInteger8; // 0002 257 + typedef signed short int tEplObdInteger16; // 0003 258 + typedef signed long tEplObdInteger32; // 0004 259 + typedef unsigned char tEplObdUnsigned8; // 0005 260 + typedef unsigned short int tEplObdUnsigned16; // 0006 261 + typedef unsigned long tEplObdUnsigned32; // 0007 262 + typedef float tEplObdReal32; // 0008 263 + typedef unsigned char tEplObdDomain; // 000F 264 + typedef signed long tEplObdInteger24; // 0010 265 + typedef unsigned long tEplObdUnsigned24; // 0016 260 266 261 - typedef signed QWORD tEplObdInteger40; // 0012 262 - typedef signed QWORD tEplObdInteger48; // 0013 263 - typedef signed QWORD tEplObdInteger56; // 0014 264 - typedef signed QWORD tEplObdInteger64; // 0015 267 + typedef signed QWORD tEplObdInteger40; // 0012 268 + typedef signed QWORD tEplObdInteger48; // 0013 269 + typedef signed QWORD tEplObdInteger56; // 0014 270 + typedef signed QWORD tEplObdInteger64; // 0015 265 271 266 - typedef unsigned QWORD tEplObdUnsigned40; // 0018 267 - typedef unsigned QWORD tEplObdUnsigned48; // 0019 268 - typedef unsigned QWORD tEplObdUnsigned56; // 001A 269 - typedef unsigned QWORD tEplObdUnsigned64; // 001B 272 + typedef unsigned QWORD tEplObdUnsigned40; // 0018 273 + typedef unsigned QWORD tEplObdUnsigned48; // 0019 274 + typedef unsigned QWORD tEplObdUnsigned56; // 001A 275 + typedef unsigned QWORD tEplObdUnsigned64; // 001B 270 276 271 - typedef double tEplObdReal64; // 0011 277 + typedef double tEplObdReal64; // 0011 272 278 273 - typedef tTimeOfDay tEplObdTimeOfDay; // 000C 274 - typedef tTimeOfDay tEplObdTimeDifference; // 000D 275 - 279 + typedef tTimeOfDay tEplObdTimeOfDay; // 000C 280 + typedef tTimeOfDay tEplObdTimeDifference; // 000D 276 281 277 282 // ------------------------------------------------------------------------- 278 283 // structur for defining a variable 279 284 // ------------------------------------------------------------------------- 280 285 // ------------------------------------------------------------------------- 281 - typedef enum 282 - { 283 - kVarValidSize = 0x01, 284 - kVarValidData = 0x02, 286 + typedef enum { 287 + kVarValidSize = 0x01, 288 + kVarValidData = 0x02, 285 289 // kVarValidCallback = 0x04, 286 290 // kVarValidArg = 0x08, 287 291 288 - kVarValidAll = 0x03 // currently only size and data are implemented and used 292 + kVarValidAll = 0x03 // currently only size and data are implemented and used 293 + } tEplVarParamValid; 289 294 290 - }tEplVarParamValid; 295 + typedef tEplKernel(PUBLIC ROM * tEplVarCallback) (CCM_DECL_INSTANCE_HDL_ 296 + void *pParam_p); 291 297 292 - 293 - typedef tEplKernel (PUBLIC ROM* tEplVarCallback) (CCM_DECL_INSTANCE_HDL_ 294 - void * pParam_p); 295 - 296 - typedef struct 297 - { 298 - tEplVarParamValid m_ValidFlag; 299 - unsigned int m_uiIndex; 300 - unsigned int m_uiSubindex; 301 - tEplObdSize m_Size; 302 - void MEM* m_pData; 298 + typedef struct { 299 + tEplVarParamValid m_ValidFlag; 300 + unsigned int m_uiIndex; 301 + unsigned int m_uiSubindex; 302 + tEplObdSize m_Size; 303 + void MEM *m_pData; 303 304 // tEplVarCallback m_fpCallback; 304 305 // void * m_pArg; 305 306 306 307 } tEplVarParam; 307 308 308 - typedef struct 309 - { 310 - void MEM* m_pData; 311 - tEplObdSize m_Size; 309 + typedef struct { 310 + void MEM *m_pData; 311 + tEplObdSize m_Size; 312 312 /* 313 313 #if (EPL_PDO_USE_STATIC_MAPPING == FALSE) 314 314 tEplVarCallback m_fpCallback; ··· 308 326 */ 309 327 } tEplObdVarEntry; 310 328 311 - typedef struct 312 - { 313 - tEplObdSize m_Size; 314 - BYTE * m_pString; 329 + typedef struct { 330 + tEplObdSize m_Size; 331 + BYTE *m_pString; 315 332 316 - } tEplObdOString; // 000C 333 + } tEplObdOString; // 000C 317 334 318 - typedef struct 319 - { 320 - tEplObdSize m_Size; 321 - char * m_pString; 322 - } tEplObdVString; // 000D 335 + typedef struct { 336 + tEplObdSize m_Size; 337 + char *m_pString; 338 + } tEplObdVString; // 000D 323 339 324 - 325 - typedef struct 326 - { 327 - tEplObdSize m_Size; 328 - char * m_pDefString; // $$$ d.k. it is unused, so we could delete it 329 - char * m_pString; 340 + typedef struct { 341 + tEplObdSize m_Size; 342 + char *m_pDefString; // $$$ d.k. it is unused, so we could delete it 343 + char *m_pString; 330 344 331 345 } tEplObdVStringDef; 332 346 333 - typedef struct 334 - { 335 - tEplObdSize m_Size; 336 - BYTE * m_pDefString; // $$$ d.k. it is unused, so we could delete it 337 - BYTE * m_pString; 347 + typedef struct { 348 + tEplObdSize m_Size; 349 + BYTE *m_pDefString; // $$$ d.k. it is unused, so we could delete it 350 + BYTE *m_pString; 338 351 339 352 } tEplObdOStringDef; 340 353 341 354 //r.d. parameter struct for changing object size and/or pointer to data of Strings or Domains 342 - typedef struct 343 - { 344 - tEplObdSize m_DownloadSize; // download size from SDO or APP 345 - tEplObdSize m_ObjSize; // current object size from OD - should be changed from callback function 346 - void * m_pData; // current object ptr from OD - should be changed from callback function 355 + typedef struct { 356 + tEplObdSize m_DownloadSize; // download size from SDO or APP 357 + tEplObdSize m_ObjSize; // current object size from OD - should be changed from callback function 358 + void *m_pData; // current object ptr from OD - should be changed from callback function 347 359 348 - } tEplObdVStringDomain; // 000D 349 - 360 + } tEplObdVStringDomain; // 000D 350 361 351 362 // ============================================================================ 352 363 // types ··· 349 374 // ------------------------------------------------------------------------- 350 375 351 376 // Change not the order for this struct!!! 352 - typedef struct 353 - { 354 - unsigned int m_uiSubIndex; 355 - tEplObdType m_Type; 356 - tEplObdAccess m_Access; 357 - void * m_pDefault; 358 - void MEM* m_pCurrent; // points always to RAM 377 + typedef struct { 378 + unsigned int m_uiSubIndex; 379 + tEplObdType m_Type; 380 + tEplObdAccess m_Access; 381 + void *m_pDefault; 382 + void MEM *m_pCurrent; // points always to RAM 359 383 360 384 } tEplObdSubEntry; 361 385 362 386 // r.d.: has always to be because new OBD-Macros for arrays 363 - typedef tEplObdSubEntry * tEplObdSubEntryPtr; 387 + typedef tEplObdSubEntry *tEplObdSubEntryPtr; 364 388 365 389 // ------------------------------------------------------------------------- 366 390 // callback function for objdictionary modul 367 391 // ------------------------------------------------------------------------- 368 392 369 393 // parameters for callback function 370 - typedef struct 371 - { 372 - tEplObdEvent m_ObdEvent; 373 - unsigned int m_uiIndex; 374 - unsigned int m_uiSubIndex; 375 - void * m_pArg; 376 - DWORD m_dwAbortCode; 394 + typedef struct { 395 + tEplObdEvent m_ObdEvent; 396 + unsigned int m_uiIndex; 397 + unsigned int m_uiSubIndex; 398 + void *m_pArg; 399 + DWORD m_dwAbortCode; 377 400 378 401 } tEplObdCbParam; 379 402 380 403 // define type for callback function: pParam_p points to tEplObdCbParam 381 - typedef tEplKernel (PUBLIC ROM* tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ 382 - tEplObdCbParam MEM* pParam_p); 404 + typedef tEplKernel(PUBLIC ROM * tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ 405 + tEplObdCbParam MEM * 406 + pParam_p); 383 407 384 408 // do not change the order for this struct!!! 385 409 386 - typedef struct 387 - { 388 - unsigned int m_uiIndex; 389 - tEplObdSubEntryPtr m_pSubIndex; 390 - unsigned int m_uiCount; 391 - tEplObdCallback m_fpCallback; // function is called back if object access 410 + typedef struct { 411 + unsigned int m_uiIndex; 412 + tEplObdSubEntryPtr m_pSubIndex; 413 + unsigned int m_uiCount; 414 + tEplObdCallback m_fpCallback; // function is called back if object access 392 415 393 416 } tEplObdEntry; 394 417 395 - 396 418 // allways pointer 397 - typedef tEplObdEntry * tEplObdEntryPtr; 398 - 399 - 419 + typedef tEplObdEntry *tEplObdEntryPtr; 400 420 401 421 // ------------------------------------------------------------------------- 402 422 // structur to initialize OBD module 403 423 // ------------------------------------------------------------------------- 404 424 405 - typedef struct 406 - { 407 - tEplObdEntryPtr m_pPart; 408 - tEplObdEntryPtr m_pManufacturerPart; 409 - tEplObdEntryPtr m_pDevicePart; 425 + typedef struct { 426 + tEplObdEntryPtr m_pPart; 427 + tEplObdEntryPtr m_pManufacturerPart; 428 + tEplObdEntryPtr m_pDevicePart; 410 429 411 - #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) 430 + #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) 412 431 413 - tEplObdEntryPtr m_pUserPart; 432 + tEplObdEntryPtr m_pUserPart; 414 433 415 - #endif 434 + #endif 416 435 417 436 } tEplObdInitParam; 418 - 419 437 420 438 // ------------------------------------------------------------------------- 421 439 // structur for parameters of STORE RESTORE command 422 440 // ------------------------------------------------------------------------- 423 441 424 - typedef struct 425 - { 426 - tEplObdCommand m_bCommand; 427 - tEplObdPart m_bCurrentOdPart; 428 - void MEM* m_pData; 429 - tEplObdSize m_ObjSize; 442 + typedef struct { 443 + tEplObdCommand m_bCommand; 444 + tEplObdPart m_bCurrentOdPart; 445 + void MEM *m_pData; 446 + tEplObdSize m_ObjSize; 430 447 431 448 } tEplObdCbStoreParam; 432 449 450 + typedef tEplKernel(PUBLIC ROM * tInitTabEntryCallback) (void MEM * pTabEntry_p, 451 + unsigned int 452 + uiObjIndex_p); 433 453 434 - typedef tEplKernel (PUBLIC ROM* tInitTabEntryCallback) ( 435 - void MEM* pTabEntry_p, 436 - unsigned int uiObjIndex_p); 437 - 438 - typedef tEplKernel (PUBLIC ROM* tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ 439 - tEplObdCbStoreParam MEM* pCbStoreParam_p); 454 + typedef tEplKernel(PUBLIC ROM * 455 + tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ 456 + tEplObdCbStoreParam MEM * 457 + pCbStoreParam_p); 440 458 441 459 // ------------------------------------------------------------------------- 442 460 // this stucture is used for parameters for function ObdInitModuleTab() 443 461 // ------------------------------------------------------------------------- 444 - typedef struct 445 - { 446 - unsigned int m_uiLowerObjIndex; // lower limit of ObjIndex 447 - unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex 448 - tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found 449 - void MEM* m_pTabBase; // base address of table 450 - unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping 451 - unsigned int m_uiMaxEntries; // max. tabel entries 462 + typedef struct { 463 + unsigned int m_uiLowerObjIndex; // lower limit of ObjIndex 464 + unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex 465 + tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found 466 + void MEM *m_pTabBase; // base address of table 467 + unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping 468 + unsigned int m_uiMaxEntries; // max. tabel entries 452 469 453 470 } tEplObdModulTabParam; 454 471 455 472 //------------------------------------------------------------------- 456 473 // enum for function EplObdSetNodeId 457 474 //------------------------------------------------------------------- 458 - typedef enum 459 - { 460 - kEplObdNodeIdUnknown = 0x00, // unknown how the node id was set 461 - kEplObdNodeIdSoftware = 0x01, // node id set by software 462 - kEplObdNodeIdHardware = 0x02 // node id set by hardware 463 - 464 - }tEplObdNodeIdType; 475 + typedef enum { 476 + kEplObdNodeIdUnknown = 0x00, // unknown how the node id was set 477 + kEplObdNodeIdSoftware = 0x01, // node id set by software 478 + kEplObdNodeIdHardware = 0x02 // node id set by hardware 479 + } tEplObdNodeIdType; 465 480 466 481 // ============================================================================ 467 482 // global variables 468 483 // ============================================================================ 469 484 470 - 471 - 472 485 // ============================================================================ 473 486 // public functions 474 487 // ============================================================================ 475 488 476 - 477 - #endif // #ifndef _EPLOBD_H_ 478 - 479 - 489 + #endif // #ifndef _EPLOBD_H_
+191 -199
drivers/staging/epl/EplObdMacro.h
··· 67 67 2006/06/05 k.t.: start of the implementation 68 68 -> based on CANopen ObdMacro.h 69 69 70 - 71 - 72 70 ****************************************************************************/ 73 - 74 71 75 72 //--------------------------------------------------------------------------- 76 73 // const defines ··· 76 79 #if defined (EPL_OBD_DEFINE_MACRO) 77 80 78 81 //------------------------------------------------------------------------------------------- 79 - #if defined (EPL_OBD_CREATE_ROM_DATA) 82 + #if defined (EPL_OBD_CREATE_ROM_DATA) 80 83 81 84 // #pragma message ("EPL_OBD_CREATE_ROM_DATA") 82 85 83 - #define EPL_OBD_BEGIN() static DWORD dwObd_OBK_g = 0x0000; 84 - #define EPL_OBD_END() 86 + #define EPL_OBD_BEGIN() static DWORD dwObd_OBK_g = 0x0000; 87 + #define EPL_OBD_END() 85 88 86 - //--------------------------------------------------------------------------------------- 87 - #define EPL_OBD_BEGIN_PART_GENERIC() 88 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() 89 - #define EPL_OBD_BEGIN_PART_DEVICE() 90 - #define EPL_OBD_END_PART() 89 + //--------------------------------------------------------------------------------------- 90 + #define EPL_OBD_BEGIN_PART_GENERIC() 91 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() 92 + #define EPL_OBD_BEGIN_PART_DEVICE() 93 + #define EPL_OBD_END_PART() 91 94 92 - //--------------------------------------------------------------------------------------- 93 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 94 - #define EPL_OBD_END_INDEX(ind) 95 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ 95 + //--------------------------------------------------------------------------------------- 96 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 97 + #define EPL_OBD_END_INDEX(ind) 98 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ 96 99 static dtyp xDef##ind##_0x01_g = (def); 97 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ 100 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ 98 101 static dtyp xDef##ind##_0x01_g = (def); 99 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); 102 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); 100 103 101 - //--------------------------------------------------------------------------------------- 102 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; 103 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; 104 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 105 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char MEM szCur##ind##_##sub##_g[size+1]; \ 104 + //--------------------------------------------------------------------------------------- 105 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; 106 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; 107 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 108 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char MEM szCur##ind##_##sub##_g[size+1]; \ 106 109 static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g}; 107 110 108 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE MEM bCur##ind##_##sub##_g[size]; \ 111 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE MEM bCur##ind##_##sub##_g[size]; \ 109 112 static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((BYTE*)""), bCur##ind##_##sub##_g}; 110 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 111 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; 112 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; 113 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 113 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 114 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; 115 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; 116 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 114 117 115 118 //------------------------------------------------------------------------------------------- 116 - #elif defined (EPL_OBD_CREATE_RAM_DATA) 119 + #elif defined (EPL_OBD_CREATE_RAM_DATA) 117 120 118 121 // #pragma message ("EPL_OBD_CREATE_RAM_DATA") 119 122 120 - #define EPL_OBD_BEGIN() 121 - #define EPL_OBD_END() 123 + #define EPL_OBD_BEGIN() 124 + #define EPL_OBD_END() 122 125 123 - //--------------------------------------------------------------------------------------- 124 - #define EPL_OBD_BEGIN_PART_GENERIC() 125 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() 126 - #define EPL_OBD_BEGIN_PART_DEVICE() 127 - #define EPL_OBD_END_PART() 126 + //--------------------------------------------------------------------------------------- 127 + #define EPL_OBD_BEGIN_PART_GENERIC() 128 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() 129 + #define EPL_OBD_BEGIN_PART_DEVICE() 130 + #define EPL_OBD_END_PART() 128 131 129 - //--------------------------------------------------------------------------------------- 130 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 131 - #define EPL_OBD_END_INDEX(ind) 132 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp MEM axCur##ind##_g[cnt]; 133 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; 134 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; 132 + //--------------------------------------------------------------------------------------- 133 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 134 + #define EPL_OBD_END_INDEX(ind) 135 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp MEM axCur##ind##_g[cnt]; 136 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; 137 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; 135 138 136 - //--------------------------------------------------------------------------------------- 137 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp MEM xCur##ind##_##sub##_g; 138 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp MEM xCur##ind##_##sub##_g; 139 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString MEM xCur##ind##_##sub##_g; 140 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString MEM xCur##ind##_##sub##_g; 141 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp MEM xCur##ind##_##sub##_g; 142 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 143 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 144 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 145 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 139 + //--------------------------------------------------------------------------------------- 140 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp MEM xCur##ind##_##sub##_g; 141 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp MEM xCur##ind##_##sub##_g; 142 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString MEM xCur##ind##_##sub##_g; 143 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString MEM xCur##ind##_##sub##_g; 144 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp MEM xCur##ind##_##sub##_g; 145 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 146 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 147 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 148 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; 146 149 147 150 //------------------------------------------------------------------------------------------- 148 - #elif defined (EPL_OBD_CREATE_SUBINDEX_TAB) 151 + #elif defined (EPL_OBD_CREATE_SUBINDEX_TAB) 149 152 150 153 // #pragma message ("EPL_OBD_CREATE_SUBINDEX_TAB") 151 154 152 - #define EPL_OBD_BEGIN() 153 - #define EPL_OBD_END() 155 + #define EPL_OBD_BEGIN() 156 + #define EPL_OBD_END() 154 157 155 - //--------------------------------------------------------------------------------------- 156 - #define EPL_OBD_BEGIN_PART_GENERIC() 157 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() 158 - #define EPL_OBD_BEGIN_PART_DEVICE() 159 - #define EPL_OBD_END_PART() 158 + //--------------------------------------------------------------------------------------- 159 + #define EPL_OBD_BEGIN_PART_GENERIC() 160 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() 161 + #define EPL_OBD_BEGIN_PART_DEVICE() 162 + #define EPL_OBD_END_PART() 160 163 161 - //--------------------------------------------------------------------------------------- 162 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[cnt]= { 163 - #define EPL_OBD_END_INDEX(ind) EPL_OBD_END_SUBINDEX()}; 164 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 164 + //--------------------------------------------------------------------------------------- 165 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[cnt]= { 166 + #define EPL_OBD_END_INDEX(ind) EPL_OBD_END_SUBINDEX()}; 167 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 165 168 {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ 166 169 {1, typ, (acc)|kEplObdAccArray, &xDef##ind##_0x01_g, &axCur##ind##_g[0]}, \ 167 170 EPL_OBD_END_SUBINDEX()}; 168 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 171 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 169 172 {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ 170 173 {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, &xDef##ind##_0x01_g, &aVarEntry##ind##_g[0]}, \ 171 174 EPL_OBD_END_SUBINDEX()}; 172 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 175 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ 173 176 {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ 174 177 {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, NULL, &aVarEntry##ind##_g[0]}, \ 175 178 EPL_OBD_END_SUBINDEX()}; 176 179 177 - //--------------------------------------------------------------------------------------- 178 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc), &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 179 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccRange, &xDef##ind##_##sub##_g[0],&xCur##ind##_##sub##_g}, 180 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc), NULL, &xCur##ind##_##sub##_g}, 181 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) {sub,kEplObdTypVString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 182 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) {sub,kEplObdTypOString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 183 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) {sub,kEplObdTypDomain, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, 184 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc)|kEplObdAccVar, &xDef##ind##_##sub##_g, &VarEntry##ind##_##sub##_g}, 185 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccVar|kEplObdAccRange,&xDef##ind##_##sub##_g[0],&VarEntry##ind##_##sub##_g}, 186 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, 187 - 180 + //--------------------------------------------------------------------------------------- 181 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc), &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 182 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccRange, &xDef##ind##_##sub##_g[0],&xCur##ind##_##sub##_g}, 183 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc), NULL, &xCur##ind##_##sub##_g}, 184 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) {sub,kEplObdTypVString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 185 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) {sub,kEplObdTypOString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, 186 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) {sub,kEplObdTypDomain, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, 187 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc)|kEplObdAccVar, &xDef##ind##_##sub##_g, &VarEntry##ind##_##sub##_g}, 188 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccVar|kEplObdAccRange,&xDef##ind##_##sub##_g[0],&VarEntry##ind##_##sub##_g}, 189 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, 188 190 189 191 //------------------------------------------------------------------------------------------- 190 - #elif defined (EPL_OBD_CREATE_INDEX_TAB) 192 + #elif defined (EPL_OBD_CREATE_INDEX_TAB) 191 193 192 194 // #pragma message ("EPL_OBD_CREATE_INDEX_TAB") 193 195 194 - #define EPL_OBD_BEGIN() 195 - #define EPL_OBD_END() 196 + #define EPL_OBD_BEGIN() 197 + #define EPL_OBD_END() 196 198 197 - //--------------------------------------------------------------------------------------- 198 - #define EPL_OBD_BEGIN_PART_GENERIC() static tEplObdEntry aObdTab_g[] = { 199 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() static tEplObdEntry aObdTabManufacturer_g[] = { 200 - #define EPL_OBD_BEGIN_PART_DEVICE() static tEplObdEntry aObdTabDevice_g[] = { 201 - #define EPL_OBD_END_PART() {EPL_OBD_TABLE_INDEX_END,(tEplObdSubEntryPtr)&dwObd_OBK_g,0,NULL}}; 199 + //--------------------------------------------------------------------------------------- 200 + #define EPL_OBD_BEGIN_PART_GENERIC() static tEplObdEntry aObdTab_g[] = { 201 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() static tEplObdEntry aObdTabManufacturer_g[] = { 202 + #define EPL_OBD_BEGIN_PART_DEVICE() static tEplObdEntry aObdTabDevice_g[] = { 203 + #define EPL_OBD_END_PART() {EPL_OBD_TABLE_INDEX_END,(tEplObdSubEntryPtr)&dwObd_OBK_g,0,NULL}}; 202 204 203 - //--------------------------------------------------------------------------------------- 204 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],cnt,(tEplObdCallback)call}, 205 - #define EPL_OBD_END_INDEX(ind) 206 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 207 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 208 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 205 + //--------------------------------------------------------------------------------------- 206 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],cnt,(tEplObdCallback)call}, 207 + #define EPL_OBD_END_INDEX(ind) 208 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 209 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 210 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, 209 211 210 - //--------------------------------------------------------------------------------------- 211 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 212 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 213 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 214 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 215 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 216 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 217 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 218 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 219 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 212 + //--------------------------------------------------------------------------------------- 213 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 214 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 215 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 216 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 217 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 218 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 219 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 220 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 221 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 220 222 221 - //------------------------------------------------------------------------------------------- 222 - #elif defined (EPL_OBD_CREATE_INIT_FUNCTION) 223 + //------------------------------------------------------------------------------------------- 224 + #elif defined (EPL_OBD_CREATE_INIT_FUNCTION) 223 225 224 226 // #pragma message ("EPL_OBD_CREATE_INIT_FUNCTION") 225 227 226 - #define EPL_OBD_BEGIN() 227 - #define EPL_OBD_END() 228 + #define EPL_OBD_BEGIN() 229 + #define EPL_OBD_END() 228 230 229 - //--------------------------------------------------------------------------------------- 230 - #define EPL_OBD_BEGIN_PART_GENERIC() pInitParam->m_pPart = (tEplObdEntryPtr) &aObdTab_g[0]; 231 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() pInitParam->m_pManufacturerPart = (tEplObdEntryPtr) &aObdTabManufacturer_g[0]; 232 - #define EPL_OBD_BEGIN_PART_DEVICE() pInitParam->m_pDevicePart = (tEplObdEntryPtr) &aObdTabDevice_g[0]; 233 - #define EPL_OBD_END_PART() 231 + //--------------------------------------------------------------------------------------- 232 + #define EPL_OBD_BEGIN_PART_GENERIC() pInitParam->m_pPart = (tEplObdEntryPtr) &aObdTab_g[0]; 233 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() pInitParam->m_pManufacturerPart = (tEplObdEntryPtr) &aObdTabManufacturer_g[0]; 234 + #define EPL_OBD_BEGIN_PART_DEVICE() pInitParam->m_pDevicePart = (tEplObdEntryPtr) &aObdTabDevice_g[0]; 235 + #define EPL_OBD_END_PART() 234 236 235 - //--------------------------------------------------------------------------------------- 236 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 237 - #define EPL_OBD_END_INDEX(ind) 238 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 239 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 240 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) 237 + //--------------------------------------------------------------------------------------- 238 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 239 + #define EPL_OBD_END_INDEX(ind) 240 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 241 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 242 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) 241 243 242 - //--------------------------------------------------------------------------------------- 243 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 244 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 245 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 246 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 247 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 248 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 249 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 250 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 251 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 252 - 244 + //--------------------------------------------------------------------------------------- 245 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 246 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 247 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 248 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 249 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 250 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 251 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 252 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 253 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 253 254 254 255 //------------------------------------------------------------------------------------------- 255 - #elif defined (EPL_OBD_CREATE_INIT_SUBINDEX) 256 + #elif defined (EPL_OBD_CREATE_INIT_SUBINDEX) 256 257 257 258 // #pragma message ("EPL_OBD_CREATE_INIT_SUBINDEX") 258 259 259 - #define EPL_OBD_BEGIN() 260 - #define EPL_OBD_END() 260 + #define EPL_OBD_BEGIN() 261 + #define EPL_OBD_END() 261 262 262 - //--------------------------------------------------------------------------------------- 263 - #define EPL_OBD_BEGIN_PART_GENERIC() 264 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() 265 - #define EPL_OBD_BEGIN_PART_DEVICE() 266 - #define EPL_OBD_END_PART() 263 + //--------------------------------------------------------------------------------------- 264 + #define EPL_OBD_BEGIN_PART_GENERIC() 265 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() 266 + #define EPL_OBD_BEGIN_PART_DEVICE() 267 + #define EPL_OBD_END_PART() 267 268 268 - //--------------------------------------------------------------------------------------- 269 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) //CCM_SUBINDEX_RAM_ONLY (EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g))); 270 - #define EPL_OBD_END_INDEX(ind) 271 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 272 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 273 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 269 + //--------------------------------------------------------------------------------------- 270 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) //CCM_SUBINDEX_RAM_ONLY (EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g))); 271 + #define EPL_OBD_END_INDEX(ind) 272 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 273 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 274 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); 274 275 275 - //--------------------------------------------------------------------------------------- 276 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 277 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 278 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 279 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 280 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 281 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 282 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 283 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 284 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 276 + //--------------------------------------------------------------------------------------- 277 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 278 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 279 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) 280 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 281 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 282 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 283 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 284 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 285 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 285 286 286 287 //------------------------------------------------------------------------------------------- 287 - #else 288 + #else 288 289 289 290 // #pragma message ("ELSE OF DEFINE") 290 291 291 - #define EPL_OBD_BEGIN() 292 - #define EPL_OBD_END() 292 + #define EPL_OBD_BEGIN() 293 + #define EPL_OBD_END() 293 294 294 - //--------------------------------------------------------------------------------------- 295 - #define EPL_OBD_BEGIN_PART_GENERIC() 296 - #define EPL_OBD_BEGIN_PART_MANUFACTURER() 297 - #define EPL_OBD_BEGIN_PART_DEVICE() 298 - #define EPL_OBD_END_PART() 295 + //--------------------------------------------------------------------------------------- 296 + #define EPL_OBD_BEGIN_PART_GENERIC() 297 + #define EPL_OBD_BEGIN_PART_MANUFACTURER() 298 + #define EPL_OBD_BEGIN_PART_DEVICE() 299 + #define EPL_OBD_END_PART() 299 300 300 - //--------------------------------------------------------------------------------------- 301 - #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 302 - #define EPL_OBD_END_INDEX(ind) 303 - #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 304 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 305 - #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) 301 + //--------------------------------------------------------------------------------------- 302 + #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) 303 + #define EPL_OBD_END_INDEX(ind) 304 + #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 305 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) 306 + #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) 306 307 307 - //--------------------------------------------------------------------------------------- 308 - #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 309 - #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 310 - #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,sizes,val) 311 - #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 312 - #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 313 - #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 314 - #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 315 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 316 - #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 308 + //--------------------------------------------------------------------------------------- 309 + #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) 310 + #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 311 + #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,sizes,val) 312 + #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) 313 + #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) 314 + #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) 315 + #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) 316 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) 317 + #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) 317 318 318 - #endif 319 + #endif 319 320 320 321 //------------------------------------------------------------------------------------------- 321 322 #elif defined (EPL_OBD_UNDEFINE_MACRO) 322 323 323 324 // #pragma message ("EPL_OBD_UNDEFINE_MACRO") 324 325 325 - #undef EPL_OBD_BEGIN 326 - #undef EPL_OBD_END 326 + #undef EPL_OBD_BEGIN 327 + #undef EPL_OBD_END 327 328 328 329 //--------------------------------------------------------------------------------------- 329 - #undef EPL_OBD_BEGIN_PART_GENERIC 330 - #undef EPL_OBD_BEGIN_PART_MANUFACTURER 331 - #undef EPL_OBD_BEGIN_PART_DEVICE 332 - #undef EPL_OBD_END_PART 330 + #undef EPL_OBD_BEGIN_PART_GENERIC 331 + #undef EPL_OBD_BEGIN_PART_MANUFACTURER 332 + #undef EPL_OBD_BEGIN_PART_DEVICE 333 + #undef EPL_OBD_END_PART 333 334 334 335 //--------------------------------------------------------------------------------------- 335 - #undef EPL_OBD_BEGIN_INDEX_RAM 336 - #undef EPL_OBD_END_INDEX 337 - #undef EPL_OBD_RAM_INDEX_RAM_ARRAY 338 - #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY 339 - #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT 336 + #undef EPL_OBD_BEGIN_INDEX_RAM 337 + #undef EPL_OBD_END_INDEX 338 + #undef EPL_OBD_RAM_INDEX_RAM_ARRAY 339 + #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY 340 + #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT 340 341 341 342 //--------------------------------------------------------------------------------------- 342 - #undef EPL_OBD_SUBINDEX_RAM_VAR 343 - #undef EPL_OBD_SUBINDEX_RAM_VAR_RG 344 - #undef EPL_OBD_SUBINDEX_RAM_VSTRING 345 - #undef EPL_OBD_SUBINDEX_RAM_OSTRING 346 - #undef EPL_OBD_SUBINDEX_RAM_VAR_NOINIT 347 - #undef EPL_OBD_SUBINDEX_RAM_DOMAIN 348 - #undef EPL_OBD_SUBINDEX_RAM_USERDEF 349 - #undef EPL_OBD_SUBINDEX_RAM_USERDEF_RG 350 - #undef EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT 343 + #undef EPL_OBD_SUBINDEX_RAM_VAR 344 + #undef EPL_OBD_SUBINDEX_RAM_VAR_RG 345 + #undef EPL_OBD_SUBINDEX_RAM_VSTRING 346 + #undef EPL_OBD_SUBINDEX_RAM_OSTRING 347 + #undef EPL_OBD_SUBINDEX_RAM_VAR_NOINIT 348 + #undef EPL_OBD_SUBINDEX_RAM_DOMAIN 349 + #undef EPL_OBD_SUBINDEX_RAM_USERDEF 350 + #undef EPL_OBD_SUBINDEX_RAM_USERDEF_RG 351 + #undef EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT 351 352 352 353 #else 353 354 354 - #error "nothing defined" 355 - 355 + #error "nothing defined" 356 356 357 357 #endif 358 - 359 -
+40 -52
drivers/staging/epl/EplObjDef.h
··· 71 71 #ifndef _EPLOBJDEF_H_ 72 72 #define _EPLOBJDEF_H_ 73 73 74 - 75 74 //--------------------------------------------------------------------------- 76 75 // security checks 77 76 //--------------------------------------------------------------------------- 78 - 79 77 80 78 //--------------------------------------------------------------------------- 81 79 // macros to help building OD 82 80 //--------------------------------------------------------------------------- 83 81 84 - 85 82 //--------------------------------------------------------------------------- 86 83 #if (defined (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB) && (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB != FALSE)) 87 84 88 - #define CCM_SUBINDEX_RAM_ONLY(a) a; 89 - #define CCM_SUBINDEX_RAM_ONEOF(a,b) a 85 + #define CCM_SUBINDEX_RAM_ONLY(a) a; 86 + #define CCM_SUBINDEX_RAM_ONEOF(a,b) a 90 87 91 88 #else 92 89 93 - #define CCM_SUBINDEX_RAM_ONLY(a) 94 - #define CCM_SUBINDEX_RAM_ONEOF(a,b) b 90 + #define CCM_SUBINDEX_RAM_ONLY(a) 91 + #define CCM_SUBINDEX_RAM_ONEOF(a,b) b 95 92 96 93 #endif 97 - 98 94 99 95 //--------------------------------------------------------------------------- 100 96 // To prevent unused memory in subindex tables we need this macro. ··· 98 102 // Compilers which does not support a comma after last struct value has to place in a dummy subindex. 99 103 #if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0) 100 104 101 - #define EPL_OBD_END_SUBINDEX() 102 - #define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 105 + #define EPL_OBD_END_SUBINDEX() 106 + #define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 103 107 104 108 #else 105 109 106 - #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} 107 - #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 110 + #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} 111 + #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 108 112 109 113 #endif 110 - 111 114 112 115 //--------------------------------------------------------------------------- 113 116 //--------------------------------------------------------------------------- ··· 118 123 // creation of data in ROM memory 119 124 // ------------------------------------------------------------------------- 120 125 #define EPL_OBD_CREATE_ROM_DATA 121 - #include "objdict.h" 126 + #include "objdict.h" 122 127 #undef EPL_OBD_CREATE_ROM_DATA 123 - 124 128 125 129 // ------------------------------------------------------------------------- 126 130 // creation of data in RAM memory 127 131 // ------------------------------------------------------------------------- 128 132 129 133 #define EPL_OBD_CREATE_RAM_DATA 130 - #include "objdict.h" 134 + #include "objdict.h" 131 135 #undef EPL_OBD_CREATE_RAM_DATA 132 - 133 136 134 137 // ------------------------------------------------------------------------- 135 138 // creation of subindex tables in ROM and RAM 136 139 // ------------------------------------------------------------------------- 137 140 138 141 #define EPL_OBD_CREATE_SUBINDEX_TAB 139 - #include "objdict.h" 142 + #include "objdict.h" 140 143 #undef EPL_OBD_CREATE_SUBINDEX_TAB 141 - 142 144 143 145 // ------------------------------------------------------------------------- 144 146 // creation of index tables for generic, manufacturer and device part 145 147 // ------------------------------------------------------------------------- 146 148 147 149 #define EPL_OBD_CREATE_INDEX_TAB 148 - #include "objdict.h" 150 + #include "objdict.h" 149 151 #undef EPL_OBD_CREATE_INDEX_TAB 150 - 151 152 152 153 //=========================================================================// 153 154 // // ··· 165 174 // 166 175 // ---------------------------------------------------------------------------- 167 176 168 - EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME (tEplObdInitParam MEM* pInitParam_p) 177 + EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME(tEplObdInitParam MEM * 178 + pInitParam_p) 169 179 { 170 180 171 - tEplObdInitParam MEM* pInitParam = pInitParam_p; 181 + tEplObdInitParam MEM *pInitParam = pInitParam_p; 172 182 173 - // check if pointer to parameter structure is valid 174 - // if not then only copy subindex tables below 175 - if (pInitParam != NULL) 176 - { 177 - // at first delete all parameters (all pointers will be set zu NULL) 178 - EPL_MEMSET (pInitParam, 0, sizeof (tEplObdInitParam)); 183 + // check if pointer to parameter structure is valid 184 + // if not then only copy subindex tables below 185 + if (pInitParam != NULL) { 186 + // at first delete all parameters (all pointers will be set zu NULL) 187 + EPL_MEMSET(pInitParam, 0, sizeof(tEplObdInitParam)); 179 188 180 - #define EPL_OBD_CREATE_INIT_FUNCTION 181 - { 182 - // inserts code to init pointer to index tables 183 - #include "objdict.h" 184 - } 185 - #undef EPL_OBD_CREATE_INIT_FUNCTION 189 + #define EPL_OBD_CREATE_INIT_FUNCTION 190 + { 191 + // inserts code to init pointer to index tables 192 + #include "objdict.h" 193 + } 194 + #undef EPL_OBD_CREATE_INIT_FUNCTION 186 195 187 - #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) 188 - { 189 - // to begin no user OD is defined 190 - pInitParam_p->m_pUserPart = NULL; 191 - } 192 - #endif 193 - } 196 + #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) 197 + { 198 + // to begin no user OD is defined 199 + pInitParam_p->m_pUserPart = NULL; 200 + } 201 + #endif 202 + } 203 + #define EPL_OBD_CREATE_INIT_SUBINDEX 204 + { 205 + // inserts code to copy subindex tables 206 + #include "objdict.h" 207 + } 208 + #undef EPL_OBD_CREATE_INIT_SUBINDEX 194 209 195 - #define EPL_OBD_CREATE_INIT_SUBINDEX 196 - { 197 - // inserts code to copy subindex tables 198 - #include "objdict.h" 199 - } 200 - #undef EPL_OBD_CREATE_INIT_SUBINDEX 201 - 202 - return kEplSuccessful; 210 + return kEplSuccessful; 203 211 204 212 } 205 - 206 213 207 214 #endif // _EPLOBJDEF_H_ 208 215 209 216 // Die letzte Zeile mu� unbedingt eine leere Zeile sein, weil manche Compiler 210 217 // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). 211 -
+16 -25
drivers/staging/epl/EplPdo.h
··· 66 66 67 67 2006/05/22 d.k.: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPL_PDO_H_ ··· 84 85 // NodeId for PRes TPDO 85 86 #define EPL_PDO_PRES_NODE_ID 0x00 86 87 87 - 88 88 //--------------------------------------------------------------------------- 89 89 // typedef 90 90 //--------------------------------------------------------------------------- 91 91 92 - typedef struct 93 - { 94 - void* m_pVar; 95 - WORD m_wOffset; // in Bits 96 - WORD m_wSize; // in Bits 97 - BOOL m_fNumeric; // numeric value -> use AMI functions 92 + typedef struct { 93 + void *m_pVar; 94 + WORD m_wOffset; // in Bits 95 + WORD m_wSize; // in Bits 96 + BOOL m_fNumeric; // numeric value -> use AMI functions 98 97 99 98 } tEplPdoMapping; 100 99 101 - typedef struct 102 - { 103 - unsigned int m_uiSizeOfStruct; 104 - unsigned int m_uiPdoId; 105 - unsigned int m_uiNodeId; 106 - // 0xFF=invalid, RPDO: 0x00=PReq, localNodeId=PRes, remoteNodeId=PRes 107 - // TPDO: 0x00=PRes, MN: CnNodeId=PReq 100 + typedef struct { 101 + unsigned int m_uiSizeOfStruct; 102 + unsigned int m_uiPdoId; 103 + unsigned int m_uiNodeId; 104 + // 0xFF=invalid, RPDO: 0x00=PReq, localNodeId=PRes, remoteNodeId=PRes 105 + // TPDO: 0x00=PRes, MN: CnNodeId=PReq 108 106 109 - BOOL m_fTxRx; 110 - BYTE m_bMappingVersion; 111 - unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping 112 - tEplPdoMapping m_aPdoMapping[1]; 107 + BOOL m_fTxRx; 108 + BYTE m_bMappingVersion; 109 + unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping 110 + tEplPdoMapping m_aPdoMapping[1]; 113 111 114 112 } tEplPdoParam; 115 - 116 - 117 113 118 114 //--------------------------------------------------------------------------- 119 115 // function prototypes 120 116 //--------------------------------------------------------------------------- 121 117 122 - 123 - #endif // #ifndef _EPL_PDO_H_ 124 - 125 - 118 + #endif // #ifndef _EPL_PDO_H_
+69 -95
drivers/staging/epl/EplSdo.h
··· 66 66 67 67 2006/06/26 k.t.: start of the implementation 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #include "EplInc.h" ··· 74 75 75 76 #ifndef _EPLSDO_H_ 76 77 #define _EPLSDO_H_ 77 - 78 78 79 79 //--------------------------------------------------------------------------- 80 80 // const defines ··· 116 118 117 119 // callback function pointer for Protocol Abstraction Layer to call 118 120 // asynchronuus SDO Sequence Layer 119 - typedef tEplKernel (PUBLIC* tEplSequLayerReceiveCb ) ( 120 - tEplSdoConHdl ConHdl_p, 121 - tEplAsySdoSeq* pSdoSeqData_p, 122 - unsigned int uiDataSize_p); 121 + typedef tEplKernel(PUBLIC * tEplSequLayerReceiveCb) (tEplSdoConHdl ConHdl_p, 122 + tEplAsySdoSeq * 123 + pSdoSeqData_p, 124 + unsigned int uiDataSize_p); 123 125 124 126 // handle between asynchronuus SDO Sequence Layer and SDO Command layer 125 127 typedef unsigned int tEplSdoSeqConHdl; 126 128 127 129 // callback function pointer for asynchronuus SDO Sequence Layer to call 128 130 // SDO Command layer for received data 129 - typedef tEplKernel (PUBLIC* tEplSdoComReceiveCb) ( 130 - tEplSdoSeqConHdl SdoSeqConHdl_p, 131 - tEplAsySdoCom* pAsySdoCom_p, 132 - unsigned int uiDataSize_p); 131 + typedef tEplKernel(PUBLIC * 132 + tEplSdoComReceiveCb) (tEplSdoSeqConHdl SdoSeqConHdl_p, 133 + tEplAsySdoCom * pAsySdoCom_p, 134 + unsigned int uiDataSize_p); 133 135 134 136 // status of connection 135 - typedef enum 136 - { 137 - kAsySdoConStateConnected = 0x00, 138 - kAsySdoConStateInitError = 0x01, 139 - kAsySdoConStateConClosed = 0x02, 140 - kAsySdoConStateAckReceived = 0x03, 141 - kAsySdoConStateFrameSended = 0x04, 142 - kAsySdoConStateTimeout = 0x05 143 - 144 - }tEplAsySdoConState; 137 + typedef enum { 138 + kAsySdoConStateConnected = 0x00, 139 + kAsySdoConStateInitError = 0x01, 140 + kAsySdoConStateConClosed = 0x02, 141 + kAsySdoConStateAckReceived = 0x03, 142 + kAsySdoConStateFrameSended = 0x04, 143 + kAsySdoConStateTimeout = 0x05 144 + } tEplAsySdoConState; 145 145 146 146 // callback function pointer for asynchronuus SDO Sequence Layer to call 147 147 // SDO Command layer for connection status 148 - typedef tEplKernel (PUBLIC* tEplSdoComConCb) ( 149 - tEplSdoSeqConHdl SdoSeqConHdl_p, 150 - tEplAsySdoConState AsySdoConState_p); 148 + typedef tEplKernel(PUBLIC * tEplSdoComConCb) (tEplSdoSeqConHdl SdoSeqConHdl_p, 149 + tEplAsySdoConState 150 + AsySdoConState_p); 151 151 152 152 // handle between SDO Command layer and application 153 153 typedef unsigned int tEplSdoComConHdl; 154 154 155 155 // status of connection 156 - typedef enum 157 - { 158 - kEplSdoComTransferNotActive = 0x00, 159 - kEplSdoComTransferRunning = 0x01, 160 - kEplSdoComTransferTxAborted = 0x02, 161 - kEplSdoComTransferRxAborted = 0x03, 162 - kEplSdoComTransferFinished = 0x04, 163 - kEplSdoComTransferLowerLayerAbort = 0x05 164 - 156 + typedef enum { 157 + kEplSdoComTransferNotActive = 0x00, 158 + kEplSdoComTransferRunning = 0x01, 159 + kEplSdoComTransferTxAborted = 0x02, 160 + kEplSdoComTransferRxAborted = 0x03, 161 + kEplSdoComTransferFinished = 0x04, 162 + kEplSdoComTransferLowerLayerAbort = 0x05 165 163 } tEplSdoComConState; 166 164 167 165 // SDO Services and Command-Ids from DS 1.0.0 p.152 168 - typedef enum 169 - { 170 - kEplSdoServiceNIL = 0x00, 171 - kEplSdoServiceWriteByIndex = 0x01, 172 - kEplSdoServiceReadByIndex = 0x02 173 - 174 - //-------------------------------- 175 - // the following services are optional and 176 - // not supported now 166 + typedef enum { 167 + kEplSdoServiceNIL = 0x00, 168 + kEplSdoServiceWriteByIndex = 0x01, 169 + kEplSdoServiceReadByIndex = 0x02 170 + //-------------------------------- 171 + // the following services are optional and 172 + // not supported now 177 173 /* 178 174 kEplSdoServiceWriteAllByIndex = 0x03, 179 175 kEplSdoServiceReadAllByIndex = 0x04, ··· 188 196 } tEplSdoServiceType; 189 197 190 198 // describes if read or write access 191 - typedef enum 192 - { 193 - kEplSdoAccessTypeRead = 0x00, 194 - kEplSdoAccessTypeWrite = 0x01 195 - 199 + typedef enum { 200 + kEplSdoAccessTypeRead = 0x00, 201 + kEplSdoAccessTypeWrite = 0x01 196 202 } tEplSdoAccessType; 197 203 198 - typedef enum 199 - { 200 - kEplSdoTypeAuto = 0x00, 201 - kEplSdoTypeUdp = 0x01, 202 - kEplSdoTypeAsnd = 0x02, 203 - kEplSdoTypePdo = 0x03 204 + typedef enum { 205 + kEplSdoTypeAuto = 0x00, 206 + kEplSdoTypeUdp = 0x01, 207 + kEplSdoTypeAsnd = 0x02, 208 + kEplSdoTypePdo = 0x03 209 + } tEplSdoType; 204 210 205 - }tEplSdoType; 206 - 207 - typedef enum 208 - { 209 - kEplSdoTransAuto = 0x00, 210 - kEplSdoTransExpedited = 0x01, 211 - kEplSdoTransSegmented = 0x02 212 - 213 - 211 + typedef enum { 212 + kEplSdoTransAuto = 0x00, 213 + kEplSdoTransExpedited = 0x01, 214 + kEplSdoTransSegmented = 0x02 214 215 } tEplSdoTransType; 215 216 216 - 217 217 // structure to inform application about finish of SDO transfer 218 - typedef struct 219 - { 220 - tEplSdoComConHdl m_SdoComConHdl; 221 - tEplSdoComConState m_SdoComConState; 222 - DWORD m_dwAbortCode; 223 - tEplSdoAccessType m_SdoAccessType; 224 - unsigned int m_uiNodeId; // NodeId of the target 225 - unsigned int m_uiTargetIndex; // index which was accessed 226 - unsigned int m_uiTargetSubIndex; // subindex which was accessed 227 - unsigned int m_uiTransferredByte; // number of bytes transferred 228 - void* m_pUserArg; // user definable argument pointer 218 + typedef struct { 219 + tEplSdoComConHdl m_SdoComConHdl; 220 + tEplSdoComConState m_SdoComConState; 221 + DWORD m_dwAbortCode; 222 + tEplSdoAccessType m_SdoAccessType; 223 + unsigned int m_uiNodeId; // NodeId of the target 224 + unsigned int m_uiTargetIndex; // index which was accessed 225 + unsigned int m_uiTargetSubIndex; // subindex which was accessed 226 + unsigned int m_uiTransferredByte; // number of bytes transferred 227 + void *m_pUserArg; // user definable argument pointer 229 228 230 229 } tEplSdoComFinished; 231 230 232 - 233 231 // callback function pointer to inform application about connection 234 - typedef tEplKernel (PUBLIC* tEplSdoFinishedCb) ( 235 - tEplSdoComFinished* pSdoComFinished_p); 236 - 232 + typedef tEplKernel(PUBLIC * tEplSdoFinishedCb) (tEplSdoComFinished * 233 + pSdoComFinished_p); 237 234 238 235 // structure to init SDO transfer to Read or Write by Index 239 - typedef struct 240 - { 241 - tEplSdoComConHdl m_SdoComConHdl; 242 - unsigned int m_uiIndex; 243 - unsigned int m_uiSubindex; 244 - void* m_pData; 245 - unsigned int m_uiDataSize; 246 - unsigned int m_uiTimeout; // not used in this version 247 - tEplSdoAccessType m_SdoAccessType; 248 - tEplSdoFinishedCb m_pfnSdoFinishedCb; 249 - void* m_pUserArg; // user definable argument pointer 236 + typedef struct { 237 + tEplSdoComConHdl m_SdoComConHdl; 238 + unsigned int m_uiIndex; 239 + unsigned int m_uiSubindex; 240 + void *m_pData; 241 + unsigned int m_uiDataSize; 242 + unsigned int m_uiTimeout; // not used in this version 243 + tEplSdoAccessType m_SdoAccessType; 244 + tEplSdoFinishedCb m_pfnSdoFinishedCb; 245 + void *m_pUserArg; // user definable argument pointer 250 246 251 247 } tEplSdoComTransParamByIndex; 252 - 253 - 254 - 255 248 256 249 //--------------------------------------------------------------------------- 257 250 // function prototypes 258 251 //--------------------------------------------------------------------------- 259 252 260 - 261 - #endif // #ifndef _EPLSDO_H_ 262 - 263 - 253 + #endif // #ifndef _EPLSDO_H_
-2
drivers/staging/epl/EplSdoAc.h
··· 71 71 #ifndef _EPLSDOAC_H_ 72 72 #define _EPLSDOAC_H_ 73 73 74 - 75 74 // ========================================================================= 76 75 // SDO abort codes 77 76 // ========================================================================= ··· 104 105 #define EPL_SDOAC_DATA_NOT_TRANSF_DUE_DEVICE_STATE 0x08000022L 105 106 #define EPL_SDOAC_OBJECT_DICTIONARY_NOT_EXIST 0x08000023L 106 107 #define EPL_SDOAC_CONFIG_DATA_EMPTY 0x08000024L 107 - 108 108 109 109 #endif // _EPLSDOAC_H_ 110 110
+92 -99
drivers/staging/epl/EplTarget.h
··· 66 66 67 67 2005/12/05 -as: start of the implementation, version 1.00 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #ifndef _EPLTARGET_H_ 73 72 #define _EPLTARGET_H_ 74 - 75 73 76 74 //--------------------------------------------------------------------------- 77 75 // const defines ··· 85 87 86 88 #if (TARGET_SYSTEM == _WIN32_) 87 89 88 - #define _WIN32_WINDOWS 0x0401 89 - #define _WIN32_WINNT 0x0400 90 + #define _WIN32_WINDOWS 0x0401 91 + #define _WIN32_WINNT 0x0400 90 92 91 - #include <stdlib.h> 92 - #include <stdio.h> 93 + #include <stdlib.h> 94 + #include <stdio.h> 93 95 94 96 //29.11.2004 f.j. sonst ist memcpy und memset unbekannt 95 - #include <string.h> 97 + #include <string.h> 96 98 97 - #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 98 - #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 99 + #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 100 + #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 99 101 100 102 // f.j.: die Funktionen f�r <MemAlloc> und <MemFree> sind in WinMem.c definiert 101 103 //definition der Prototypen 102 - void FAR* MemAlloc (DWORD dwMemSize_p); 103 - void MemFree (void FAR* pMem_p); 104 + void FAR *MemAlloc(DWORD dwMemSize_p); 105 + void MemFree(void FAR * pMem_p); 104 106 105 - #define EPL_MALLOC(siz) malloc((size_t)(siz)) 106 - #define EPL_FREE(ptr) free((void *)ptr) 107 + #define EPL_MALLOC(siz) malloc((size_t)(siz)) 108 + #define EPL_FREE(ptr) free((void *)ptr) 107 109 108 - #ifndef PRINTF0 109 - void trace (const char* fmt, ...); 110 - #define PRINTF TRACE 111 - #define PRINTF0(arg) TRACE0(arg) 112 - #define PRINTF1(arg,p1) TRACE1(arg,p1) 113 - #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 114 - #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 115 - #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 116 - //#define PRINTF printf 117 - //#define PRINTF0(arg) PRINTF(arg) 118 - //#define PRINTF1(arg,p1) PRINTF(arg,p1) 119 - //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 120 - //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 121 - //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 122 - #endif 110 + #ifndef PRINTF0 111 + void trace(const char *fmt, ...); 112 + #define PRINTF TRACE 113 + #define PRINTF0(arg) TRACE0(arg) 114 + #define PRINTF1(arg,p1) TRACE1(arg,p1) 115 + #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 116 + #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 117 + #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 118 + //#define PRINTF printf 119 + //#define PRINTF0(arg) PRINTF(arg) 120 + //#define PRINTF1(arg,p1) PRINTF(arg,p1) 121 + //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 122 + //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 123 + //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 124 + #endif 123 125 124 - #ifdef ASSERTMSG 125 - #undef ASSERTMSG 126 - #endif 126 + #ifdef ASSERTMSG 127 + #undef ASSERTMSG 128 + #endif 127 129 128 - #define ASSERTMSG(expr,string) if (!(expr)) { \ 130 + #define ASSERTMSG(expr,string) if (!(expr)) { \ 129 131 MessageBox (NULL, string, "Assertion failed", MB_OK | MB_ICONERROR); \ 130 132 exit (-1);} 131 133 132 - 133 - 134 134 #elif (TARGET_SYSTEM == _NO_OS_) 135 135 136 - #include <stdlib.h> 137 - #include <stdio.h> 136 + #include <stdlib.h> 137 + #include <stdio.h> 138 138 139 139 //29.11.2004 f.j. sonst ist memcpy und memset unbekannt 140 140 // #include <string.h> 141 141 142 - #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 143 - #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 142 + #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 143 + #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 144 144 145 - #define EPL_MALLOC(siz) malloc((size_t)(siz)) 146 - #define EPL_FREE(ptr) free((void *)ptr) 145 + #define EPL_MALLOC(siz) malloc((size_t)(siz)) 146 + #define EPL_FREE(ptr) free((void *)ptr) 147 147 148 - #ifndef PRINTF0 149 - #define PRINTF TRACE 150 - #define PRINTF0(arg) TRACE0(arg) 151 - #define PRINTF1(arg,p1) TRACE1(arg,p1) 152 - #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 153 - #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 154 - #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 155 - //#define PRINTF printf 156 - //#define PRINTF0(arg) PRINTF(arg) 157 - //#define PRINTF1(arg,p1) PRINTF(arg,p1) 158 - //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 159 - //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 160 - //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 161 - #endif 162 - 148 + #ifndef PRINTF0 149 + #define PRINTF TRACE 150 + #define PRINTF0(arg) TRACE0(arg) 151 + #define PRINTF1(arg,p1) TRACE1(arg,p1) 152 + #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 153 + #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 154 + #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 155 + //#define PRINTF printf 156 + //#define PRINTF0(arg) PRINTF(arg) 157 + //#define PRINTF1(arg,p1) PRINTF(arg,p1) 158 + //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 159 + //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 160 + //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 161 + #endif 163 162 164 163 #elif (TARGET_SYSTEM == _LINUX_) 165 164 166 - #ifndef __KERNEL__ 167 - #include <stdlib.h> 168 - #include <stdio.h> 169 - #else 165 + #ifndef __KERNEL__ 166 + #include <stdlib.h> 167 + #include <stdio.h> 168 + #else 170 169 // #include <linux/config.h> 171 - #include <linux/module.h> 172 - #include <linux/kernel.h> 173 - #include <linux/init.h> 174 - #include <linux/errno.h> 175 - #include <linux/major.h> 176 - #include <linux/version.h> 177 - #endif 170 + #include <linux/module.h> 171 + #include <linux/kernel.h> 172 + #include <linux/init.h> 173 + #include <linux/errno.h> 174 + #include <linux/major.h> 175 + #include <linux/version.h> 176 + #endif 178 177 179 178 //29.11.2004 f.j. sonst ist memcpy und memset unbekannt 180 179 // #include <string.h> 181 180 182 - #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 183 - #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 181 + #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); 182 + #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); 184 183 185 - #ifndef __KERNEL__ 186 - #define EPL_MALLOC(siz) malloc((size_t)(siz)) 187 - #define EPL_FREE(ptr) free((void *)ptr) 188 - #else 189 - #define EPL_MALLOC(siz) kmalloc((size_t)(siz), GFP_KERNEL) 190 - #define EPL_FREE(ptr) kfree((void *)ptr) 191 - #endif 184 + #ifndef __KERNEL__ 185 + #define EPL_MALLOC(siz) malloc((size_t)(siz)) 186 + #define EPL_FREE(ptr) free((void *)ptr) 187 + #else 188 + #define EPL_MALLOC(siz) kmalloc((size_t)(siz), GFP_KERNEL) 189 + #define EPL_FREE(ptr) kfree((void *)ptr) 190 + #endif 192 191 193 - #ifndef PRINTF0 194 - #define PRINTF TRACE 195 - #define PRINTF0(arg) TRACE0(arg) 196 - #define PRINTF1(arg,p1) TRACE1(arg,p1) 197 - #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 198 - #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 199 - #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 200 - //#define PRINTF printf 201 - //#define PRINTF0(arg) PRINTF(arg) 202 - //#define PRINTF1(arg,p1) PRINTF(arg,p1) 203 - //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 204 - //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 205 - //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 206 - #endif 207 - 192 + #ifndef PRINTF0 193 + #define PRINTF TRACE 194 + #define PRINTF0(arg) TRACE0(arg) 195 + #define PRINTF1(arg,p1) TRACE1(arg,p1) 196 + #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) 197 + #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) 198 + #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) 199 + //#define PRINTF printf 200 + //#define PRINTF0(arg) PRINTF(arg) 201 + //#define PRINTF1(arg,p1) PRINTF(arg,p1) 202 + //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) 203 + //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) 204 + //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) 205 + #endif 208 206 209 207 #endif 210 208 211 - #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt 212 - #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt 209 + #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt 210 + #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt 213 211 214 212 //--------------------------------------------------------------------------- 215 213 // typedef 216 214 //--------------------------------------------------------------------------- 217 - 218 215 219 216 //--------------------------------------------------------------------------- 220 217 // function prototypes ··· 224 231 // functions for ethernet driver 225 232 tEplKernel PUBLIC TgtInitEthIsr(void); 226 233 void PUBLIC TgtFreeEthIsr(void); 227 - void PUBLIC TgtEnableGlobalInterrupt(BYTE fEnable_p); 228 - void PUBLIC TgtEnableEthInterrupt0(BYTE fEnable_p, unsigned int uiInterruptMask_p); 229 - void PUBLIC TgtEnableEthInterrupt1(BYTE fEnable_p, unsigned int uiInterruptMask_p); 234 + void PUBLIC TgtEnableGlobalInterrupt(BYTE fEnable_p); 235 + void PUBLIC TgtEnableEthInterrupt0(BYTE fEnable_p, 236 + unsigned int uiInterruptMask_p); 237 + void PUBLIC TgtEnableEthInterrupt1(BYTE fEnable_p, 238 + unsigned int uiInterruptMask_p); 230 239 231 - #endif // #ifndef _EPLTARGET_H_ 232 - 233 - 240 + #endif // #ifndef _EPLTARGET_H_
+19 -27
drivers/staging/epl/EplTimer.h
··· 66 66 67 67 2006/07/06 k.t.: start of the implementation 68 68 69 - 70 69 ****************************************************************************/ 71 70 72 71 #include "EplInc.h" ··· 74 75 #ifndef _EPLTIMER_H_ 75 76 #define _EPLTIMER_H_ 76 77 77 - 78 78 //--------------------------------------------------------------------------- 79 79 // const defines 80 80 //--------------------------------------------------------------------------- 81 - 82 81 83 82 //--------------------------------------------------------------------------- 84 83 // typedef ··· 85 88 // type for timer handle 86 89 typedef unsigned long tEplTimerHdl; 87 90 88 - typedef struct 89 - { 90 - tEplEventSink m_EventSink; 91 - unsigned long m_ulArg; // d.k.: converted to unsigned long because 92 - // it is never accessed as a pointer by the 93 - // timer module and the data the 94 - // pointer points to is not saved in any way. 95 - // It is just a value. The user is responsible 96 - // to store the data statically and convert 97 - // the pointer between address spaces. 91 + typedef struct { 92 + tEplEventSink m_EventSink; 93 + unsigned long m_ulArg; // d.k.: converted to unsigned long because 94 + // it is never accessed as a pointer by the 95 + // timer module and the data the 96 + // pointer points to is not saved in any way. 97 + // It is just a value. The user is responsible 98 + // to store the data statically and convert 99 + // the pointer between address spaces. 98 100 99 101 } tEplTimerArg; 100 102 101 - typedef struct 102 - { 103 - tEplTimerHdl m_TimerHdl; 104 - unsigned long m_ulArg; // d.k.: converted to unsigned long because 105 - // it is never accessed as a pointer by the 106 - // timer module and the data the 107 - // pointer points to is not saved in any way. 108 - // It is just a value. 103 + typedef struct { 104 + tEplTimerHdl m_TimerHdl; 105 + unsigned long m_ulArg; // d.k.: converted to unsigned long because 106 + // it is never accessed as a pointer by the 107 + // timer module and the data the 108 + // pointer points to is not saved in any way. 109 + // It is just a value. 109 110 110 111 } tEplTimerEventArg; 111 112 112 - typedef tEplKernel (PUBLIC * tEplTimerkCallback) ( 113 - tEplTimerEventArg* pEventArg_p); 113 + typedef tEplKernel(PUBLIC * tEplTimerkCallback) (tEplTimerEventArg * 114 + pEventArg_p); 114 115 115 116 //--------------------------------------------------------------------------- 116 117 // function prototypes 117 118 //--------------------------------------------------------------------------- 118 119 119 - 120 - #endif // #ifndef _EPLTIMER_H_ 121 - 122 - 120 + #endif // #ifndef _EPLTIMER_H_
+2 -4
drivers/staging/epl/EplVersion.h
··· 70 70 #ifndef _EPL_VERSION_H_ 71 71 #define _EPL_VERSION_H_ 72 72 73 - 74 73 // NOTE: 75 74 // All version macros should contain the same version number. But do not use 76 75 // defines instead of the numbers. Because the macro EPL_STRING_VERSION() can not ··· 84 85 #define DEFINED_OBJ1018_VERSION EPL_OBJ1018_VERSION (1, 3, 0) 85 86 #define DEFINED_STRING_VERSION EPL_STRING_VERSION (1, 3, 0) 86 87 87 - 88 88 // ----------------------------------------------------------------------------- 89 89 #define EPL_PRODUCT_NAME "EPL V2" 90 90 #define EPL_PRODUCT_VERSION DEFINED_STRING_VERSION 91 91 #define EPL_PRODUCT_MANUFACTURER "SYS TEC electronic GmbH" 92 92 93 - #define EPL_PRODUCT_KEY "SO-1083" 94 - #define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source" 93 + #define EPL_PRODUCT_KEY "SO-1083" 94 + #define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source" 95 95 96 96 #endif // _EPL_VERSION_H_ 97 97
+89 -68
drivers/staging/epl/SharedBuff.h
··· 57 57 #ifndef _SHAREDBUFF_H_ 58 58 #define _SHAREDBUFF_H_ 59 59 60 - 61 - 62 60 //--------------------------------------------------------------------------- 63 61 // Type definitions 64 62 //--------------------------------------------------------------------------- 65 63 66 - typedef enum 67 - { 68 - kShbOk = 0, 69 - kShbNoReadableData = 1, 70 - kShbDataTruncated = 2, 71 - kShbBufferFull = 3, 72 - kShbDataOutsideBufferArea = 4, 73 - kShbBufferAlreadyCompleted = 5, 74 - kShbMemUsedByOtherProcs = 6, 75 - kShbOpenMismatch = 7, 76 - kShbInvalidBufferType = 8, 77 - kShbInvalidArg = 9, 78 - kShbBufferInvalid = 10, 79 - kShbOutOfMem = 11, 80 - kShbAlreadyReseting = 12, 81 - kShbAlreadySignaling = 13, 82 - kShbExceedDataSizeLimit = 14, 64 + typedef enum { 65 + kShbOk = 0, 66 + kShbNoReadableData = 1, 67 + kShbDataTruncated = 2, 68 + kShbBufferFull = 3, 69 + kShbDataOutsideBufferArea = 4, 70 + kShbBufferAlreadyCompleted = 5, 71 + kShbMemUsedByOtherProcs = 6, 72 + kShbOpenMismatch = 7, 73 + kShbInvalidBufferType = 8, 74 + kShbInvalidArg = 9, 75 + kShbBufferInvalid = 10, 76 + kShbOutOfMem = 11, 77 + kShbAlreadyReseting = 12, 78 + kShbAlreadySignaling = 13, 79 + kShbExceedDataSizeLimit = 14, 83 80 84 81 } tShbError; 85 82 86 - 87 83 // 2006/08/24 d.k.: Priority for threads (new data, job signaling) 88 - typedef enum 89 - { 90 - kShbPriorityLow = 0, 91 - kShbPriorityNormal = 1, 92 - kshbPriorityHigh = 2 93 - 84 + typedef enum { 85 + kShbPriorityLow = 0, 86 + kShbPriorityNormal = 1, 87 + kshbPriorityHigh = 2 94 88 } tShbPriority; 95 89 96 - 97 - typedef struct 98 - { 99 - unsigned int m_uiFullBlockSize; // real size of allocated block (incl. alignment fill bytes) 100 - unsigned long m_ulAvailableSize; // still available size for data 101 - unsigned long m_ulWrIndex; // current write index 102 - unsigned int m_fBufferCompleted; // TRUE if allocated block is complete filled with data 90 + typedef struct { 91 + unsigned int m_uiFullBlockSize; // real size of allocated block (incl. alignment fill bytes) 92 + unsigned long m_ulAvailableSize; // still available size for data 93 + unsigned long m_ulWrIndex; // current write index 94 + unsigned int m_fBufferCompleted; // TRUE if allocated block is complete filled with data 103 95 104 96 } tShbCirChunk; 105 97 98 + typedef void *tShbInstance; 106 99 107 - typedef void* tShbInstance; 108 - 109 - 110 - typedef void (*tShbCirSigHndlrNewData) (tShbInstance pShbInstance_p, unsigned long ulDataBlockSize_p); 111 - typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p, unsigned int fTimeOut_p); 112 - 113 - 100 + typedef void (*tShbCirSigHndlrNewData) (tShbInstance pShbInstance_p, 101 + unsigned long ulDataBlockSize_p); 102 + typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p, 103 + unsigned int fTimeOut_p); 114 104 115 105 //--------------------------------------------------------------------------- 116 106 // Prototypes ··· 119 129 #endif 120 130 */ 121 131 122 - tShbError ShbInit (void); 123 - tShbError ShbExit (void); 132 + tShbError ShbInit(void); 133 + tShbError ShbExit(void); 124 134 125 135 // Circular Shared Buffer 126 - tShbError ShbCirAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); 127 - tShbError ShbCirReleaseBuffer (tShbInstance pShbInstance_p); 136 + tShbError ShbCirAllocBuffer(unsigned long ulBufferSize_p, 137 + const char *pszBufferID_p, 138 + tShbInstance * ppShbInstance_p, 139 + unsigned int *pfShbNewCreated_p); 140 + tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p); 128 141 129 142 #if !defined(INLINE_ENABLED) 130 143 131 - tShbError ShbCirResetBuffer (tShbInstance pShbInstance_p, unsigned long ulTimeOut_p, tShbCirSigHndlrReset pfnSignalHandlerReset_p); 132 - tShbError ShbCirWriteDataBlock (tShbInstance pShbInstance_p, const void* pSrcDataBlock_p, unsigned long ulDataBlockSize_p); 133 - tShbError ShbCirAllocDataBlock (tShbInstance pShbInstance_p, tShbCirChunk* pShbCirChunk_p, unsigned long ulDataBufferSize_p); 134 - tShbError ShbCirWriteDataChunk (tShbInstance pShbInstance_p, tShbCirChunk* pShbCirChunk_p, const void* pSrcDataChunk_p, unsigned long ulDataChunkSize_p, unsigned int* pfBufferCompleted_p); 135 - tShbError ShbCirReadDataBlock (tShbInstance pShbInstance_p, void* pDstDataBlock_p, unsigned long ulRdBuffSize_p, unsigned long* pulDataBlockSize_p); 136 - tShbError ShbCirGetReadDataSize (tShbInstance pShbInstance_p, unsigned long* pulDataBlockSize_p); 137 - tShbError ShbCirGetReadBlockCount (tShbInstance pShbInstance_p, unsigned long* pulDataBlockCount_p); 138 - tShbError ShbCirSetSignalHandlerNewData (tShbInstance pShbInstance_p, tShbCirSigHndlrNewData pfnShbSignalHandlerNewData_p, tShbPriority ShbPriority_p); 144 + tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, 145 + unsigned long ulTimeOut_p, 146 + tShbCirSigHndlrReset 147 + pfnSignalHandlerReset_p); 148 + tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, 149 + const void *pSrcDataBlock_p, 150 + unsigned long ulDataBlockSize_p); 151 + tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, 152 + tShbCirChunk * pShbCirChunk_p, 153 + unsigned long ulDataBufferSize_p); 154 + tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, 155 + tShbCirChunk * pShbCirChunk_p, 156 + const void *pSrcDataChunk_p, 157 + unsigned long ulDataChunkSize_p, 158 + unsigned int *pfBufferCompleted_p); 159 + tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, 160 + void *pDstDataBlock_p, 161 + unsigned long ulRdBuffSize_p, 162 + unsigned long *pulDataBlockSize_p); 163 + tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, 164 + unsigned long *pulDataBlockSize_p); 165 + tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, 166 + unsigned long *pulDataBlockCount_p); 167 + tShbError ShbCirSetSignalHandlerNewData(tShbInstance pShbInstance_p, 168 + tShbCirSigHndlrNewData 169 + pfnShbSignalHandlerNewData_p, 170 + tShbPriority ShbPriority_p); 139 171 140 172 #endif 141 173 142 174 // Linear Shared Buffer 143 - tShbError ShbLinAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); 144 - tShbError ShbLinReleaseBuffer (tShbInstance pShbInstance_p); 175 + tShbError ShbLinAllocBuffer(unsigned long ulBufferSize_p, 176 + const char *pszBufferID_p, 177 + tShbInstance * ppShbInstance_p, 178 + unsigned int *pfShbNewCreated_p); 179 + tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p); 145 180 146 181 #if !defined(INLINE_ENABLED) 147 182 148 - tShbError ShbLinWriteDataBlock (tShbInstance pShbInstance_p, unsigned long ulDstBufferOffs_p, const void* pSrcDataBlock_p, unsigned long ulDataBlockSize_p); 149 - tShbError ShbLinReadDataBlock (tShbInstance pShbInstance_p, void* pDstDataBlock_p, unsigned long ulSrcBufferOffs_p, unsigned long ulDataBlockSize_p); 183 + tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, 184 + unsigned long ulDstBufferOffs_p, 185 + const void *pSrcDataBlock_p, 186 + unsigned long ulDataBlockSize_p); 187 + tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, 188 + void *pDstDataBlock_p, 189 + unsigned long ulSrcBufferOffs_p, 190 + unsigned long ulDataBlockSize_p); 150 191 151 192 #endif 152 193 153 194 #ifndef NDEBUG 154 - tShbError ShbCirTraceBuffer (tShbInstance pShbInstance_p); 155 - tShbError ShbLinTraceBuffer (tShbInstance pShbInstance_p); 156 - tShbError ShbTraceDump (const unsigned char* pabStartAddr_p, unsigned long ulDataSize_p, unsigned long ulAddrOffset_p, const char* pszInfoText_p); 195 + tShbError ShbCirTraceBuffer(tShbInstance pShbInstance_p); 196 + tShbError ShbLinTraceBuffer(tShbInstance pShbInstance_p); 197 + tShbError ShbTraceDump(const unsigned char *pabStartAddr_p, 198 + unsigned long ulDataSize_p, 199 + unsigned long ulAddrOffset_p, 200 + const char *pszInfoText_p); 157 201 #else 158 - #define ShbCirTraceBuffer(p0) 159 - #define ShbLinTraceBuffer(p0) 160 - #define ShbTraceDump(p0, p1, p2, p3) 202 + #define ShbCirTraceBuffer(p0) 203 + #define ShbLinTraceBuffer(p0) 204 + #define ShbTraceDump(p0, p1, p2, p3) 161 205 #endif 162 206 163 - #undef INLINE_ENABLED // disable actual inlining of functions 207 + #undef INLINE_ENABLED // disable actual inlining of functions 164 208 #undef INLINE_FUNCTION 165 - #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing 209 + #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing 166 210 167 211 #ifdef __cplusplus 168 212 } 169 213 #endif 170 - 171 - 172 - #endif // #ifndef _SHAREDBUFF_H_ 173 - 214 + #endif // #ifndef _SHAREDBUFF_H_
+41 -36
drivers/staging/epl/ShbIpc.h
··· 57 57 #ifndef _SHBIPC_H_ 58 58 #define _SHBIPC_H_ 59 59 60 - 61 - 62 60 //--------------------------------------------------------------------------- 63 61 // Type definitions 64 62 //--------------------------------------------------------------------------- 65 63 66 - typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); 67 - typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, unsigned int fTimeOut_p); 68 - 64 + typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); 65 + typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, 66 + unsigned int fTimeOut_p); 69 67 70 68 #if (TARGET_SYSTEM == _WIN32_) 71 - #if defined(INLINE_FUNCTION_DEF) 72 - #undef INLINE_FUNCTION 73 - #define INLINE_FUNCTION INLINE_FUNCTION_DEF 74 - #define SHBIPC_INLINE_ENABLED TRUE 75 - #define SHBIPC_INLINED 76 - #include "ShbIpc-Win32.c" 77 - #endif 78 - 79 - #elif (TARGET_SYSTEM == _LINUX_) 80 - #if defined(INLINE_FUNCTION_DEF) 81 - #undef INLINE_FUNCTION 82 - #define INLINE_FUNCTION INLINE_FUNCTION_DEF 83 - #define SHBIPC_INLINE_ENABLED TRUE 84 - #define SHBIPC_INLINED 85 - #include "ShbIpc-LinuxKernel.c" 86 - #endif 69 + #if defined(INLINE_FUNCTION_DEF) 70 + #undef INLINE_FUNCTION 71 + #define INLINE_FUNCTION INLINE_FUNCTION_DEF 72 + #define SHBIPC_INLINE_ENABLED TRUE 73 + #define SHBIPC_INLINED 74 + #include "ShbIpc-Win32.c" 87 75 #endif 88 76 77 + #elif (TARGET_SYSTEM == _LINUX_) 78 + #if defined(INLINE_FUNCTION_DEF) 79 + #undef INLINE_FUNCTION 80 + #define INLINE_FUNCTION INLINE_FUNCTION_DEF 81 + #define SHBIPC_INLINE_ENABLED TRUE 82 + #define SHBIPC_INLINED 83 + #include "ShbIpc-LinuxKernel.c" 84 + #endif 85 + #endif 89 86 90 87 //--------------------------------------------------------------------------- 91 88 // Prototypes 92 89 //--------------------------------------------------------------------------- 93 90 94 - tShbError ShbIpcInit (void); 95 - tShbError ShbIpcExit (void); 91 + tShbError ShbIpcInit(void); 92 + tShbError ShbIpcExit(void); 96 93 97 - tShbError ShbIpcAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); 98 - tShbError ShbIpcReleaseBuffer (tShbInstance pShbInstance_p); 94 + tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p, 95 + const char *pszBufferID_p, 96 + tShbInstance * ppShbInstance_p, 97 + unsigned int *pfShbNewCreated_p); 98 + tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p); 99 99 100 100 #if !defined(SHBIPC_INLINE_ENABLED) 101 101 102 - tShbError ShbIpcEnterAtomicSection (tShbInstance pShbInstance_p); 103 - tShbError ShbIpcLeaveAtomicSection (tShbInstance pShbInstance_p); 102 + tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p); 103 + tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p); 104 104 105 - tShbError ShbIpcStartSignalingNewData (tShbInstance pShbInstance_p, tSigHndlrNewData pfnSignalHandlerNewData_p, tShbPriority ShbPriority_p); 106 - tShbError ShbIpcStopSignalingNewData (tShbInstance pShbInstance_p); 107 - tShbError ShbIpcSignalNewData (tShbInstance pShbInstance_p); 105 + tShbError ShbIpcStartSignalingNewData(tShbInstance pShbInstance_p, 106 + tSigHndlrNewData 107 + pfnSignalHandlerNewData_p, 108 + tShbPriority ShbPriority_p); 109 + tShbError ShbIpcStopSignalingNewData(tShbInstance pShbInstance_p); 110 + tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p); 108 111 109 - tShbError ShbIpcStartSignalingJobReady (tShbInstance pShbInstance_p, unsigned long ulTimeOut_p, tSigHndlrJobReady pfnSignalHandlerJobReady_p); 110 - tShbError ShbIpcSignalJobReady (tShbInstance pShbInstance_p); 112 + tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p, 113 + unsigned long ulTimeOut_p, 114 + tSigHndlrJobReady 115 + pfnSignalHandlerJobReady_p); 116 + tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p); 111 117 112 - void* ShbIpcGetShMemPtr (tShbInstance pShbInstance_p); 118 + void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p); 113 119 #endif 114 120 115 - #undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions 121 + #undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions 116 122 #undef INLINE_FUNCTION 117 - #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing 123 + #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing 118 124 119 125 #endif // #ifndef _SHBIPC_H_ 120 -
+4 -4
drivers/staging/epl/ShbLinuxKernel.h
··· 57 57 #ifndef _SHBLINUXKERNEL_H_ 58 58 #define _SHBLINUXKERNEL_H_ 59 59 60 - struct sShbMemTable{ 61 - int m_iBufferId; 62 - void* m_pBuffer; 63 - struct sShbMemTable *m_psNextMemTableElement; 60 + struct sShbMemTable { 61 + int m_iBufferId; 62 + void *m_pBuffer; 63 + struct sShbMemTable *m_psNextMemTableElement; 64 64 }; 65 65 66 66 extern struct sShbMemTable *psMemTableElementFirst_g;
+6 -9
drivers/staging/epl/SocketLinuxKernel.h
··· 66 66 67 67 2006/08/25 d.k.: start of the implementation 68 68 69 - 70 69 ****************************************************************************/ 71 - 72 70 73 71 #ifndef _SOCKETLINUXKERNEL_H_ 74 72 #define _SOCKETLINUXKERNEL_H_ 75 73 76 74 #include <linux/net.h> 77 75 #include <linux/in.h> 78 - 79 76 80 77 //--------------------------------------------------------------------------- 81 78 // const defines ··· 84 87 // typedef 85 88 //--------------------------------------------------------------------------- 86 89 87 - typedef struct socket* SOCKET; 90 + typedef struct socket *SOCKET; 88 91 89 92 //--------------------------------------------------------------------------- 90 93 // function prototypes ··· 94 97 95 98 int closesocket(SOCKET s); 96 99 97 - int recvfrom(SOCKET s, char* buf, int len, int flags, struct sockaddr *from, int * fromlen); 100 + int recvfrom(SOCKET s, char *buf, int len, int flags, struct sockaddr *from, 101 + int *fromlen); 98 102 99 - int sendto(SOCKET s, const char* buf, int len, int flags, const struct sockaddr *to, int tolen); 103 + int sendto(SOCKET s, const char *buf, int len, int flags, 104 + const struct sockaddr *to, int tolen); 100 105 101 106 SOCKET socket(int af, int type, int protocol); 102 107 103 - #endif // #ifndef _SOCKETLINUXKERNEL_H_ 104 - 105 - 108 + #endif // #ifndef _SOCKETLINUXKERNEL_H_
+37 -53
drivers/staging/epl/edrv.h
··· 81 81 #define MAX_ETH_DATA_SIZE 1500 82 82 #define MIN_ETH_DATA_SIZE 46 83 83 84 - #define ETH_HDR_OFFSET 0 // Ethernet header at the top of the frame 85 - #define ETH_HDR_SIZE 14 // size of Ethernet header 86 - #define MIN_ETH_SIZE (MIN_ETH_DATA_SIZE + ETH_HDR_SIZE) // without CRC 84 + #define ETH_HDR_OFFSET 0 // Ethernet header at the top of the frame 85 + #define ETH_HDR_SIZE 14 // size of Ethernet header 86 + #define MIN_ETH_SIZE (MIN_ETH_DATA_SIZE + ETH_HDR_SIZE) // without CRC 87 87 88 - #define ETH_CRC_SIZE 4 // size of Ethernet CRC, i.e. FCS 89 - 90 - 88 + #define ETH_CRC_SIZE 4 // size of Ethernet CRC, i.e. FCS 91 89 92 90 //--------------------------------------------------------------------------- 93 91 // types 94 92 //--------------------------------------------------------------------------- 95 93 96 94 // position of a buffer in an ethernet-frame 97 - typedef enum 98 - { 99 - kEdrvBufferFirstInFrame = 0x01, // first data buffer in an ethernet frame 100 - kEdrvBufferMiddleInFrame = 0x02, // a middle data buffer in an ethernet frame 101 - kEdrvBufferLastInFrame = 0x04 // last data buffer in an ethernet frame 95 + typedef enum { 96 + kEdrvBufferFirstInFrame = 0x01, // first data buffer in an ethernet frame 97 + kEdrvBufferMiddleInFrame = 0x02, // a middle data buffer in an ethernet frame 98 + kEdrvBufferLastInFrame = 0x04 // last data buffer in an ethernet frame 102 99 } tEdrvBufferInFrame; 103 100 104 - 105 101 // format of a tx-buffer 106 - typedef struct _tEdrvTxBuffer 107 - { 108 - tEplMsgType m_EplMsgType; // IN: type of EPL message, set by calling function 109 - unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call) 110 - // ---------------------- 111 - unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver 112 - BYTE * m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver 113 - tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver 114 - // ---------------------- 115 - unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer 102 + typedef struct _tEdrvTxBuffer { 103 + tEplMsgType m_EplMsgType; // IN: type of EPL message, set by calling function 104 + unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call) 105 + // ---------------------- 106 + unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver 107 + BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver 108 + tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver 109 + // ---------------------- 110 + unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer 116 111 } tEdrvTxBuffer; 117 112 118 113 // format of a rx-buffer 119 - typedef struct _tEdrvRxBuffer 120 - { 121 - tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame 122 - unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC) 123 - BYTE * m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver 124 - tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption 114 + typedef struct _tEdrvRxBuffer { 115 + tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame 116 + unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC) 117 + BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver 118 + tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption 125 119 126 120 } tEdrvRxBuffer; 127 - 128 - 129 121 130 122 //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, tBufferDescr * pbBuffer_p); 131 123 //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); 132 124 typedef void (*tEdrvRxHandler) (tEdrvRxBuffer * pRxBuffer_p); 133 125 typedef void (*tEdrvTxHandler) (tEdrvTxBuffer * pTxBuffer_p); 134 126 135 - 136 127 // format of init structure 137 - typedef struct 138 - { 139 - BYTE m_abMyMacAddr[6]; // the own MAC address 128 + typedef struct { 129 + BYTE m_abMyMacAddr[6]; // the own MAC address 140 130 141 131 // BYTE m_bNoOfRxBuffDescr; // number of entries in rx bufferdescriptor table 142 132 // tBufferDescr * m_pRxBuffDescrTable; // rx bufferdescriptor table 143 133 // WORD m_wRxBufferSize; // size of the whole rx buffer 144 134 145 - tEdrvRxHandler m_pfnRxHandler; 146 - tEdrvTxHandler m_pfnTxHandler; 135 + tEdrvRxHandler m_pfnRxHandler; 136 + tEdrvTxHandler m_pfnTxHandler; 147 137 148 138 } tEdrvInitParam; 149 - 150 139 151 140 //--------------------------------------------------------------------------- 152 141 // function prototypes 153 142 //--------------------------------------------------------------------------- 154 143 144 + tEplKernel EdrvInit(tEdrvInitParam * pEdrvInitParam_p); 155 145 156 - tEplKernel EdrvInit (tEdrvInitParam* pEdrvInitParam_p); 146 + tEplKernel EdrvShutdown(void); 157 147 158 - tEplKernel EdrvShutdown (void); 159 - 160 - tEplKernel EdrvDefineRxMacAddrEntry (BYTE * pbMacAddr_p); 161 - tEplKernel EdrvUndefineRxMacAddrEntry (BYTE * pbMacAddr_p); 148 + tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p); 149 + tEplKernel EdrvUndefineRxMacAddrEntry(BYTE * pbMacAddr_p); 162 150 163 151 //tEplKernel EdrvDefineUnicastEntry (BYTE * pbUCEntry_p); 164 152 //tEplKernel EdrvUndfineUnicastEntry (BYTE * pbUCEntry_p); 165 153 166 - tEplKernel EdrvAllocTxMsgBuffer (tEdrvTxBuffer * pBuffer_p); 167 - tEplKernel EdrvReleaseTxMsgBuffer (tEdrvTxBuffer * pBuffer_p); 154 + tEplKernel EdrvAllocTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); 155 + tEplKernel EdrvReleaseTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); 168 156 169 157 //tEplKernel EdrvWriteMsg (tBufferDescr * pbBuffer_p); 170 - tEplKernel EdrvSendTxMsg (tEdrvTxBuffer * pBuffer_p); 171 - tEplKernel EdrvTxMsgReady (tEdrvTxBuffer * pBuffer_p); 172 - tEplKernel EdrvTxMsgStart (tEdrvTxBuffer * pBuffer_p); 158 + tEplKernel EdrvSendTxMsg(tEdrvTxBuffer * pBuffer_p); 159 + tEplKernel EdrvTxMsgReady(tEdrvTxBuffer * pBuffer_p); 160 + tEplKernel EdrvTxMsgStart(tEdrvTxBuffer * pBuffer_p); 173 161 174 162 //tEplKernel EdrvReadMsg (void); 175 163 176 164 // interrupt handler called by target specific interrupt handler 177 - void EdrvInterruptHandler (void); 165 + void EdrvInterruptHandler(void); 178 166 179 - 180 - 181 - #endif // #ifndef _EDRV_H_ 182 - 183 - 167 + #endif // #ifndef _EDRV_H_
+847 -924
drivers/staging/epl/global.h
··· 22 22 #ifndef _GLOBAL_H_ 23 23 #define _GLOBAL_H_ 24 24 25 - 26 25 //--------------------------------------------------------------------------- 27 26 // elements of defines for development system 28 27 //--------------------------------------------------------------------------- 29 28 30 29 // these defines are necessary to check some of characteristics of the development system 31 - #define _DEV_BIGEND_ 0x80000000L // big endian (motorolla format) 32 - #define _DEV_ALIGNMENT_4_ 0x00400000L // the CPU needs alignment of 4 bytes 33 - #define _DEV_ONLY_INT_MAIN_ 0x00004000L // the compiler needs "int main(int)" instead of "void main(void)" 34 - #define _DEV_COMMA_EXT_ 0x00002000L // support of last comma in struct predefinition 35 - #define _DEV_64BIT_SUPPORT_ 0x00001000L // support of 64 bit operations 36 - #define _DEV_BIT64_ 0x00000400L // count of bits: 64 bit 37 - #define _DEV_BIT32_ 0x00000300L // 32 bit 38 - #define _DEV_BIT16_ 0x00000200L // 16 bit 39 - #define _DEV_BIT8_ 0x00000100L // 8 bit 40 - #define _DEV_RVCT_ARM_ 0x0000001CL // RealView ARM 41 - #define _DEV_RENESASM32C 0x0000001BL // compiler from: Renesas 42 - #define _DEV_GNUC_MIPS2_ 0x0000001AL // GNU for MIPS2 43 - #define _DEV_MPLAB_C30_ 0x00000019L // MPLAB C30 for Microchip dsPIC33F series 44 - #define _DEV_GNUC_TC_ 0x00000018L // GNU for Infineon TriCore 45 - #define _DEV_GNUC_X86_ 0x00000017L // GNU for I386 46 - #define _DEV_IAR_ARM_ 0x00000016L // ARM IAR C/C++ Compiler 47 - #define _DEV_PARADGM_X86 0x00000015L // Paradigm C/C++ for Beck 1x3 48 - #define _DEV_GNUC_CF_ 0x00000014L // GNU for Coldfire 49 - #define _DEV_KEIL_ARM_ 0x00000013L // Keil ARM 50 - #define _DEV_MSEVC_ 0x00000012L // Microsoft embedded Visual C/C++ 51 - #define _DEV_HIGHTEC_GNUC_X86_ 0x00000011L // Hightec elf386 gcc 52 - #define _DEV_MSVC_RTX_ 0x00000010L // VC600 + RTX 53 - #define _DEV_MSVC_V1_5_ 0x0000000FL // Microsoft Visual C/C++ V1.5 54 - #define _DEV_GNUC_ARM7_ 0x0000000EL // GNU Compiler gcc for ARM7 55 - #define _DEV_METROWERKS_CW_ 0x0000000DL // Metrowerks Code Warrior 56 - #define _DEV_MITSUBISHIM16C_ 0x0000000CL //compiler from: Mitsubishi 57 - #define _DEV_GNUC_C16X_ 0x0000000BL // GNU Compiler gcc166 for Infineon C16x 58 - #define _DEV_LINUX_GCC_ 0x0000000AL // Linux GNU Compiler gcc 59 - #define _DEV_GNUC_MPC5X5 0x00000009L // GNU for Motorola PPC5x5 60 - #define _DEV_TASKINGM16C_ 0x00000008L // Tasking for Mitsubishi M16C 61 - #define _DEV_FUJITSU_ 0x00000007L // Fujitsu 62 - #define _DEV_TASKING8_ 0x00000006L // Tasking 8051 63 - #define _DEV_TASKING16_ 0x00000005L // Tasking 166 64 - #define _DEV_KEIL8_ 0x00000004L // Keil C51 65 - #define _DEV_KEIL16_ 0x00000003L // Keil C166 66 - #define _DEV_BORLANDC_ 0x00000002L // Borland C/C++ 67 - #define _DEV_MSVC16_ 0x00000001L // Microsoft Visual C/C++ 68 - #define _DEV_MSVC32_ 0x00000000L // Microsoft Visual C/C++ 30 + #define _DEV_BIGEND_ 0x80000000L // big endian (motorolla format) 31 + #define _DEV_ALIGNMENT_4_ 0x00400000L // the CPU needs alignment of 4 bytes 32 + #define _DEV_ONLY_INT_MAIN_ 0x00004000L // the compiler needs "int main(int)" instead of "void main(void)" 33 + #define _DEV_COMMA_EXT_ 0x00002000L // support of last comma in struct predefinition 34 + #define _DEV_64BIT_SUPPORT_ 0x00001000L // support of 64 bit operations 35 + #define _DEV_BIT64_ 0x00000400L // count of bits: 64 bit 36 + #define _DEV_BIT32_ 0x00000300L // 32 bit 37 + #define _DEV_BIT16_ 0x00000200L // 16 bit 38 + #define _DEV_BIT8_ 0x00000100L // 8 bit 39 + #define _DEV_RVCT_ARM_ 0x0000001CL // RealView ARM 40 + #define _DEV_RENESASM32C 0x0000001BL // compiler from: Renesas 41 + #define _DEV_GNUC_MIPS2_ 0x0000001AL // GNU for MIPS2 42 + #define _DEV_MPLAB_C30_ 0x00000019L // MPLAB C30 for Microchip dsPIC33F series 43 + #define _DEV_GNUC_TC_ 0x00000018L // GNU for Infineon TriCore 44 + #define _DEV_GNUC_X86_ 0x00000017L // GNU for I386 45 + #define _DEV_IAR_ARM_ 0x00000016L // ARM IAR C/C++ Compiler 46 + #define _DEV_PARADGM_X86 0x00000015L // Paradigm C/C++ for Beck 1x3 47 + #define _DEV_GNUC_CF_ 0x00000014L // GNU for Coldfire 48 + #define _DEV_KEIL_ARM_ 0x00000013L // Keil ARM 49 + #define _DEV_MSEVC_ 0x00000012L // Microsoft embedded Visual C/C++ 50 + #define _DEV_HIGHTEC_GNUC_X86_ 0x00000011L // Hightec elf386 gcc 51 + #define _DEV_MSVC_RTX_ 0x00000010L // VC600 + RTX 52 + #define _DEV_MSVC_V1_5_ 0x0000000FL // Microsoft Visual C/C++ V1.5 53 + #define _DEV_GNUC_ARM7_ 0x0000000EL // GNU Compiler gcc for ARM7 54 + #define _DEV_METROWERKS_CW_ 0x0000000DL // Metrowerks Code Warrior 55 + #define _DEV_MITSUBISHIM16C_ 0x0000000CL //compiler from: Mitsubishi 56 + #define _DEV_GNUC_C16X_ 0x0000000BL // GNU Compiler gcc166 for Infineon C16x 57 + #define _DEV_LINUX_GCC_ 0x0000000AL // Linux GNU Compiler gcc 58 + #define _DEV_GNUC_MPC5X5 0x00000009L // GNU for Motorola PPC5x5 59 + #define _DEV_TASKINGM16C_ 0x00000008L // Tasking for Mitsubishi M16C 60 + #define _DEV_FUJITSU_ 0x00000007L // Fujitsu 61 + #define _DEV_TASKING8_ 0x00000006L // Tasking 8051 62 + #define _DEV_TASKING16_ 0x00000005L // Tasking 166 63 + #define _DEV_KEIL8_ 0x00000004L // Keil C51 64 + #define _DEV_KEIL16_ 0x00000003L // Keil C166 65 + #define _DEV_BORLANDC_ 0x00000002L // Borland C/C++ 66 + #define _DEV_MSVC16_ 0x00000001L // Microsoft Visual C/C++ 67 + #define _DEV_MSVC32_ 0x00000000L // Microsoft Visual C/C++ 69 68 70 69 // these defines can be used to mask previous elements 71 70 #define _DEV_MASK_COMPILER 0x000000FFL 72 71 #define _DEV_MASK_BITCOUNT 0x00000F00L 73 72 #define _DEV_MASK_ADDSUPPORT 0x0000F000L 74 73 #define _DEV_MASK_ALIGNMENT 0x00F00000L 75 - 76 74 77 75 //--------------------------------------------------------------------------- 78 76 // defines for development system (DEV_SYSTEM) including previous elements ··· 79 81 #define _DEV_WIN16_ (_DEV_BIT16_ | _DEV_MSVC16_ ) 80 82 #define _DEV_WIN32_ (_DEV_BIT32_ | _DEV_MSVC32_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 81 83 #define _DEV_MSVC_DOS_ (_DEV_BIT32_ | _DEV_MSVC_V1_5_ ) 82 - #define _DEV_BORLAND_DOS_ (_DEV_BIT32_ | _DEV_BORLANDC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 83 - #define _DEV_KEIL_C51X_ (_DEV_BIT8_ | _DEV_KEIL8_ | _DEV_BIGEND_ | _DEV_COMMA_EXT_) // at least C51 version 7.05 supports comma extension 84 - #define _DEV_KEIL_C16X_ (_DEV_BIT16_ | _DEV_KEIL16_ | _DEV_COMMA_EXT_) // at least C166 version 5.03 supports comma extension 84 + #define _DEV_BORLAND_DOS_ (_DEV_BIT32_ | _DEV_BORLANDC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 85 + #define _DEV_KEIL_C51X_ (_DEV_BIT8_ | _DEV_KEIL8_ | _DEV_BIGEND_ | _DEV_COMMA_EXT_) // at least C51 version 7.05 supports comma extension 86 + #define _DEV_KEIL_C16X_ (_DEV_BIT16_ | _DEV_KEIL16_ | _DEV_COMMA_EXT_) // at least C166 version 5.03 supports comma extension 85 87 #define _DEV_TASKING_C51X_ (_DEV_BIT8_ | _DEV_TASKING8_ | _DEV_BIGEND_) 86 88 #define _DEV_TASKING_C16X_ (_DEV_BIT16_ | _DEV_TASKING16_ ) 87 - #define _DEV_FUJITSU_F590_ (_DEV_BIT8_ | _DEV_FUJITSU_ | _DEV_COMMA_EXT_) // softune is not able to support 64 bit variables QWORD !!! 89 + #define _DEV_FUJITSU_F590_ (_DEV_BIT8_ | _DEV_FUJITSU_ | _DEV_COMMA_EXT_) // softune is not able to support 64 bit variables QWORD !!! 88 90 //f.j.29.04.03 M16C kann effektiv mit Bytes umgehen 89 91 //#define _DEV_TASKING_M16C_ (_DEV_BIT16_ | _DEV_TASKINGM16C_ ) 90 92 #define _DEV_TASKING_M16C_ (_DEV_BIT8_ | _DEV_TASKINGM16C_ ) 91 93 #define _DEV_MITSUBISHI_M16C_ (_DEV_BIT8_ | _DEV_MITSUBISHIM16C_ ) 92 94 #define _DEV_GNU_MPC5X5_ (_DEV_BIT32_ | _DEV_GNUC_MPC5X5| _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 93 95 #define _DEV_LINUX_ (_DEV_BIT32_ | _DEV_LINUX_GCC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 94 - #define _DEV_GNU_C16X_ (_DEV_BIT16_ | _DEV_GNUC_C16X_ ) //| _DEV_COMMA_EXT_) 95 - #define _DEV_MCW_MPC5X5_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 96 + #define _DEV_GNU_C16X_ (_DEV_BIT16_ | _DEV_GNUC_C16X_ ) //| _DEV_COMMA_EXT_) 97 + #define _DEV_MCW_MPC5X5_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 96 98 #define _DEV_GNU_ARM7_ (_DEV_BIT32_ | _DEV_GNUC_ARM7_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) 97 - #define _DEV_WIN32_RTX_ (_DEV_BIT32_ | _DEV_MSVC_RTX_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 98 - #define _DEV_HIGHTEC_X86_ (_DEV_BIT32_ | _DEV_HIGHTEC_GNUC_X86_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 99 - #define _DEV_WIN_CE_ (_DEV_BIT32_ | _DEV_MSEVC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 99 + #define _DEV_WIN32_RTX_ (_DEV_BIT32_ | _DEV_MSVC_RTX_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 100 + #define _DEV_HIGHTEC_X86_ (_DEV_BIT32_ | _DEV_HIGHTEC_GNUC_X86_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 101 + #define _DEV_WIN_CE_ (_DEV_BIT32_ | _DEV_MSEVC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 100 102 #define _DEV_KEIL_CARM_ (_DEV_BIT32_ | _DEV_KEIL_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 101 103 #define _DEV_IAR_CARM_ (_DEV_BIT32_ | _DEV_IAR_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 102 104 #define _DEV_RVCT_CARM_ (_DEV_BIT32_ | _DEV_RVCT_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) 103 - #define _DEV_MCW_MCF5XXX_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 105 + #define _DEV_MCW_MCF5XXX_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 104 106 #define _DEV_GNU_CF5282_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_) 105 107 #define _DEV_PAR_BECK1X3_ (_DEV_BIT16_ | _DEV_PARADGM_X86) 106 108 #define _DEV_GNU_CF548X_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) 107 109 #define _DEV_GNU_I386_ (_DEV_BIT32_ | _DEV_GNUC_X86_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) 108 110 #define _DEV_GNU_TRICORE_ (_DEV_BIT32_ | _DEV_GNUC_TC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_ | _DEV_ALIGNMENT_4_) 109 - #define _DEV_MPLAB_DSPIC33F_ (_DEV_BIT16_ | _DEV_MPLAB_C30_ ) //| _DEV_COMMA_EXT_) 111 + #define _DEV_MPLAB_DSPIC33F_ (_DEV_BIT16_ | _DEV_MPLAB_C30_ ) //| _DEV_COMMA_EXT_) 110 112 #define _DEV_GNU_MIPSEL_ (_DEV_BIT32_ | _DEV_GNUC_MIPS2_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) 111 113 112 114 #define _DEV_RENESAS_M32C_ (_DEV_BIT32_ | _DEV_RENESASM32C) ··· 117 119 118 120 #define CHECK_IF_ONLY_INT_MAIN() (DEV_SYSTEM & _DEV_ONLY_INT_MAIN_) 119 121 #define CHECK_MEMORY_ALINMENT() (DEV_SYSTEM & _DEV_MASK_ALIGNMENT) 120 - 121 122 122 123 //--------------------------------------------------------------------------- 123 124 // defines for target system (TARGET_SYSTEM) ··· 131 134 #define _PXROS_ 2 132 135 #define _ECOSPRO_ 3 133 136 134 - 135 137 //--------------------------------------------------------------------------- 136 138 // definitions for function inlining 137 139 //--------------------------------------------------------------------------- 138 140 139 - #define INLINE_FUNCTION // empty define 140 - #undef INLINE_ENABLED // disable actual inlining of functions 141 - #undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default 141 + #define INLINE_FUNCTION // empty define 142 + #undef INLINE_ENABLED // disable actual inlining of functions 143 + #undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default 142 144 143 145 //--------------------------------------------------------------------------- 144 146 // definitions for Keil C51 ··· 145 149 146 150 #ifdef __C51__ 147 151 148 - #define TARGET_SYSTEM _NO_OS_ 149 - #define DEV_SYSTEM _DEV_KEIL_C51X_ 152 + #define TARGET_SYSTEM _NO_OS_ 153 + #define DEV_SYSTEM _DEV_KEIL_C51X_ 150 154 151 - #pragma DEBUG OBJECTEXTEND 152 - #pragma WARNINGLEVEL(2) // maximum warning level 155 + #pragma DEBUG OBJECTEXTEND 156 + #pragma WARNINGLEVEL(2) // maximum warning level 153 157 154 - #define NEAR idata // variables mapped to internal data storage location 155 - #define FAR xdata // variables mapped to external data storage location 156 - #define CONST const // variables mapped to ROM (i.e. flash) 157 - #define ROM code // code or variables mapped to ROM (i.e. flash) 158 - // usage: CONST BYTE ROM foo = 0x00; 159 - #define HWACC xdata // hardware access through external memory (i.e. CAN) 160 - #define LARGE large // functions set parameters to external data storage location 158 + #define NEAR idata // variables mapped to internal data storage location 159 + #define FAR xdata // variables mapped to external data storage location 160 + #define CONST const // variables mapped to ROM (i.e. flash) 161 + #define ROM code // code or variables mapped to ROM (i.e. flash) 162 + // usage: CONST BYTE ROM foo = 0x00; 163 + #define HWACC xdata // hardware access through external memory (i.e. CAN) 164 + #define LARGE large // functions set parameters to external data storage location 161 165 162 166 // These types can be adjusted by users to match application requirements. The goal is to 163 167 // minimize code memory and maximize speed. 164 - #define GENERIC // generic pointer to point to application data 165 - // Variables with this attribute can be located in external 166 - // or internal data memory. 167 - #define MEM xdata // Memory attribute to optimize speed and code of pointer access. 168 + #define GENERIC // generic pointer to point to application data 169 + // Variables with this attribute can be located in external 170 + // or internal data memory. 171 + #define MEM xdata // Memory attribute to optimize speed and code of pointer access. 168 172 169 - #define REENTRANT reentrant 170 - #define PUBLIC 173 + #define REENTRANT reentrant 174 + #define PUBLIC 171 175 172 - #ifndef NDEBUG 173 - #include <stdio.h> // prototype printf() (for TRACE) 174 - #define TRACE printf 175 - #endif 176 - 176 + #ifndef NDEBUG 177 + #include <stdio.h> // prototype printf() (for TRACE) 178 + #define TRACE printf 179 + #endif 177 180 178 181 //--------------------------------------------------------------------------- 179 182 // definitions for GNU Compiler for Infineon C16x ··· 180 185 //--------------------------------------------------------------------------- 181 186 #elif defined (__GNUC__) && defined (__C166__) 182 187 183 - #define TARGET_SYSTEM _NO_OS_ 184 - #define DEV_SYSTEM _DEV_GNU_C16X_ 188 + #define TARGET_SYSTEM _NO_OS_ 189 + #define DEV_SYSTEM _DEV_GNU_C16X_ 185 190 186 191 // #define NEAR idata // variables mapped to internal data storage location 187 - #define NEAR near // variables mapped to internal data storage location 192 + #define NEAR near // variables mapped to internal data storage location 188 193 // #define FAR xhuge // variables mapped to external data storage location 189 - #define FAR huge // variables mapped to external data storage location 190 - #define CONST const // variables mapped to ROM (i.e. flash) 191 - #define ROM // code or variables mapped to ROM (i.e. flash) 192 - // usage: CONST BYTE ROM foo = 0x00; 194 + #define FAR huge // variables mapped to external data storage location 195 + #define CONST const // variables mapped to ROM (i.e. flash) 196 + #define ROM // code or variables mapped to ROM (i.e. flash) 197 + // usage: CONST BYTE ROM foo = 0x00; 193 198 // #define HWACC sdata // hardware access through external memory (i.e. CAN) 194 - #define HWACC huge // hardware access through external memory (i.e. CAN) 195 - #define LARGE // functions set parameters to external data storage location 199 + #define HWACC huge // hardware access through external memory (i.e. CAN) 200 + #define LARGE // functions set parameters to external data storage location 196 201 197 202 // These types can be adjusted by users to match application requirements. The goal is to 198 203 // minimize code memory and maximize speed. 199 204 // #define GENERIC xhuge // generic pointer to point to application data 200 - #define GENERIC huge // generic pointer to point to application data 201 - // Variables with this attribute can be located in external 202 - // or internal data memory. 203 - #define MEM // Memory attribute to optimize speed and code of pointer access. 205 + #define GENERIC huge // generic pointer to point to application data 206 + // Variables with this attribute can be located in external 207 + // or internal data memory. 208 + #define MEM // Memory attribute to optimize speed and code of pointer access. 204 209 205 - #define REENTRANT 206 - #define PUBLIC 210 + #define REENTRANT 211 + #define PUBLIC 207 212 208 - #ifndef NDEBUG 209 - #include <stdio.h> // prototype printf() (for TRACE) 210 - #define TRACE printf 213 + #ifndef NDEBUG 214 + #include <stdio.h> // prototype printf() (for TRACE) 215 + #define TRACE printf 211 216 212 - #define ASSERT(p) \ 217 + #define ASSERT(p) \ 213 218 if (p) \ 214 219 { \ 215 220 ; \ ··· 219 224 PRINTF0("Assert failed: " #p " (file %s line %d)\n", __FILE__, (int) __LINE__ ); \ 220 225 while (1); \ 221 226 } 222 - #else 223 - #define ASSERT(p) 224 - #endif 227 + #else 228 + #define ASSERT(p) 229 + #endif 225 230 226 231 //--------------------------------------------------------------------------- 227 232 // definitions for Keil C166 228 233 //--------------------------------------------------------------------------- 229 - #elif defined (__C166__) // 24.01.2005 r.d.: Keil ARM7 needs directive 'defined' 234 + #elif defined (__C166__) // 24.01.2005 r.d.: Keil ARM7 needs directive 'defined' 230 235 231 - #define TARGET_SYSTEM _NO_OS_ 232 - #define DEV_SYSTEM _DEV_KEIL_C16X_ 236 + #define TARGET_SYSTEM _NO_OS_ 237 + #define DEV_SYSTEM _DEV_KEIL_C16X_ 233 238 234 - #pragma CODE 235 - #pragma MOD167 236 - #pragma NOINIT 237 - #pragma DEBUG 238 - #pragma WARNINGLEVEL(3) // maximum warning level 239 - #pragma WARNING DISABLE = 47 // warning <unreferenced parameter> = OFF 240 - #pragma WARNING DISABLE = 38 // warning <empty translation unit> = OFF 239 + #pragma CODE 240 + #pragma MOD167 241 + #pragma NOINIT 242 + #pragma DEBUG 243 + #pragma WARNINGLEVEL(3) // maximum warning level 244 + #pragma WARNING DISABLE = 47 // warning <unreferenced parameter> = OFF 245 + #pragma WARNING DISABLE = 38 // warning <empty translation unit> = OFF 241 246 // #pragma WARNING DISABLE = 102 // warning <different const/volatile qualifiers> = OFF 242 - #pragma WARNING DISABLE = 174 // warning <unreferenced 'static' function> = OFF 243 - #pragma WARNING DISABLE = 183 // warning <dead assignement eliminated> = OFF 247 + #pragma WARNING DISABLE = 174 // warning <unreferenced 'static' function> = OFF 248 + #pragma WARNING DISABLE = 183 // warning <dead assignement eliminated> = OFF 244 249 245 - #define NEAR idata // variables mapped to internal data storage location 246 - #define FAR xhuge // variables mapped to external data storage location 247 - #define CONST const // variables mapped to ROM (i.e. flash) 248 - #define ROM // code or variables mapped to ROM (i.e. flash) 249 - // usage: CONST BYTE ROM foo = 0x00; 250 + #define NEAR idata // variables mapped to internal data storage location 251 + #define FAR xhuge // variables mapped to external data storage location 252 + #define CONST const // variables mapped to ROM (i.e. flash) 253 + #define ROM // code or variables mapped to ROM (i.e. flash) 254 + // usage: CONST BYTE ROM foo = 0x00; 250 255 // #define HWACC sdata // hardware access through external memory (i.e. CAN) 251 - #define HWACC huge // hardware access through external memory (i.e. CAN) 252 - #define LARGE // functions set parameters to external data storage location 256 + #define HWACC huge // hardware access through external memory (i.e. CAN) 257 + #define LARGE // functions set parameters to external data storage location 253 258 254 259 // These types can be adjusted by users to match application requirements. The goal is to 255 260 // minimize code memory and maximize speed. 256 - #define GENERIC xhuge // generic pointer to point to application data 257 - // Variables with this attribute can be located in external 258 - // or internal data memory. 259 - #define MEM // Memory attribute to optimize speed and code of pointer access. 261 + #define GENERIC xhuge // generic pointer to point to application data 262 + // Variables with this attribute can be located in external 263 + // or internal data memory. 264 + #define MEM // Memory attribute to optimize speed and code of pointer access. 260 265 261 - #define REENTRANT 262 - #define PUBLIC 266 + #define REENTRANT 267 + #define PUBLIC 263 268 264 - #ifndef NDEBUG 265 - #include <stdio.h> // prototype printf() (for TRACE) 266 - #define TRACE printf 267 - #endif 269 + #ifndef NDEBUG 270 + #include <stdio.h> // prototype printf() (for TRACE) 271 + #define TRACE printf 272 + #endif 268 273 269 274 //--------------------------------------------------------------------------- 270 275 // definitions for MPLAB C30 for dsPIC33F series 271 276 //--------------------------------------------------------------------------- 272 277 #elif defined (__C30__) 273 278 274 - #define TARGET_SYSTEM _NO_OS_ 275 - #define DEV_SYSTEM _DEV_MPLAB_DSPIC33F_ 279 + #define TARGET_SYSTEM _NO_OS_ 280 + #define DEV_SYSTEM _DEV_MPLAB_DSPIC33F_ 276 281 277 - #define NEAR // variables mapped to internal data storage location 278 - #define FAR // variables mapped to external data storage location 279 - #define CONST const // variables mapped to ROM (i.e. flash) 280 - #define ROM // code or variables mapped to ROM (i.e. flash) 281 - // usage: CONST BYTE ROM foo = 0x00; 282 - #define HWACC // hardware access through external memory (i.e. CAN) 283 - #define LARGE // functions set parameters to external data storage location 282 + #define NEAR // variables mapped to internal data storage location 283 + #define FAR // variables mapped to external data storage location 284 + #define CONST const // variables mapped to ROM (i.e. flash) 285 + #define ROM // code or variables mapped to ROM (i.e. flash) 286 + // usage: CONST BYTE ROM foo = 0x00; 287 + #define HWACC // hardware access through external memory (i.e. CAN) 288 + #define LARGE // functions set parameters to external data storage location 284 289 285 290 // These types can be adjusted by users to match application requirements. The goal is to 286 291 // minimize code memory and maximize speed. 287 - #define GENERIC // generic pointer to point to application data 288 - // Variables with this attribute can be located in external 289 - // or internal data memory. 290 - #define MEM // Memory attribute to optimize speed and code of pointer access. 292 + #define GENERIC // generic pointer to point to application data 293 + // Variables with this attribute can be located in external 294 + // or internal data memory. 295 + #define MEM // Memory attribute to optimize speed and code of pointer access. 291 296 292 - #define REENTRANT 293 - #define PUBLIC 297 + #define REENTRANT 298 + #define PUBLIC 294 299 295 300 // #ifndef QWORD 296 301 // #define QWORD long long 297 302 // #endif 298 303 299 - #ifndef NDEBUG 300 - #include <stdio.h> // prototype printf() (for TRACE) 301 - #define TRACE printf 302 - #endif 304 + #ifndef NDEBUG 305 + #include <stdio.h> // prototype printf() (for TRACE) 306 + #define TRACE printf 307 + #endif 303 308 304 309 //--------------------------------------------------------------------------- 305 310 // definitions for Keil ARM 306 311 //--------------------------------------------------------------------------- 307 312 #elif defined (__CA__) 308 313 309 - #define TARGET_SYSTEM _NO_OS_ 310 - #define DEV_SYSTEM _DEV_KEIL_CARM_ 314 + #define TARGET_SYSTEM _NO_OS_ 315 + #define DEV_SYSTEM _DEV_KEIL_CARM_ 311 316 312 - #define NEAR // variables mapped to internal data storage location 313 - #define FAR // variables mapped to external data storage location 314 - #define CONST const // variables mapped to ROM (i.e. flash) 315 - #define ROM // code or variables mapped to ROM (i.e. flash) 316 - // usage: CONST BYTE ROM foo = 0x00; 317 - #define HWACC // hardware access through external memory (i.e. CAN) 318 - #define LARGE // functions set parameters to external data storage location 317 + #define NEAR // variables mapped to internal data storage location 318 + #define FAR // variables mapped to external data storage location 319 + #define CONST const // variables mapped to ROM (i.e. flash) 320 + #define ROM // code or variables mapped to ROM (i.e. flash) 321 + // usage: CONST BYTE ROM foo = 0x00; 322 + #define HWACC // hardware access through external memory (i.e. CAN) 323 + #define LARGE // functions set parameters to external data storage location 319 324 320 325 // These types can be adjusted by users to match application requirements. The goal is to 321 326 // minimize code memory and maximize speed. 322 - #define GENERIC // generic pointer to point to application data 323 - // Variables with this attribute can be located in external 324 - // or internal data memory. 325 - #define MEM // Memory attribute to optimize speed and code of pointer access. 327 + #define GENERIC // generic pointer to point to application data 328 + // Variables with this attribute can be located in external 329 + // or internal data memory. 330 + #define MEM // Memory attribute to optimize speed and code of pointer access. 326 331 327 - #define REENTRANT 328 - #define PUBLIC 332 + #define REENTRANT 333 + #define PUBLIC 329 334 330 - #ifndef QWORD 331 - #define QWORD long long 332 - #endif 335 + #ifndef QWORD 336 + #define QWORD long long 337 + #endif 333 338 334 - #ifndef NDEBUG 335 - #include <stdio.h> // prototype printf() (for TRACE) 336 - #define TRACE printf 337 - #endif 339 + #ifndef NDEBUG 340 + #include <stdio.h> // prototype printf() (for TRACE) 341 + #define TRACE printf 342 + #endif 338 343 339 344 //--------------------------------------------------------------------------- 340 345 // definitions for RealView ARM compilation tools (provided by recent Keil Microcontroller Development Kits) 341 346 //--------------------------------------------------------------------------- 342 347 #elif defined (__ARMCC_VERSION) 343 348 344 - #define TARGET_SYSTEM _NO_OS_ 345 - #define DEV_SYSTEM _DEV_RVCT_CARM_ 349 + #define TARGET_SYSTEM _NO_OS_ 350 + #define DEV_SYSTEM _DEV_RVCT_CARM_ 346 351 347 - #define NEAR // variables mapped to internal data storage location 348 - #define FAR // variables mapped to external data storage location 349 - #define CONST const // variables mapped to ROM (i.e. flash) 350 - #define ROM // code or variables mapped to ROM (i.e. flash) 351 - // usage: CONST BYTE ROM foo = 0x00; 352 - #define HWACC // hardware access through external memory (i.e. CAN) 353 - #define LARGE // functions set parameters to external data storage location 352 + #define NEAR // variables mapped to internal data storage location 353 + #define FAR // variables mapped to external data storage location 354 + #define CONST const // variables mapped to ROM (i.e. flash) 355 + #define ROM // code or variables mapped to ROM (i.e. flash) 356 + // usage: CONST BYTE ROM foo = 0x00; 357 + #define HWACC // hardware access through external memory (i.e. CAN) 358 + #define LARGE // functions set parameters to external data storage location 354 359 355 360 // These types can be adjusted by users to match application requirements. The goal is to 356 361 // minimize code memory and maximize speed. 357 - #define GENERIC // generic pointer to point to application data 358 - // Variables with this attribute can be located in external 359 - // or internal data memory. 360 - #define MEM // Memory attribute to optimize speed and code of pointer access. 362 + #define GENERIC // generic pointer to point to application data 363 + // Variables with this attribute can be located in external 364 + // or internal data memory. 365 + #define MEM // Memory attribute to optimize speed and code of pointer access. 361 366 362 - #define REENTRANT 363 - #define PUBLIC 367 + #define REENTRANT 368 + #define PUBLIC 364 369 365 - #ifndef QWORD 366 - #define QWORD long long 367 - #endif 370 + #ifndef QWORD 371 + #define QWORD long long 372 + #endif 368 373 369 - #ifndef NDEBUG 370 - #define ASSERT(expr) if (!(expr)) {\ 374 + #ifndef NDEBUG 375 + #define ASSERT(expr) if (!(expr)) {\ 371 376 TRACE0 ("Assertion failed: " #expr );\ 372 377 while (1);} 373 - #else 374 - #define ASSERT(expr) 375 - #endif 378 + #else 379 + #define ASSERT(expr) 380 + #endif 376 381 377 - #ifndef NDEBUG 378 - #include <stdio.h> // prototype printf() (for TRACE) 379 - #define TRACE printf 380 - #endif 382 + #ifndef NDEBUG 383 + #include <stdio.h> // prototype printf() (for TRACE) 384 + #define TRACE printf 385 + #endif 381 386 382 387 //--------------------------------------------------------------------------- 383 388 // definitions for ARM IAR C Compiler 384 389 //--------------------------------------------------------------------------- 385 390 #elif defined (__ICCARM__) 386 391 387 - #define TARGET_SYSTEM _NO_OS_ 388 - #define DEV_SYSTEM _DEV_IAR_CARM_ 392 + #define TARGET_SYSTEM _NO_OS_ 393 + #define DEV_SYSTEM _DEV_IAR_CARM_ 389 394 390 - #define NEAR // variables mapped to internal data storage location 391 - #define FAR // variables mapped to external data storage location 392 - #define CONST const // variables mapped to ROM (i.e. flash) 393 - #define ROM // code or variables mapped to ROM (i.e. flash) 394 - // usage: CONST BYTE ROM foo = 0x00; 395 - #define HWACC // hardware access through external memory (i.e. CAN) 396 - #define LARGE // functions set parameters to external data storage location 395 + #define NEAR // variables mapped to internal data storage location 396 + #define FAR // variables mapped to external data storage location 397 + #define CONST const // variables mapped to ROM (i.e. flash) 398 + #define ROM // code or variables mapped to ROM (i.e. flash) 399 + // usage: CONST BYTE ROM foo = 0x00; 400 + #define HWACC // hardware access through external memory (i.e. CAN) 401 + #define LARGE // functions set parameters to external data storage location 397 402 398 403 // These types can be adjusted by users to match application requirements. The goal is to 399 404 // minimize code memory and maximize speed. 400 - #define GENERIC // generic pointer to point to application data 401 - // Variables with this attribute can be located in external 402 - // or internal data memory. 403 - #define MEM // Memory attribute to optimize speed and code of pointer access. 405 + #define GENERIC // generic pointer to point to application data 406 + // Variables with this attribute can be located in external 407 + // or internal data memory. 408 + #define MEM // Memory attribute to optimize speed and code of pointer access. 404 409 405 - #define REENTRANT 406 - #define PUBLIC 410 + #define REENTRANT 411 + #define PUBLIC 407 412 408 - #ifndef QWORD 409 - #define QWORD long long 410 - #endif 413 + #ifndef QWORD 414 + #define QWORD long long 415 + #endif 411 416 412 417 // Workaround: 413 418 // If we use IAR and want to debug but don't want to use C-Spy Debugger 414 419 // assert() doesn't work in debug mode because it needs support for FILE descriptors 415 420 // (_DLIB_FILE_DESCRIPTOR == 1). 416 - #ifndef NDEBUG 417 - #define ASSERT(expr) if (!(expr)) {\ 421 + #ifndef NDEBUG 422 + #define ASSERT(expr) if (!(expr)) {\ 418 423 TRACE0 ("Assertion failed: " #expr );\ 419 424 while (1);} 420 - #else 421 - #define ASSERT(expr) 422 - #endif 425 + #else 426 + #define ASSERT(expr) 427 + #endif 423 428 424 - #ifndef NDEBUG 425 - #include <stdio.h> // prototype printf() (for TRACE) 426 - #define TRACE printf 429 + #ifndef NDEBUG 430 + #include <stdio.h> // prototype printf() (for TRACE) 431 + #define TRACE printf 427 432 // #define TRACE PRINTF4 428 - #endif 433 + #endif 429 434 430 435 //--------------------------------------------------------------------------- 431 436 // definitions for Tasking 8051 ··· 433 438 434 439 #elif defined (_CC51) 435 440 436 - #include <cc51.h> 441 + #include <cc51.h> 437 442 438 - #define TARGET_SYSTEM _NO_OS_ 439 - #define DEV_SYSTEM _DEV_TASKING_C51X_ 443 + #define TARGET_SYSTEM _NO_OS_ 444 + #define DEV_SYSTEM _DEV_TASKING_C51X_ 440 445 441 - #define NEAR _data // variables mapped to internal data storage location 442 - #define FAR _xdat // variables mapped to external data storage location 443 - #define CONST const // variables mapped to ROM (i.e. flash) 444 - #define ROM // code or variables mapped to ROM (i.e. flash) 445 - // usage: CONST BYTE ROM foo = 0x00; 446 - #define HWACC _xdat // hardware access through external memory (i.e. CAN) 447 - #define LARGE // functions set parameters to external data storage location 446 + #define NEAR _data // variables mapped to internal data storage location 447 + #define FAR _xdat // variables mapped to external data storage location 448 + #define CONST const // variables mapped to ROM (i.e. flash) 449 + #define ROM // code or variables mapped to ROM (i.e. flash) 450 + // usage: CONST BYTE ROM foo = 0x00; 451 + #define HWACC _xdat // hardware access through external memory (i.e. CAN) 452 + #define LARGE // functions set parameters to external data storage location 448 453 449 454 // These types can be adjusted by users to match application requirements. The goal is to 450 455 // minimize code memory and maximize speed. 451 - #define GENERIC // generic pointer to point to application data 452 - // Variables with this attribute can be located in external 453 - // or internal data memory. 454 - #define MEM _xdat // Memory attribute to optimize speed and code of pointer access. 456 + #define GENERIC // generic pointer to point to application data 457 + // Variables with this attribute can be located in external 458 + // or internal data memory. 459 + #define MEM _xdat // Memory attribute to optimize speed and code of pointer access. 455 460 456 - #define REENTRANT _reentrant 457 - #define PUBLIC 461 + #define REENTRANT _reentrant 462 + #define PUBLIC 458 463 459 - #ifndef NDEBUG 460 - #include <stdio.h> // prototype printf() (for TRACE) 461 - #define TRACE printf 462 - #endif 463 - 464 + #ifndef NDEBUG 465 + #include <stdio.h> // prototype printf() (for TRACE) 466 + #define TRACE printf 467 + #endif 464 468 465 469 //--------------------------------------------------------------------------- 466 470 // definitions for Tasking C167CR and C164CI ··· 467 473 468 474 #elif defined (_C166) 469 475 470 - #define TARGET_SYSTEM _NO_OS_ 471 - #define DEV_SYSTEM _DEV_TASKING_C16X_ 476 + #define TARGET_SYSTEM _NO_OS_ 477 + #define DEV_SYSTEM _DEV_TASKING_C16X_ 472 478 473 - #define NEAR near // variables mapped to internal data storage location 474 - #define FAR far // variables mapped to external data storage location 475 - #define CONST const // variables mapped to ROM (i.e. flash) 476 - #define ROM // code or variables mapped to ROM (i.e. flash) 477 - // usage: CONST BYTE ROM foo = 0x00; 478 - #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) 479 - #define LARGE // functions set parameters to external data storage location 479 + #define NEAR near // variables mapped to internal data storage location 480 + #define FAR far // variables mapped to external data storage location 481 + #define CONST const // variables mapped to ROM (i.e. flash) 482 + #define ROM // code or variables mapped to ROM (i.e. flash) 483 + // usage: CONST BYTE ROM foo = 0x00; 484 + #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) 485 + #define LARGE // functions set parameters to external data storage location 480 486 481 487 // These types can be adjusted by users to match application requirements. The goal is to 482 488 // minimize code memory and maximize speed. 483 - #define GENERIC // generic pointer to point to application data 484 - // Variables with this attribute can be located in external 485 - // or internal data memory. 486 - #define MEM // Memory attribute to optimize speed and code of pointer access. 489 + #define GENERIC // generic pointer to point to application data 490 + // Variables with this attribute can be located in external 491 + // or internal data memory. 492 + #define MEM // Memory attribute to optimize speed and code of pointer access. 487 493 488 - #define REENTRANT 489 - #define PUBLIC 494 + #define REENTRANT 495 + #define PUBLIC 490 496 491 497 // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL 492 498 // without checking if it is already included. So an error occurs while compiling. 493 499 // (r.d.) 494 - #include <stdio.h> // prototype printf() (for TRACE) 495 - #ifndef NDEBUG 496 - #define TRACE printf 497 - #endif 498 - 500 + #include <stdio.h> // prototype printf() (for TRACE) 501 + #ifndef NDEBUG 502 + #define TRACE printf 503 + #endif 499 504 500 505 //--------------------------------------------------------------------------- 501 506 // definitions for FUJITSU FFMC-16LX MB90590 ··· 503 510 //#elif (defined (F590) || defined (F543) || defined (F598) || defined (F495) || defined (F350)) 504 511 #elif defined(__COMPILER_FCC907__) 505 512 506 - #define TARGET_SYSTEM _NO_OS_ 507 - #define DEV_SYSTEM _DEV_FUJITSU_F590_ 513 + #define TARGET_SYSTEM _NO_OS_ 514 + #define DEV_SYSTEM _DEV_FUJITSU_F590_ 508 515 509 - #define NEAR /* to be defined */ // variables mapped to internal data storage location 510 - #define FAR /* to be defined */ // variables mapped to external data storage location 511 - #define CONST const // variables mapped to ROM (i.e. flash) 512 - #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) 513 - // usage: CONST BYTE ROM foo = 0x00; 514 - #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) 515 - #define LARGE // functions set parameters to external data storage location 516 + #define NEAR /* to be defined */ // variables mapped to internal data storage location 517 + #define FAR /* to be defined */ // variables mapped to external data storage location 518 + #define CONST const // variables mapped to ROM (i.e. flash) 519 + #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) 520 + // usage: CONST BYTE ROM foo = 0x00; 521 + #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) 522 + #define LARGE // functions set parameters to external data storage location 516 523 517 524 // These types can be adjusted by users to match application requirements. The goal is to 518 525 // minimize code memory and maximize speed. 519 - #define GENERIC // generic pointer to point to application data 520 - // Variables with this attribute can be located in external 521 - // or internal data memory. 522 - #define MEM // Memory attribute to optimize speed and code of pointer access. 526 + #define GENERIC // generic pointer to point to application data 527 + // Variables with this attribute can be located in external 528 + // or internal data memory. 529 + #define MEM // Memory attribute to optimize speed and code of pointer access. 523 530 524 531 // softune is not able to support 64 bit variables QWORD !!! 525 532 526 - #define REENTRANT 527 - #define PUBLIC 533 + #define REENTRANT 534 + #define PUBLIC 528 535 529 - #ifndef NDEBUG 530 - #include <stdio.h> // prototype printf() (for TRACE) 531 - #define TRACE printf 532 - #endif 533 - 536 + #ifndef NDEBUG 537 + #include <stdio.h> // prototype printf() (for TRACE) 538 + #define TRACE printf 539 + #endif 534 540 535 541 //--------------------------------------------------------------------------- 536 542 // definitions for Mitsubishi M16C family for TASKING Compiler CM16 ··· 537 545 538 546 #elif defined (_CM16C) 539 547 540 - #define TARGET_SYSTEM _NO_OS_ 541 - #define DEV_SYSTEM _DEV_TASKING_M16C_ 548 + #define TARGET_SYSTEM _NO_OS_ 549 + #define DEV_SYSTEM _DEV_TASKING_M16C_ 542 550 543 - #define NEAR _near // variables mapped to internal data storage location 544 - #define FAR _far // variables mapped to external data storage location 545 - #define CONST _farrom // variables mapped to ROM (i.e. flash) 546 - #define ROM // code or variables mapped to ROM (i.e. flash) 547 - // usage: CONST BYTE ROM foo = 0x00; 548 - #define HWACC _near // hardware access through external memory (i.e. CAN) 549 - #define LARGE // functions set parameters to external data storage location 551 + #define NEAR _near // variables mapped to internal data storage location 552 + #define FAR _far // variables mapped to external data storage location 553 + #define CONST _farrom // variables mapped to ROM (i.e. flash) 554 + #define ROM // code or variables mapped to ROM (i.e. flash) 555 + // usage: CONST BYTE ROM foo = 0x00; 556 + #define HWACC _near // hardware access through external memory (i.e. CAN) 557 + #define LARGE // functions set parameters to external data storage location 550 558 551 559 // These types can be adjusted by users to match application requirements. The goal is to 552 560 // minimize code memory and maximize speed. 553 - #define GENERIC _far // generic pointer to point to application data 554 - // Variables with this attribute can be located in external 555 - // or internal data memory. 556 - // do you use memory model SMALL, than you have to set _far 557 - #define MEM // Memory attribute to optimize speed and code of pointer access. 561 + #define GENERIC _far // generic pointer to point to application data 562 + // Variables with this attribute can be located in external 563 + // or internal data memory. 564 + // do you use memory model SMALL, than you have to set _far 565 + #define MEM // Memory attribute to optimize speed and code of pointer access. 558 566 559 - #define REENTRANT 560 - #define PUBLIC 567 + #define REENTRANT 568 + #define PUBLIC 561 569 562 570 // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL 563 571 // without checking if it is already included. So an error occurs while compiling. 564 572 // (r.d.) 565 - #include <stdio.h> // prototype printf() (for TRACE) 566 - #ifndef NDEBUG 567 - #define TRACE printf 568 - #endif 569 - 573 + #include <stdio.h> // prototype printf() (for TRACE) 574 + #ifndef NDEBUG 575 + #define TRACE printf 576 + #endif 570 577 571 578 //--------------------------------------------------------------------------- 572 579 // definitions for Mitsubishi M16C family for Mitsubishi Compiler NC30 ··· 573 582 // name NC30, andere Form will der Compiler nicht !! 574 583 #elif defined (NC30) 575 584 576 - #define TARGET_SYSTEM _NO_OS_ 577 - #define DEV_SYSTEM _DEV_MITSUBISHI_M16C_ 585 + #define TARGET_SYSTEM _NO_OS_ 586 + #define DEV_SYSTEM _DEV_MITSUBISHI_M16C_ 578 587 579 - #define NEAR near // variables mapped to internal data storage location 580 - #define FAR far // variables mapped to external data storage location 581 - #define CONST const // variables mapped to ROM (i.e. flash) 582 - #define ROM // code or variables mapped to ROM (i.e. flash) 583 - // usage: CONST BYTE ROM foo = 0x00; 584 - #define HWACC near // hardware access through external memory (i.e. CAN) 585 - #define LARGE // functions set parameters to external data storage location 588 + #define NEAR near // variables mapped to internal data storage location 589 + #define FAR far // variables mapped to external data storage location 590 + #define CONST const // variables mapped to ROM (i.e. flash) 591 + #define ROM // code or variables mapped to ROM (i.e. flash) 592 + // usage: CONST BYTE ROM foo = 0x00; 593 + #define HWACC near // hardware access through external memory (i.e. CAN) 594 + #define LARGE // functions set parameters to external data storage location 586 595 587 596 // These types can be adjusted by users to match application requirements. The goal is to 588 597 // minimize code memory and maximize speed. 589 - #define GENERIC far // generic pointer to point to application data 590 - // Variables with this attribute can be located in external 591 - // or internal data memory. 592 - #define MEM // Memory attribute to optimize speed and code of pointer access. 598 + #define GENERIC far // generic pointer to point to application data 599 + // Variables with this attribute can be located in external 600 + // or internal data memory. 601 + #define MEM // Memory attribute to optimize speed and code of pointer access. 593 602 594 - #define REENTRANT 595 - #define PUBLIC 603 + #define REENTRANT 604 + #define PUBLIC 596 605 597 - #ifndef NDEBUG 598 - #include <stdio.h> // prototype printf() (for TRACE) 599 - #define TRACE printf 600 - #endif 606 + #ifndef NDEBUG 607 + #include <stdio.h> // prototype printf() (for TRACE) 608 + #define TRACE printf 609 + #endif 601 610 602 611 //--------------------------------------------------------------------------- 603 612 // definitions for Renesas M32C family for Renesas Compiler 604 613 //--------------------------------------------------------------------------- 605 614 #elif defined (NC308) 606 615 607 - #define TARGET_SYSTEM _NO_OS_ 608 - #define DEV_SYSTEM _DEV_RENESAS_M32C_ 616 + #define TARGET_SYSTEM _NO_OS_ 617 + #define DEV_SYSTEM _DEV_RENESAS_M32C_ 609 618 610 - #define NEAR near // variables mapped to internal data storage location 611 - #define FAR far // variables mapped to external data storage location 612 - #define CONST const // variables mapped to ROM (i.e. flash) 613 - #define ROM // code or variables mapped to ROM (i.e. flash) 614 - #define HWACC // hardware access through external memory (i.e. CAN) 615 - #define LARGE // functions set parameters to external data storage location 619 + #define NEAR near // variables mapped to internal data storage location 620 + #define FAR far // variables mapped to external data storage location 621 + #define CONST const // variables mapped to ROM (i.e. flash) 622 + #define ROM // code or variables mapped to ROM (i.e. flash) 623 + #define HWACC // hardware access through external memory (i.e. CAN) 624 + #define LARGE // functions set parameters to external data storage location 616 625 617 626 // These types can be adjusted by users to match application requirements. The goal is to 618 627 // minimize code memory and maximize speed. 619 - #define GENERIC // generic pointer to point to application data 620 - // Variables with this attribute can be located in external 621 - // or internal data memory. 622 - #define MEM far // Memory attribute to optimize speed and code of pointer access. 628 + #define GENERIC // generic pointer to point to application data 629 + // Variables with this attribute can be located in external 630 + // or internal data memory. 631 + #define MEM far // Memory attribute to optimize speed and code of pointer access. 623 632 624 - #define REENTRANT 625 - #define PUBLIC 633 + #define REENTRANT 634 + #define PUBLIC 626 635 627 - #ifndef NDEBUG 628 - #include <stdio.h> // prototype printf() (for TRACE) 629 - #define TRACE printf 630 - #endif 636 + #ifndef NDEBUG 637 + #include <stdio.h> // prototype printf() (for TRACE) 638 + #define TRACE printf 639 + #endif 631 640 632 641 // #error ("RENESAS o.k.") 633 642 ··· 637 646 638 647 #elif defined(__GNUC__) && defined(__arm__) && !defined(__LINUX_ARM_ARCH__) 639 648 640 - #define TARGET_SYSTEM _NO_OS_ 641 - #define DEV_SYSTEM _DEV_GNU_ARM7_ 649 + #define TARGET_SYSTEM _NO_OS_ 650 + #define DEV_SYSTEM _DEV_GNU_ARM7_ 642 651 643 - #define NEAR // variables mapped to internal data storage location 644 - #define FAR // variables mapped to external data storage location 645 - #define CONST const // variables mapped to ROM (i.e. flash) 646 - #define ROM // code or variables mapped to ROM (i.e. flash) 647 - // usage: CONST BYTE ROM foo = 0x00; 648 - #define HWACC // hardware access through external memory (i.e. CAN) 649 - #define LARGE // functions set parameters to external data storage location 652 + #define NEAR // variables mapped to internal data storage location 653 + #define FAR // variables mapped to external data storage location 654 + #define CONST const // variables mapped to ROM (i.e. flash) 655 + #define ROM // code or variables mapped to ROM (i.e. flash) 656 + // usage: CONST BYTE ROM foo = 0x00; 657 + #define HWACC // hardware access through external memory (i.e. CAN) 658 + #define LARGE // functions set parameters to external data storage location 650 659 651 660 // These types can be adjusted by users to match application requirements. The goal is to 652 661 // minimize code memory and maximize speed. 653 - #define GENERIC // generic pointer to point to application data 654 - // Variables with this attribute can be located in external 655 - // or internal data memory. 656 - #define MEM // Memory attribute to optimize speed and code of pointer access. 657 - #define HWACC // hardware access through external memory (i.e. CAN) 662 + #define GENERIC // generic pointer to point to application data 663 + // Variables with this attribute can be located in external 664 + // or internal data memory. 665 + #define MEM // Memory attribute to optimize speed and code of pointer access. 666 + #define HWACC // hardware access through external memory (i.e. CAN) 658 667 659 - #define REENTRANT 660 - #define PUBLIC 668 + #define REENTRANT 669 + #define PUBLIC 661 670 662 - #ifndef QWORD 663 - #define QWORD long long // i.A. durch Herr Kuschel 664 - #endif 671 + #ifndef QWORD 672 + #define QWORD long long // i.A. durch Herr Kuschel 673 + #endif 665 674 666 - #ifndef NDEBUG 667 - #include <stdio.h> // prototype printf() (for TRACE) 668 - #define TRACE printf 669 - #endif 670 - 675 + #ifndef NDEBUG 676 + #include <stdio.h> // prototype printf() (for TRACE) 677 + #define TRACE printf 678 + #endif 671 679 672 680 //--------------------------------------------------------------------------- 673 681 // definitions for Motorola PowerPC family 5x5 (555/565) ··· 675 685 676 686 #elif defined (__GNUC__) 677 687 678 - #if defined (LINUX) || defined (linux) || defined (__linux__) 679 - #define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems 680 - // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: 681 - // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). 682 - // But Linux for PC does not need the definitions for embedded Linux. 683 - #endif 688 + #if defined (LINUX) || defined (linux) || defined (__linux__) 689 + #define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems 690 + // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: 691 + // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). 692 + // But Linux for PC does not need the definitions for embedded Linux. 693 + #endif 684 694 685 695 // GNU C compiler supports function inlining 686 - #define INLINE_FUNCTION_DEF extern inline 696 + #define INLINE_FUNCTION_DEF extern inline 687 697 688 698 // to actually enable inlining just include the following three lines 689 699 // #undef INLINE_FUNCTION 690 700 // #define INLINE_FUNCTION INLINE_FUNCTION_DEF 691 701 // #define INLINE_ENABLED TRUE 692 702 693 - #ifdef PXROS 694 - #define TARGET_SYSTEM _PXROS_ 695 - #ifdef __i386__ 696 - #undef LINUX // this define seems to be set from compiler 697 - #define DEV_SYSTEM _DEV_HIGHTEC_X86_ 698 - #elif defined (__tricore__) 699 - #define DEV_SYSTEM _DEV_GNU_TRICORE_ 700 - #else // MPC5x5 701 - #define DEV_SYSTEM _DEV_GNU_MPC5X5_ 702 - #endif 703 + #ifdef PXROS 704 + #define TARGET_SYSTEM _PXROS_ 705 + #ifdef __i386__ 706 + #undef LINUX // this define seems to be set from compiler 707 + #define DEV_SYSTEM _DEV_HIGHTEC_X86_ 708 + #elif defined (__tricore__) 709 + #define DEV_SYSTEM _DEV_GNU_TRICORE_ 710 + #else // MPC5x5 711 + #define DEV_SYSTEM _DEV_GNU_MPC5X5_ 712 + #endif 703 713 704 - #elif defined (LINUX) || defined (__linux__) 705 - #define TARGET_SYSTEM _LINUX_ // Linux definition 706 - #define DEV_SYSTEM _DEV_LINUX_ 714 + #elif defined (LINUX) || defined (__linux__) 715 + #define TARGET_SYSTEM _LINUX_ // Linux definition 716 + #define DEV_SYSTEM _DEV_LINUX_ 707 717 708 - #elif defined (GNU_CF5282) 709 - #define TARGET_SYSTEM _NO_OS_ 710 - #define DEV_SYSTEM _DEV_GNU_CF5282_ 718 + #elif defined (GNU_CF5282) 719 + #define TARGET_SYSTEM _NO_OS_ 720 + #define DEV_SYSTEM _DEV_GNU_CF5282_ 711 721 712 - #elif defined (ECOSPRO_I386_PEAK_PCI) 713 - #define TARGET_SYSTEM _ECOSPRO_ 714 - #define DEV_SYSTEM _DEV_GNU_I386_ 722 + #elif defined (ECOSPRO_I386_PEAK_PCI) 723 + #define TARGET_SYSTEM _ECOSPRO_ 724 + #define DEV_SYSTEM _DEV_GNU_I386_ 715 725 716 - #elif defined (GNU_CF548X) 717 - #define TARGET_SYSTEM _NO_OS_ 718 - #define DEV_SYSTEM _DEV_GNU_CF548X_ 719 - #else 720 - #error 'ERROR: DEV_SYSTEM not found!' 721 - #endif 726 + #elif defined (GNU_CF548X) 727 + #define TARGET_SYSTEM _NO_OS_ 728 + #define DEV_SYSTEM _DEV_GNU_CF548X_ 729 + #else 730 + #error 'ERROR: DEV_SYSTEM not found!' 731 + #endif 722 732 733 + #ifndef QWORD 734 + #define QWORD long long int 735 + #endif 723 736 724 - #ifndef QWORD 725 - #define QWORD long long int 726 - #endif 737 + #if (TARGET_SYSTEM == _PXROS_) 727 738 728 - #if (TARGET_SYSTEM == _PXROS_) 739 + #ifndef __KERNEL__ 740 + #include <string.h> 741 + #endif 729 742 730 - #ifndef __KERNEL__ 731 - #include <string.h> 732 - #endif 743 + #define NEAR // variables mapped to internal data storage location 744 + #define FAR // variables mapped to external data storage location 745 + #define CONST const // variables mapped to ROM (i.e. flash) 746 + #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) 747 + // usage: CONST BYTE ROM foo = 0x00; 748 + #define LARGE // functions set parameters to external data storage location 733 749 750 + // These types can be adjusted by users to match application requirements. The goal is to 751 + // minimize code memory and maximize speed. 752 + #define GENERIC // generic pointer to point to application data 753 + // Variables with this attribute can be located in external 754 + // or internal data memory. 755 + #define MEM // Memory attribute to optimize speed and code of pointer access. 734 756 735 - #define NEAR // variables mapped to internal data storage location 736 - #define FAR // variables mapped to external data storage location 737 - #define CONST const // variables mapped to ROM (i.e. flash) 738 - #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) 739 - // usage: CONST BYTE ROM foo = 0x00; 740 - #define LARGE // functions set parameters to external data storage location 757 + #define HWACC // hardware access through external memory (i.e. CAN) 741 758 742 - // These types can be adjusted by users to match application requirements. The goal is to 743 - // minimize code memory and maximize speed. 744 - #define GENERIC // generic pointer to point to application data 745 - // Variables with this attribute can be located in external 746 - // or internal data memory. 747 - #define MEM // Memory attribute to optimize speed and code of pointer access. 759 + #define REENTRANT 760 + #define PUBLIC 748 761 749 - #define HWACC // hardware access through external memory (i.e. CAN) 762 + #ifndef QWORD 763 + #define QWORD long long int 764 + #endif 750 765 751 - #define REENTRANT 752 - #define PUBLIC 766 + #ifndef NDEBUG 767 + #include <stdio.h> // prototype printf() (for TRACE) 768 + #define TRACE printf 769 + #endif 753 770 754 - #ifndef QWORD 755 - #define QWORD long long int 756 - #endif 757 - 758 - #ifndef NDEBUG 759 - #include <stdio.h> // prototype printf() (for TRACE) 760 - #define TRACE printf 761 - #endif 762 - 763 - #endif 771 + #endif 764 772 765 773 // ------------------ GNUC for I386 --------------------------------------------- 766 774 767 - #if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_) 775 + #if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_) 768 776 769 - #ifndef __KERNEL__ 770 - #include <string.h> 771 - #endif 777 + #ifndef __KERNEL__ 778 + #include <string.h> 779 + #endif 772 780 773 - #define ROM // code or variables mapped to ROM (i.e. flash) 774 - // usage: CONST BYTE ROM foo = 0x00; 775 - #define HWACC // hardware access through external memory (i.e. CAN) 781 + #define ROM // code or variables mapped to ROM (i.e. flash) 782 + // usage: CONST BYTE ROM foo = 0x00; 783 + #define HWACC // hardware access through external memory (i.e. CAN) 776 784 777 - // These types can be adjusted by users to match application requirements. The goal is to 778 - // minimize code memory and maximize speed. 779 - #define GENERIC // generic pointer to point to application data 780 - // Variables with this attribute can be located in external 781 - // or internal data memory. 782 - #define MEM // Memory attribute to optimize speed and code of pointer access. 785 + // These types can be adjusted by users to match application requirements. The goal is to 786 + // minimize code memory and maximize speed. 787 + #define GENERIC // generic pointer to point to application data 788 + // Variables with this attribute can be located in external 789 + // or internal data memory. 790 + #define MEM // Memory attribute to optimize speed and code of pointer access. 783 791 784 - #ifndef NEAR 785 - #define NEAR // variables mapped to internal data storage location 786 - #endif 792 + #ifndef NEAR 793 + #define NEAR // variables mapped to internal data storage location 794 + #endif 787 795 788 - #ifndef FAR 789 - #define FAR // variables mapped to external data storage location 790 - #endif 796 + #ifndef FAR 797 + #define FAR // variables mapped to external data storage location 798 + #endif 791 799 792 - #ifndef CONST 793 - #define CONST const // variables mapped to ROM (i.e. flash) 794 - #endif 800 + #ifndef CONST 801 + #define CONST const // variables mapped to ROM (i.e. flash) 802 + #endif 795 803 796 - #define LARGE 804 + #define LARGE 797 805 798 - #define REENTRANT 799 - #define PUBLIC 806 + #define REENTRANT 807 + #define PUBLIC 800 808 801 - #ifndef NDEBUG 802 - #ifndef __KERNEL__ 803 - #include <stdio.h> // prototype printf() (for TRACE) 804 - #define TRACE printf 805 - #else 806 - #define TRACE printk 807 - #endif 808 - #endif 809 - #endif 809 + #ifndef NDEBUG 810 + #ifndef __KERNEL__ 811 + #include <stdio.h> // prototype printf() (for TRACE) 812 + #define TRACE printf 813 + #else 814 + #define TRACE printk 815 + #endif 816 + #endif 817 + #endif 810 818 811 819 // ------------------ GNU without OS --------------------------------------------- 812 820 813 - #if (TARGET_SYSTEM == _NO_OS_) 821 + #if (TARGET_SYSTEM == _NO_OS_) 814 822 815 - #define ROM // code or variables mapped to ROM (i.e. flash) 816 - // usage: CONST BYTE ROM foo = 0x00; 817 - #define HWACC // hardware access through external memory (i.e. CAN) 823 + #define ROM // code or variables mapped to ROM (i.e. flash) 824 + // usage: CONST BYTE ROM foo = 0x00; 825 + #define HWACC // hardware access through external memory (i.e. CAN) 818 826 819 - // These types can be adjusted by users to match application requirements. The goal is to 820 - // minimize code memory and maximize speed. 821 - #define GENERIC // generic pointer to point to application data 822 - // Variables with this attribute can be located in external 823 - // or internal data memory. 824 - #define MEM // Memory attribute to optimize speed and code of pointer access. 827 + // These types can be adjusted by users to match application requirements. The goal is to 828 + // minimize code memory and maximize speed. 829 + #define GENERIC // generic pointer to point to application data 830 + // Variables with this attribute can be located in external 831 + // or internal data memory. 832 + #define MEM // Memory attribute to optimize speed and code of pointer access. 825 833 826 - #ifndef NEAR 827 - #define NEAR // variables mapped to internal data storage location 828 - #endif 834 + #ifndef NEAR 835 + #define NEAR // variables mapped to internal data storage location 836 + #endif 829 837 830 - #ifndef FAR 831 - #define FAR // variables mapped to external data storage location 832 - #endif 838 + #ifndef FAR 839 + #define FAR // variables mapped to external data storage location 840 + #endif 833 841 834 - #ifndef CONST 835 - #define CONST const // variables mapped to ROM (i.e. flash) 836 - #endif 842 + #ifndef CONST 843 + #define CONST const // variables mapped to ROM (i.e. flash) 844 + #endif 837 845 838 - #define LARGE 846 + #define LARGE 839 847 840 - #define REENTRANT 841 - #define PUBLIC 848 + #define REENTRANT 849 + #define PUBLIC 842 850 843 - #ifndef NDEBUG 851 + #ifndef NDEBUG 844 852 // #include "xuartdrv.h" 845 853 // #include <stdio.h> // prototype printf() (for TRACE) 846 - #define TRACE printf 854 + #define TRACE printf 847 855 // #define TRACE mprintf 848 856 // #ifndef TRACE 849 857 // #define TRACE trace 850 858 // void trace (char *fmt, ...); 851 859 // #endif 852 - #endif 860 + #endif 853 861 854 - #endif 862 + #endif 855 863 856 864 //--------------------------------------------------------------------------- 857 865 // definitions for MPC565 858 866 //--------------------------------------------------------------------------- 859 867 #elif __MWERKS__ 860 868 861 - 862 869 #ifdef __MC68K__ 863 870 864 - #define TARGET_SYSTEM = _MCF548X_ 865 - #define DEV_SYSTEM _DEV_MCW_MCF5XXX_ 871 + #define TARGET_SYSTEM = _MCF548X_ 872 + #define DEV_SYSTEM _DEV_MCW_MCF5XXX_ 866 873 867 874 #else 868 - #define TARGET_SYSTEM = _MPC565_ 869 - #define DEV_SYSTEM _DEV_MCW_MPC5X5_ 875 + #define TARGET_SYSTEM = _MPC565_ 876 + #define DEV_SYSTEM _DEV_MCW_MPC5X5_ 870 877 #endif 871 878 872 - #define NEAR // variables mapped to internal data storage location 873 - #define FAR // variables mapped to external data storage location 874 - #define CONST const // variables mapped to ROM (i.e. flash) 875 - #define ROM // code or variables mapped to ROM (i.e. flash) 876 - // usage: CONST BYTE ROM foo = 0x00; 877 - #define LARGE // functions set parameters to external data storage location 879 + #define NEAR // variables mapped to internal data storage location 880 + #define FAR // variables mapped to external data storage location 881 + #define CONST const // variables mapped to ROM (i.e. flash) 882 + #define ROM // code or variables mapped to ROM (i.e. flash) 883 + // usage: CONST BYTE ROM foo = 0x00; 884 + #define LARGE // functions set parameters to external data storage location 878 885 879 886 // These types can be adjusted by users to match application requirements. The goal is to 880 887 // minimize code memory and maximize speed. 881 - #define GENERIC // generic pointer to point to application data 882 - // Variables with this attribute can be located in external 883 - // or internal data memory. 884 - #define MEM // Memory attribute to optimize speed and code of pointer access. 888 + #define GENERIC // generic pointer to point to application data 889 + // Variables with this attribute can be located in external 890 + // or internal data memory. 891 + #define MEM // Memory attribute to optimize speed and code of pointer access. 885 892 886 - #define HWACC // hardware access through external memory (i.e. CAN) 893 + #define HWACC // hardware access through external memory (i.e. CAN) 887 894 888 - #define REENTRANT 889 - #define PUBLIC 895 + #define REENTRANT 896 + #define PUBLIC 890 897 891 - #ifndef NDEBUG 892 - #include <stdio.h> // prototype printf() (for TRACE) 893 - #define TRACE printf 894 - #endif 898 + #ifndef NDEBUG 899 + #include <stdio.h> // prototype printf() (for TRACE) 900 + #define TRACE printf 901 + #endif 895 902 896 903 //--------------------------------------------------------------------------- 897 904 // definitions for BECK 1x3 898 905 //--------------------------------------------------------------------------- 899 906 #elif defined (__BORLANDC__) && defined (__PARADIGM__) 900 907 908 + #define TARGET_SYSTEM _NO_OS_ 909 + #define DEV_SYSTEM _DEV_PAR_BECK1X3_ 901 910 902 - #define TARGET_SYSTEM _NO_OS_ 903 - #define DEV_SYSTEM _DEV_PAR_BECK1X3_ 904 - 905 - 906 - 907 - #define ROM // code or variables mapped to ROM (i.e. flash) 908 - // usage: CONST BYTE ROM foo = 0x00; 909 - #define HWACC // hardware access through external memory (i.e. CAN) 911 + #define ROM // code or variables mapped to ROM (i.e. flash) 912 + // usage: CONST BYTE ROM foo = 0x00; 913 + #define HWACC // hardware access through external memory (i.e. CAN) 910 914 911 915 // These types can be adjusted by users to match application requirements. The goal is to 912 916 // minimize code memory and maximize speed. 913 - #define GENERIC // generic pointer to point to application data 914 - // Variables with this attribute can be located in external 915 - // or internal data memory. 916 - #define MEM // Memory attribute to optimize speed and code of pointer access. 917 - #define NEAR __near // variables mapped to internal data storage location 918 - #define FAR __far // variables mapped to external data storage location 919 - #define CONST const // variables mapped to ROM (i.e. flash) 920 - #define LARGE 917 + #define GENERIC // generic pointer to point to application data 918 + // Variables with this attribute can be located in external 919 + // or internal data memory. 920 + #define MEM // Memory attribute to optimize speed and code of pointer access. 921 + #define NEAR __near // variables mapped to internal data storage location 922 + #define FAR __far // variables mapped to external data storage location 923 + #define CONST const // variables mapped to ROM (i.e. flash) 924 + #define LARGE 921 925 922 - #define REENTRANT 923 - #define PUBLIC 926 + #define REENTRANT 927 + #define PUBLIC 924 928 925 - #ifndef NDEBUG 926 - #ifndef TRACE 927 - #include <stdio.h> 928 - #define TRACE printf 929 - #endif 930 - #endif 931 - 932 - 929 + #ifndef NDEBUG 930 + #ifndef TRACE 931 + #include <stdio.h> 932 + #define TRACE printf 933 + #endif 934 + #endif 933 935 934 936 //--------------------------------------------------------------------------- 935 937 // definitions for PC ··· 931 949 932 950 // ------------------ definition target system -------------------------- 933 951 934 - #ifdef _WIN32 935 - #define TARGET_SYSTEM _WIN32_ // WIN32 definition 936 - #define DEV_SYSTEM _DEV_WIN32_ 937 - #else 938 - #define TARGET_SYSTEM _DOS_ 939 - #define DEV_SYSTEM _DEV_BORLAND_DOS_ 940 - #endif 941 - 952 + #ifdef _WIN32 953 + #define TARGET_SYSTEM _WIN32_ // WIN32 definition 954 + #define DEV_SYSTEM _DEV_WIN32_ 955 + #else 956 + #define TARGET_SYSTEM _DOS_ 957 + #define DEV_SYSTEM _DEV_BORLAND_DOS_ 958 + #endif 942 959 943 960 // ------------------ WIN32 --------------------------------------------- 944 961 945 - #if (TARGET_SYSTEM == _WIN32_) 962 + #if (TARGET_SYSTEM == _WIN32_) 946 963 947 - #define ROM // code or variables mapped to ROM (i.e. flash) 948 - // usage: CONST BYTE ROM foo = 0x00; 949 - #define HWACC // hardware access through external memory (i.e. CAN) 964 + #define ROM // code or variables mapped to ROM (i.e. flash) 965 + // usage: CONST BYTE ROM foo = 0x00; 966 + #define HWACC // hardware access through external memory (i.e. CAN) 950 967 951 - // These types can be adjusted by users to match application requirements. The goal is to 952 - // minimize code memory and maximize speed. 953 - #define GENERIC // generic pointer to point to application data 954 - // Variables with this attribute can be located in external 955 - // or internal data memory. 956 - #define MEM // Memory attribute to optimize speed and code of pointer access. 968 + // These types can be adjusted by users to match application requirements. The goal is to 969 + // minimize code memory and maximize speed. 970 + #define GENERIC // generic pointer to point to application data 971 + // Variables with this attribute can be located in external 972 + // or internal data memory. 973 + #define MEM // Memory attribute to optimize speed and code of pointer access. 957 974 958 - #ifndef NEAR 959 - #define NEAR // variables mapped to internal data storage location 960 - #endif 975 + #ifndef NEAR 976 + #define NEAR // variables mapped to internal data storage location 977 + #endif 961 978 962 - #ifndef FAR 963 - #define FAR // variables mapped to external data storage location 964 - #endif 979 + #ifndef FAR 980 + #define FAR // variables mapped to external data storage location 981 + #endif 965 982 966 - #ifndef CONST 967 - #define CONST const // variables mapped to ROM (i.e. flash) 968 - #endif 983 + #ifndef CONST 984 + #define CONST const // variables mapped to ROM (i.e. flash) 985 + #endif 969 986 970 - #define LARGE 987 + #define LARGE 971 988 972 - #define REENTRANT 973 - #define PUBLIC __stdcall 989 + #define REENTRANT 990 + #define PUBLIC __stdcall 974 991 975 - #ifndef NDEBUG 976 - #ifndef TRACE 977 - #include <stdio.h> 978 - #define TRACE printf 979 - #endif 980 - #endif 992 + #ifndef NDEBUG 993 + #ifndef TRACE 994 + #include <stdio.h> 995 + #define TRACE printf 996 + #endif 997 + #endif 981 998 982 - #elif (TARGET_SYSTEM == _DOS_) 999 + #elif (TARGET_SYSTEM == _DOS_) 983 1000 984 - #define ROM // code or variables mapped to ROM (i.e. flash) 985 - // usage: CONST BYTE ROM foo = 0x00; 986 - #define HWACC // hardware access through external memory (i.e. CAN) 1001 + #define ROM // code or variables mapped to ROM (i.e. flash) 1002 + // usage: CONST BYTE ROM foo = 0x00; 1003 + #define HWACC // hardware access through external memory (i.e. CAN) 987 1004 988 - // These types can be adjusted by users to match application requirements. The goal is to 989 - // minimize code memory and maximize speed. 990 - #define GENERIC // generic pointer to point to application data 991 - // Variables with this attribute can be located in external 992 - // or internal data memory. 993 - #define MEM // Memory attribute to optimize speed and code of pointer access. 994 - #define NEAR near // variables mapped to internal data storage location 995 - #define FAR far // variables mapped to external data storage location 996 - #define CONST const // variables mapped to ROM (i.e. flash) 997 - #define LARGE 1005 + // These types can be adjusted by users to match application requirements. The goal is to 1006 + // minimize code memory and maximize speed. 1007 + #define GENERIC // generic pointer to point to application data 1008 + // Variables with this attribute can be located in external 1009 + // or internal data memory. 1010 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1011 + #define NEAR near // variables mapped to internal data storage location 1012 + #define FAR far // variables mapped to external data storage location 1013 + #define CONST const // variables mapped to ROM (i.e. flash) 1014 + #define LARGE 998 1015 999 - #define REENTRANT 1000 - #define PUBLIC 1016 + #define REENTRANT 1017 + #define PUBLIC 1001 1018 1002 - #ifndef NDEBUG 1003 - #ifndef TRACE 1004 - #include <stdio.h> 1005 - #define TRACE printf 1006 - #endif 1007 - #endif 1019 + #ifndef NDEBUG 1020 + #ifndef TRACE 1021 + #include <stdio.h> 1022 + #define TRACE printf 1023 + #endif 1024 + #endif 1008 1025 1009 - #endif 1026 + #endif 1010 1027 1011 - #elif (_MSC_VER == 800) // PC MS Visual C/C++ for DOS applications 1028 + #elif (_MSC_VER == 800) // PC MS Visual C/C++ for DOS applications 1012 1029 1013 - #define TARGET_SYSTEM _DOS_ 1014 - #define DEV_SYSTEM _DEV_MSVC_DOS_ 1030 + #define TARGET_SYSTEM _DOS_ 1031 + #define DEV_SYSTEM _DEV_MSVC_DOS_ 1015 1032 1016 - #define ROM // code or variables mapped to ROM (i.e. flash) 1017 - // usage: CONST BYTE ROM foo = 0x00; 1018 - #define HWACC near // hardware access through external memory (i.e. CAN) 1033 + #define ROM // code or variables mapped to ROM (i.e. flash) 1034 + // usage: CONST BYTE ROM foo = 0x00; 1035 + #define HWACC near // hardware access through external memory (i.e. CAN) 1019 1036 1020 1037 // These types can be adjusted by users to match application requirements. The goal is to 1021 1038 // minimize code memory and maximize speed. 1022 - #define GENERIC // generic pointer to point to application data 1023 - // Variables with this attribute can be located in external 1024 - // or internal data memory. 1025 - #define MEM // Memory attribute to optimize speed and code of pointer access. 1026 - #define NEAR near // variables mapped to internal data storage location 1027 - #define FAR far // variables mapped to external data storage location 1028 - #define CONST const // variables mapped to ROM (i.e. flash) 1029 - #define LARGE 1039 + #define GENERIC // generic pointer to point to application data 1040 + // Variables with this attribute can be located in external 1041 + // or internal data memory. 1042 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1043 + #define NEAR near // variables mapped to internal data storage location 1044 + #define FAR far // variables mapped to external data storage location 1045 + #define CONST const // variables mapped to ROM (i.e. flash) 1046 + #define LARGE 1030 1047 1031 - #define REENTRANT 1032 - #define PUBLIC 1048 + #define REENTRANT 1049 + #define PUBLIC 1033 1050 1034 - #ifndef NDEBUG 1035 - #ifndef TRACE 1036 - #include <stdio.h> 1037 - #define TRACE printf 1038 - #endif 1039 - #endif 1040 - 1051 + #ifndef NDEBUG 1052 + #ifndef TRACE 1053 + #include <stdio.h> 1054 + #define TRACE printf 1055 + #endif 1056 + #endif 1041 1057 1042 1058 //--------------------------------------------------------------------------- 1043 1059 // definitions for RTX under WIN32 ··· 1043 1063 #elif (defined (UNDER_RTSS) && defined (WIN32)) 1044 1064 1045 1065 // ------------------ definition target system -------------------------- 1046 - #define TARGET_SYSTEM _WIN32_RTX_ 1047 - #define DEV_SYSTEM _DEV_WIN32_RTX_ 1066 + #define TARGET_SYSTEM _WIN32_RTX_ 1067 + #define DEV_SYSTEM _DEV_WIN32_RTX_ 1048 1068 1049 - #define ROM // code or variables mapped to ROM (i.e. flash) 1050 - // usage: CONST BYTE ROM foo = 0x00; 1051 - #define HWACC // hardware access through external memory (i.e. CAN) 1069 + #define ROM // code or variables mapped to ROM (i.e. flash) 1070 + // usage: CONST BYTE ROM foo = 0x00; 1071 + #define HWACC // hardware access through external memory (i.e. CAN) 1052 1072 1053 1073 // These types can be adjusted by users to match application requirements. The goal is to 1054 1074 // minimize code memory and maximize speed. 1055 - #define GENERIC // generic pointer to point to application data 1056 - // Variables with this attribute can be located in external 1057 - // or internal data memory. 1058 - #define MEM // Memory attribute to optimize speed and code of pointer access. 1075 + #define GENERIC // generic pointer to point to application data 1076 + // Variables with this attribute can be located in external 1077 + // or internal data memory. 1078 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1059 1079 1060 - #ifndef NEAR 1061 - #define NEAR // variables mapped to internal data storage location 1062 - #endif 1080 + #ifndef NEAR 1081 + #define NEAR // variables mapped to internal data storage location 1082 + #endif 1063 1083 1064 - #ifndef FAR 1065 - #define FAR // variables mapped to external data storage location 1066 - #endif 1084 + #ifndef FAR 1085 + #define FAR // variables mapped to external data storage location 1086 + #endif 1067 1087 1068 - #ifndef CONST 1069 - #define CONST const // variables mapped to ROM (i.e. flash) 1070 - #endif 1088 + #ifndef CONST 1089 + #define CONST const // variables mapped to ROM (i.e. flash) 1090 + #endif 1071 1091 1072 - #define LARGE 1092 + #define LARGE 1073 1093 1074 - #define REENTRANT 1075 - #define PUBLIC __stdcall 1094 + #define REENTRANT 1095 + #define PUBLIC __stdcall 1076 1096 1077 - #ifndef NDEBUG 1078 - #ifndef TRACE 1079 - #define TRACE RtPrintf 1080 - #endif 1081 - #endif 1097 + #ifndef NDEBUG 1098 + #ifndef TRACE 1099 + #define TRACE RtPrintf 1100 + #endif 1101 + #endif 1082 1102 1083 1103 //--------------------------------------------------------------------------- 1084 1104 // definitions for WinCE ··· 1086 1106 #elif defined (_WIN32_WCE) 1087 1107 1088 1108 // ------------------ definition target system -------------------------- 1089 - #define TARGET_SYSTEM _WINCE_ 1090 - #define DEV_SYSTEM _DEV_WIN_CE_ 1109 + #define TARGET_SYSTEM _WINCE_ 1110 + #define DEV_SYSTEM _DEV_WIN_CE_ 1091 1111 1092 - #define ROM // code or variables mapped to ROM (i.e. flash) 1093 - // usage: CONST BYTE ROM foo = 0x00; 1094 - #define HWACC // hardware access through external memory (i.e. CAN) 1112 + #define ROM // code or variables mapped to ROM (i.e. flash) 1113 + // usage: CONST BYTE ROM foo = 0x00; 1114 + #define HWACC // hardware access through external memory (i.e. CAN) 1095 1115 1096 1116 // These types can be adjusted by users to match application requirements. The goal is to 1097 1117 // minimize code memory and maximize speed. 1098 - #define GENERIC // generic pointer to point to application data 1099 - // Variables with this attribute can be located in external 1100 - // or internal data memory. 1101 - #define MEM // Memory attribute to optimize speed and code of pointer access. 1118 + #define GENERIC // generic pointer to point to application data 1119 + // Variables with this attribute can be located in external 1120 + // or internal data memory. 1121 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1102 1122 1103 - #ifndef NEAR 1104 - #define NEAR // variables mapped to internal data storage location 1105 - #endif 1123 + #ifndef NEAR 1124 + #define NEAR // variables mapped to internal data storage location 1125 + #endif 1106 1126 1107 - #ifndef FAR 1108 - #define FAR // variables mapped to external data storage location 1109 - #endif 1127 + #ifndef FAR 1128 + #define FAR // variables mapped to external data storage location 1129 + #endif 1110 1130 1111 - #ifndef CONST 1112 - #define CONST const // variables mapped to ROM (i.e. flash) 1113 - #endif 1131 + #ifndef CONST 1132 + #define CONST const // variables mapped to ROM (i.e. flash) 1133 + #endif 1114 1134 1115 - #define LARGE 1135 + #define LARGE 1116 1136 1117 - #ifndef QWORD 1137 + #ifndef QWORD 1118 1138 //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) 1119 - #define QWORD __int64 1120 - #endif 1139 + #define QWORD __int64 1140 + #endif 1121 1141 1122 - #define REENTRANT 1123 - #define PUBLIC __cdecl 1142 + #define REENTRANT 1143 + #define PUBLIC __cdecl 1124 1144 1125 - #ifdef ASSERTMSG 1126 - #undef ASSERTMSG 1127 - #endif 1145 + #ifdef ASSERTMSG 1146 + #undef ASSERTMSG 1147 + #endif 1128 1148 1129 - #ifndef NDEBUG 1130 - #ifndef TRACE 1131 - #define TRACE printf 1149 + #ifndef NDEBUG 1150 + #ifndef TRACE 1151 + #define TRACE printf 1132 1152 // void trace (char *fmt, ...); 1133 - #endif 1134 - #endif 1153 + #endif 1154 + #endif 1135 1155 1136 - #else // ===> PC MS Visual C/C++ 1156 + #else // ===> PC MS Visual C/C++ 1137 1157 1138 1158 // ------------------ definition target system -------------------------- 1139 1159 1140 - #ifdef _WIN32 1141 - #define TARGET_SYSTEM _WIN32_ // WIN32 definition 1142 - #define DEV_SYSTEM _DEV_WIN32_ 1143 - #else 1144 - #define TARGET_SYSTEM _WIN16_ // WIN16 definition 1145 - #define DEV_SYSTEM _DEV_WIN16_ 1146 - #endif 1147 - 1160 + #ifdef _WIN32 1161 + #define TARGET_SYSTEM _WIN32_ // WIN32 definition 1162 + #define DEV_SYSTEM _DEV_WIN32_ 1163 + #else 1164 + #define TARGET_SYSTEM _WIN16_ // WIN16 definition 1165 + #define DEV_SYSTEM _DEV_WIN16_ 1166 + #endif 1148 1167 1149 1168 // ------------------ WIN16 --------------------------------------------- 1150 1169 1151 - #if (TARGET_SYSTEM == _WIN16_) 1170 + #if (TARGET_SYSTEM == _WIN16_) 1152 1171 1153 - #define ROM // code or variables mapped to ROM (i.e. flash) 1154 - // usage: CONST BYTE ROM foo = 0x00; 1155 - #define HWACC // hardware access through external memory (i.e. CAN) 1172 + #define ROM // code or variables mapped to ROM (i.e. flash) 1173 + // usage: CONST BYTE ROM foo = 0x00; 1174 + #define HWACC // hardware access through external memory (i.e. CAN) 1156 1175 1157 - // These types can be adjusted by users to match application requirements. The goal is to 1158 - // minimize code memory and maximize speed. 1159 - #define GENERIC // generic pointer to point to application data 1160 - // Variables with this attribute can be located in external 1161 - // or internal data memory. 1162 - #define MEM // Memory attribute to optimize speed and code of pointer access. 1176 + // These types can be adjusted by users to match application requirements. The goal is to 1177 + // minimize code memory and maximize speed. 1178 + #define GENERIC // generic pointer to point to application data 1179 + // Variables with this attribute can be located in external 1180 + // or internal data memory. 1181 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1163 1182 1164 - #ifndef NEAR 1165 - #define NEAR // variables mapped to internal data storage location 1166 - #endif 1183 + #ifndef NEAR 1184 + #define NEAR // variables mapped to internal data storage location 1185 + #endif 1167 1186 1168 - #ifndef FAR 1169 - #define FAR far // variables mapped to external data storage location 1170 - #endif 1187 + #ifndef FAR 1188 + #define FAR far // variables mapped to external data storage location 1189 + #endif 1171 1190 1172 - #ifndef CONST 1173 - #define CONST const // variables mapped to ROM (i.e. flash) 1174 - #endif 1191 + #ifndef CONST 1192 + #define CONST const // variables mapped to ROM (i.e. flash) 1193 + #endif 1175 1194 1176 - #define LARGE 1195 + #define LARGE 1177 1196 1178 - #define REENTRANT 1179 - #define PUBLIC _far _pascal _export 1197 + #define REENTRANT 1198 + #define PUBLIC _far _pascal _export 1180 1199 1181 - #ifndef NDEBUG 1182 - #ifndef TRACE 1183 - #define TRACE trace 1184 - #ifdef __cplusplus 1185 - extern "C" 1186 - { 1187 - #endif 1188 - void trace (const char *fmt, ...); 1189 - #ifdef __cplusplus 1190 - } 1191 - #endif 1192 - #endif 1193 - #endif 1194 - 1195 - #endif 1196 - 1197 - 1200 + #ifndef NDEBUG 1201 + #ifndef TRACE 1202 + #define TRACE trace 1203 + #ifdef __cplusplus 1204 + extern "C" { 1205 + #endif 1206 + void trace(const char *fmt, ...); 1207 + #ifdef __cplusplus 1208 + } 1209 + #endif 1210 + #endif 1211 + #endif 1212 + #endif 1198 1213 // ------------------ WIN32 --------------------------------------------- 1199 - 1200 - #if (TARGET_SYSTEM == _WIN32_) 1201 - 1202 - #define ROM // code or variables mapped to ROM (i.e. flash) 1203 - // usage: CONST BYTE ROM foo = 0x00; 1204 - #define HWACC // hardware access through external memory (i.e. CAN) 1205 - 1206 - // These types can be adjusted by users to match application requirements. The goal is to 1207 - // minimize code memory and maximize speed. 1208 - #define GENERIC // generic pointer to point to application data 1209 - // Variables with this attribute can be located in external 1210 - // or internal data memory. 1211 - #define MEM // Memory attribute to optimize speed and code of pointer access. 1212 - 1213 - #ifndef NEAR 1214 - #define NEAR // variables mapped to internal data storage location 1215 - #endif 1216 - 1217 - #ifndef FAR 1218 - #define FAR // variables mapped to external data storage location 1219 - #endif 1220 - 1221 - #ifndef CONST 1222 - #define CONST const // variables mapped to ROM (i.e. flash) 1223 - #endif 1224 - 1225 - #define LARGE 1226 - 1227 - #define REENTRANT 1228 - #define PUBLIC __stdcall 1229 - 1230 - #ifndef QWORD 1231 - //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) 1232 - #define QWORD __int64 1233 - #endif 1234 - 1235 - #ifndef NDEBUG 1236 - #ifndef TRACE 1237 - #define TRACE trace 1238 - #ifdef __cplusplus 1239 - extern "C" 1240 - { 1241 - #endif 1242 - void trace (const char *fmt, ...); 1243 - #ifdef __cplusplus 1244 - } 1245 - #endif 1246 - #endif 1247 - #endif 1248 - 1249 - // MS Visual C++ compiler supports function inlining 1250 - #define INLINE_FUNCTION_DEF __forceinline 1251 - 1252 - // to actually enable inlining just include the following two lines 1253 - // #define INLINE_FUNCTION INLINE_FUNCTION_DEF 1254 - // #define INLINE_ENABLED TRUE 1255 - 1256 - #endif 1257 - 1258 - #endif // ===> PC 1259 - 1260 - 1261 - //--------------------------------------------------------------------------- 1262 - // definitions of basic types 1263 - //--------------------------------------------------------------------------- 1264 - 1265 - #ifndef _WINDEF_ // defined in WINDEF.H, included by <windows.h> 1266 - 1214 + #if (TARGET_SYSTEM == _WIN32_) 1215 + #define ROM // code or variables mapped to ROM (i.e. flash) 1216 + // usage: CONST BYTE ROM foo = 0x00; 1217 + #define HWACC // hardware access through external memory (i.e. CAN) 1218 + // These types can be adjusted by users to match application requirements. The goal is to// minimize code memory and maximize speed. 1219 + #define GENERIC // generic pointer to point to application data 1220 + // Variables with this attribute can be located in external// or internal data memory. 1221 + #define MEM // Memory attribute to optimize speed and code of pointer access. 1222 + #ifndef NEAR 1223 + #define NEAR // variables mapped to internal data storage location 1224 + #endif 1225 + #ifndef FAR 1226 + #define FAR // variables mapped to external data storage location 1227 + #endif 1228 + #ifndef CONST 1229 + #define CONST const // variables mapped to ROM (i.e. flash) 1230 + #endif 1231 + #define LARGE 1232 + #define REENTRANT 1233 + #define PUBLIC __stdcall 1234 + #ifndef QWORD 1235 + //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) 1236 + #define QWORD __int64 1237 + #endif 1238 + #ifndef NDEBUG 1239 + #ifndef TRACE 1240 + #define TRACE trace 1241 + #ifdef __cplusplus 1242 + extern "C" { 1243 + #endif 1244 + void trace(const char *fmt, ...); 1245 + #ifdef __cplusplus 1246 + } 1247 + #endif 1248 + #endif 1249 + #endif 1250 + // MS Visual C++ compiler supports function inlining 1251 + #define INLINE_FUNCTION_DEF __forceinline 1252 + // to actually enable inlining just include the following two lines// #define INLINE_FUNCTION INLINE_FUNCTION_DEF// #define INLINE_ENABLED TRUE 1253 + #endif 1254 + #endif // ===> PC 1255 + //---------------------------------------------------------------------------// definitions of basic types//--------------------------------------------------------------------------- 1256 + #ifndef _WINDEF_ // defined in WINDEF.H, included by <windows.h> 1267 1257 // --- arithmetic types --- 1268 - #ifndef SHORT 1269 - #define SHORT short int 1270 - #endif 1271 - 1272 - #ifndef USHORT 1273 - #define USHORT unsigned short int 1274 - #endif 1275 - 1276 - #ifndef INT 1277 - #define INT int 1278 - #endif 1279 - 1280 - #ifndef UINT 1281 - #define UINT unsigned int 1282 - #endif 1283 - 1284 - #ifndef LONG 1285 - #define LONG long int 1286 - #endif 1287 - 1288 - #ifndef ULONG 1289 - #define ULONG unsigned long int 1290 - #endif 1291 - 1292 - 1258 + #ifndef SHORT 1259 + #define SHORT short int 1260 + #endif 1261 + #ifndef USHORT 1262 + #define USHORT unsigned short int 1263 + #endif 1264 + #ifndef INT 1265 + #define INT int 1266 + #endif 1267 + #ifndef UINT 1268 + #define UINT unsigned int 1269 + #endif 1270 + #ifndef LONG 1271 + #define LONG long int 1272 + #endif 1273 + #ifndef ULONG 1274 + #define ULONG unsigned long int 1275 + #endif 1293 1276 // --- logic types --- 1294 - #ifndef BYTE 1295 - #define BYTE unsigned char 1296 - #endif 1297 - 1298 - #ifndef WORD 1299 - #define WORD unsigned short int 1300 - #endif 1301 - 1302 - #ifndef DWORD 1303 - #define DWORD unsigned long int 1304 - #endif 1305 - 1306 - #ifndef BOOL 1307 - #define BOOL unsigned char 1308 - #endif 1309 - 1310 - 1277 + #ifndef BYTE 1278 + #define BYTE unsigned char 1279 + #endif 1280 + #ifndef WORD 1281 + #define WORD unsigned short int 1282 + #endif 1283 + #ifndef DWORD 1284 + #define DWORD unsigned long int 1285 + #endif 1286 + #ifndef BOOL 1287 + #define BOOL unsigned char 1288 + #endif 1311 1289 // --- alias types --- 1312 - #ifndef TRUE 1313 - #define TRUE 0xFF 1314 - #endif 1315 - 1316 - #ifndef FALSE 1317 - #define FALSE 0x00 1318 - #endif 1319 - 1320 - #ifndef NULL 1321 - #define NULL ((void *) 0) 1322 - #endif 1323 - 1290 + #ifndef TRUE 1291 + #define TRUE 0xFF 1324 1292 #endif 1325 - 1326 - 1293 + #ifndef FALSE 1294 + #define FALSE 0x00 1295 + #endif 1296 + #ifndef NULL 1297 + #define NULL ((void *) 0) 1298 + #endif 1299 + #endif 1327 1300 #ifndef _TIME_OF_DAY_DEFINED_ 1301 + typedef struct { 1302 + unsigned long int m_dwMs; 1303 + unsigned short int m_wDays; 1328 1304 1329 - typedef struct 1330 - { 1331 - unsigned long int m_dwMs; 1332 - unsigned short int m_wDays; 1305 + } tTimeOfDay; 1333 1306 1334 - } tTimeOfDay; 1335 - 1336 - #define _TIME_OF_DAY_DEFINED_ 1307 + #define _TIME_OF_DAY_DEFINED_ 1337 1308 1338 1309 #endif 1339 - 1340 1310 1341 1311 //--------------------------------------------------------------------------- 1342 1312 // Definition von TRACE ··· 1294 1364 1295 1365 #ifndef NDEBUG 1296 1366 1297 - #ifndef TRACE0 1298 - #define TRACE0(p0) TRACE(p0) 1299 - #endif 1367 + #ifndef TRACE0 1368 + #define TRACE0(p0) TRACE(p0) 1369 + #endif 1300 1370 1301 - #ifndef TRACE1 1302 - #define TRACE1(p0, p1) TRACE(p0, p1) 1303 - #endif 1371 + #ifndef TRACE1 1372 + #define TRACE1(p0, p1) TRACE(p0, p1) 1373 + #endif 1304 1374 1305 - #ifndef TRACE2 1306 - #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2) 1307 - #endif 1375 + #ifndef TRACE2 1376 + #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2) 1377 + #endif 1308 1378 1309 - #ifndef TRACE3 1310 - #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3) 1311 - #endif 1379 + #ifndef TRACE3 1380 + #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3) 1381 + #endif 1312 1382 1313 - #ifndef TRACE4 1314 - #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4) 1315 - #endif 1383 + #ifndef TRACE4 1384 + #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4) 1385 + #endif 1316 1386 1317 - #ifndef TRACE5 1318 - #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5) 1319 - #endif 1387 + #ifndef TRACE5 1388 + #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5) 1389 + #endif 1320 1390 1321 - #ifndef TRACE6 1322 - #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6) 1323 - #endif 1391 + #ifndef TRACE6 1392 + #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6) 1393 + #endif 1324 1394 1325 1395 #else 1326 1396 1327 - #ifndef TRACE0 1328 - #define TRACE0(p0) 1329 - #endif 1330 - 1331 - #ifndef TRACE1 1332 - #define TRACE1(p0, p1) 1333 - #endif 1334 - 1335 - #ifndef TRACE2 1336 - #define TRACE2(p0, p1, p2) 1337 - #endif 1338 - 1339 - #ifndef TRACE3 1340 - #define TRACE3(p0, p1, p2, p3) 1341 - #endif 1342 - 1343 - #ifndef TRACE4 1344 - #define TRACE4(p0, p1, p2, p3, p4) 1345 - #endif 1346 - 1347 - #ifndef TRACE5 1348 - #define TRACE5(p0, p1, p2, p3, p4, p5) 1349 - #endif 1350 - 1351 - #ifndef TRACE6 1352 - #define TRACE6(p0, p1, p2, p3, p4, p5, p6) 1353 - #endif 1354 - 1397 + #ifndef TRACE0 1398 + #define TRACE0(p0) 1355 1399 #endif 1356 1400 1401 + #ifndef TRACE1 1402 + #define TRACE1(p0, p1) 1403 + #endif 1357 1404 1405 + #ifndef TRACE2 1406 + #define TRACE2(p0, p1, p2) 1407 + #endif 1408 + 1409 + #ifndef TRACE3 1410 + #define TRACE3(p0, p1, p2, p3) 1411 + #endif 1412 + 1413 + #ifndef TRACE4 1414 + #define TRACE4(p0, p1, p2, p3, p4) 1415 + #endif 1416 + 1417 + #ifndef TRACE5 1418 + #define TRACE5(p0, p1, p2, p3, p4, p5) 1419 + #endif 1420 + 1421 + #ifndef TRACE6 1422 + #define TRACE6(p0, p1, p2, p3, p4, p5, p6) 1423 + #endif 1424 + 1425 + #endif 1358 1426 1359 1427 //--------------------------------------------------------------------------- 1360 1428 // definition of ASSERT 1361 1429 //--------------------------------------------------------------------------- 1362 1430 1363 1431 #ifndef ASSERT 1364 - #if !defined (__linux__) && !defined (__KERNEL__) 1365 - #include <assert.h> 1366 - #ifndef ASSERT 1367 - #define ASSERT(p) assert(p) 1368 - #endif 1369 - #else 1370 - #define ASSERT(p) 1371 - #endif 1432 + #if !defined (__linux__) && !defined (__KERNEL__) 1433 + #include <assert.h> 1434 + #ifndef ASSERT 1435 + #define ASSERT(p) assert(p) 1372 1436 #endif 1373 - 1437 + #else 1438 + #define ASSERT(p) 1439 + #endif 1440 + #endif 1374 1441 1375 1442 //--------------------------------------------------------------------------- 1376 1443 // SYS TEC extensions ··· 1377 1450 // but a string, which exactly names the mistake. 1378 1451 #ifndef NDEBUG 1379 1452 1380 - #define ASSERTMSG(expr,string) if (!(expr)) {\ 1453 + #define ASSERTMSG(expr,string) if (!(expr)) {\ 1381 1454 PRINTF0 ("Assertion failed: " string );\ 1382 1455 while (1);} 1383 1456 #else 1384 - #define ASSERTMSG(expr,string) 1457 + #define ASSERTMSG(expr,string) 1385 1458 #endif 1386 - 1387 - 1388 - 1389 1459 1390 1460 //--------------------------------------------------------------------------- 1391 1461 1392 - #endif // #ifndef _GLOBAL_H_ 1462 + #endif // #ifndef _GLOBAL_H_ 1393 1463 1394 1464 // Please keep an empty line at the end of this file. 1395 -
+1 -6
drivers/staging/epl/proc_fs.h
··· 71 71 #ifndef _EPLPROCFS_H_ 72 72 #define _EPLPROCFS_H_ 73 73 74 - 75 74 //--------------------------------------------------------------------------- 76 75 // const defines 77 76 //--------------------------------------------------------------------------- ··· 79 80 // types 80 81 //--------------------------------------------------------------------------- 81 82 82 - 83 83 //--------------------------------------------------------------------------- 84 84 // function prototypes 85 85 //--------------------------------------------------------------------------- ··· 86 88 tEplKernel EplLinProcInit(void); 87 89 tEplKernel EplLinProcFree(void); 88 90 89 - 90 - #endif // #ifndef _EPLPROCFS_H_ 91 - 92 - 91 + #endif // #ifndef _EPLPROCFS_H_