Rev 1465 | Rev 1489 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1465 | Rev 1486 | ||
|---|---|---|---|
| Line 378... | Line 378... | ||
| 378 | static void test_fb() |
378 | static void test_fb() |
| 379 | { |
379 | { |
| 380 | int res; |
380 | int res; |
| 381 | ipcarg_t result; |
381 | ipcarg_t result; |
| 382 | int phoneid; |
382 | int phoneid; |
| - | 383 | int vp; |
|
| 383 | 384 | ||
| 384 | // printf("Test: Starting connect...\n"); |
385 | // printf("Test: Starting connect...\n"); |
| 385 | 386 | ||
| 386 | phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0); |
- | |
| 387 | - | ||
| 388 | while ((phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0)) < 0) { |
387 | while ((phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0)) < 0) { |
| 389 | volatile int a; |
388 | volatile int a; |
| 390 | for(a=0;a<1048576;a++); |
389 | for(a=0;a<1048576;a++); |
| 391 | }; |
390 | }; |
| 392 | 391 | ||
| 393 | // printf("Test: Connected: %d\n", res); |
- | |
| 394 | // printf("Test: pinging.\n"); |
- | |
| 395 | while (1) { |
392 | usleep(100000); |
| - | 393 | vp = ipc_call_sync_3(phoneid, FB_VIEWPORT_CREATE, (200 << 16) | 300, (200 << 16) | 150,0,NULL,NULL,NULL); |
|
| 396 | res = ipc_call_sync(phoneid, FB_GET_VFB, 0xbeef,&result); |
394 | if (! ipc_call_sync(phoneid, FB_VIEWPORT_SWITCH, vp, NULL)) { |
| 397 | // printf("Test: Retval: %d - received: %c\n", res, result); |
395 | ipc_call_sync_2(phoneid, FB_SET_STYLE, 0, 0xffffff, NULL, NULL); |
| 398 | // printf("%c", result); |
396 | ipc_call_sync(phoneid, FB_CLEAR, 0, NULL); |
| - | 397 | ipc_call_sync_3(phoneid, FB_PUTCHAR, 'X', 0,0, NULL, NULL, NULL); |
|
| 399 | } |
398 | } |
| 400 | 399 | ||
| 401 | // printf("Test: Hangin up\n"); |
- | |
| 402 | ipc_hangup(phoneid); |
400 | ipc_hangup(phoneid); |
| 403 | } |
401 | } |
| 404 | 402 | ||
| 405 | static void test_time(void) |
403 | static void test_time(void) |
| 406 | { |
404 | { |
| Line 445... | Line 443... | ||
| 445 | // test_pci(); |
443 | // test_pci(); |
| 446 | // test_kbd(); |
444 | // test_kbd(); |
| 447 | // test_time(); |
445 | // test_time(); |
| 448 | // test_async_kbd(); |
446 | // test_async_kbd(); |
| 449 | // test_fb(); |
447 | // test_fb(); |
| 450 | test_console(); |
448 | // test_console(); |
| 451 | 449 | ||
| 452 | printf("\nBye.\n"); |
450 | printf("\nBye.\n"); |
| 453 | 451 | ||
| 454 | /* |
452 | /* |
| 455 | printf("Userspace task, taskid=%llX\n", task_get_id()); |
453 | printf("Userspace task, taskid=%llX\n", task_get_id()); |