static int tsc_init(void)
{
- vbus = l4re_get_env_cap("vbus");
+ vbus = l4re_env_get_cap("vbus");
if (l4_is_invalid_cap(vbus))
{
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");
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);