Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void *test_init(unsigned short mode, unsigned short delay) {
- int tick_limit = delay * 60;
- int ipc_status;
- message msg;
- unsigned long irq_set_timer = timer_subscribe_int();
- *vg_init(mode);
- while (get_timer_counter() < tick_limit) {
- if (driver_receive(ANY, &msg, &ipc_status) != 0) {
- printf("driver_receive failed/n");
- continue;
- }
- if (is_ipc_notify(ipc_status)) {
- switch (_ENDPOINT_P(msg.m_source)) {
- case HARDWARE:
- if (msg.NOTIFY_ARG & irq_set_timer) {
- }
- else
- return -1;
- }
- break;
- default:
- break;
- }
- }
- else {
- continue;
- }
- vg_exit();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement