]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/drivers/input/src/tsc-omap3.c
Update
[l4.git] / l4 / pkg / drivers / input / src / tsc-omap3.c
index ae60276585302eeae508524779223e69e6bbdd29..8ffde9b957b30ad4f0a2b97bbf1d408c234517f9 100644 (file)
@@ -69,7 +69,7 @@ static Tsc_disp disp_virt = {{ 0, 0 }, { 480, 640 }};
 
 static int tsc_init(void)
 {
-  vbus = l4re_get_env_cap("vbus");
+  vbus = l4re_env_get_cap("vbus");
 
   if (l4_is_invalid_cap(vbus))
     {
@@ -158,7 +158,7 @@ static void create_motion_event(void)
 static int tsc_irq_func(void)
 {
   l4_cap_idx_t irq_cap = l4re_util_cap_alloc();
-  l4_cap_idx_t thread_cap = pthread_getl4cap(_pthread);
+  l4_cap_idx_t thread_cap = pthread_l4_cap(_pthread);
   l4_msgtag_t tag;
 
   l4_debugger_set_object_name(thread_cap, "tsc-omap3.irq");
@@ -181,27 +181,27 @@ static int tsc_irq_func(void)
          printf("[TSC] Error: Receive irq failed\n");
          continue;
        }
-   
+
       if (!tsc_handler)
        continue;
-      
+
       create_motion_event();
       // generate touch start event;
       Input_event ev = { L4RE_EV_KEY, L4RE_BTN_LEFT, 1 };
       tsc_handler(ev, tsc_priv);
-      
+
       int pen_up = 0;
-      if (l4vbus_gpio_read(vbus, gpio_handle, irq, &pen_up))
+      if ((pen_up = l4vbus_gpio_get(vbus, gpio_handle, irq)) < 0)
        return -6;
       while (!pen_up)
        {
          create_motion_event();
          l4_usleep(2);
-         
-         if (l4vbus_gpio_read(vbus, gpio_handle, irq, &pen_up))
+
+         if ((pen_up = l4vbus_gpio_get(vbus, gpio_handle, irq)) < 0)
            return -6;
        }
-      
+
       // generate touch end event;
       Input_event ev2 = { L4RE_EV_KEY, L4RE_BTN_LEFT, 0 };
       tsc_handler(ev2, tsc_priv);