Rev 1418 | Rev 1435 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1418 | Rev 1427 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | #include <ddi.h> |
41 | #include <ddi.h> |
42 | #include <string.h> |
42 | #include <string.h> |
43 | #include <errno.h> |
43 | #include <errno.h> |
44 | #include <kbd.h> |
44 | #include <kbd.h> |
45 | #include <ipc/fb.h> |
45 | #include <ipc/fb.h> |
- | 46 | #include <async.h> |
|
46 | 47 | ||
47 | int a; |
48 | int a; |
48 | atomic_t ftx; |
49 | atomic_t ftx; |
49 | 50 | ||
50 | int __thread stage; |
51 | int __thread stage; |
Line 316... | Line 317... | ||
316 | 317 | ||
317 | printf("Test: Hangin up\n"); |
318 | printf("Test: Hangin up\n"); |
318 | ipc_hangup(phoneid); |
319 | ipc_hangup(phoneid); |
319 | } |
320 | } |
320 | 321 | ||
- | 322 | static void test_async_kbd() |
|
- | 323 | { |
|
- | 324 | int res; |
|
- | 325 | ipcarg_t result; |
|
- | 326 | ipc_call_t kbddata; |
|
- | 327 | int phoneid; |
|
- | 328 | aid_t aid; |
|
- | 329 | ||
- | 330 | printf("Test: Starting connect...\n"); |
|
- | 331 | while ((phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0)) < 0) { |
|
- | 332 | }; |
|
- | 333 | ||
- | 334 | printf("Test: Connected: %d\n", res); |
|
- | 335 | printf("Test: pinging.\n"); |
|
- | 336 | while (1) { |
|
- | 337 | aid = async_send_2(phoneid, KBD_GETCHAR, 0, 0, &kbddata); |
|
- | 338 | async_wait_for(aid, NULL); |
|
- | 339 | printf("%c", IPC_GET_ARG1(kbddata)); |
|
- | 340 | } |
|
- | 341 | ||
- | 342 | printf("Test: Hangin up\n"); |
|
- | 343 | ipc_hangup(phoneid); |
|
- | 344 | } |
|
- | 345 | ||
321 | static void test_pci() |
346 | static void test_pci() |
322 | { |
347 | { |
323 | int phone; |
348 | int phone; |
324 | while ((phone = ipc_connect_me_to(PHONE_NS, SERVICE_PCI, 0)) < 0) |
349 | while ((phone = ipc_connect_me_to(PHONE_NS, SERVICE_PCI, 0)) < 0) |
325 | ; |
350 | ; |
Line 390... | Line 415... | ||
390 | // test_async_ipc(); |
415 | // test_async_ipc(); |
391 | // test_advanced_ipc(); |
416 | // test_advanced_ipc(); |
392 | // test_connection_ipc(); |
417 | // test_connection_ipc(); |
393 | // test_hangup(); |
418 | // test_hangup(); |
394 | // test_slam(); |
419 | // test_slam(); |
395 | test_as_area_send(); |
420 | // test_as_area_send(); |
396 | // test_pci(); |
421 | // test_pci(); |
397 | test_kbd(); |
422 | // test_kbd(); |
- | 423 | test_async_kbd(); |
|
398 | // test_fb(); |
424 | // test_fb(); |
399 | 425 | ||
400 | printf("Hello\nThis is Init\n\nBye."); |
426 | printf("Hello\nThis is Init\n\nBye."); |
401 | 427 | ||
402 | 428 |