• Home
  • Raw
  • Download

Lines Matching refs:ev

60 static int uhid_write(int fd, const struct uhid_event *ev)  in uhid_write()  argument
63 OSI_NO_INTR(ret = write(fd, ev, sizeof(*ev))); in uhid_write()
70 } else if (ret != (ssize_t)sizeof(*ev)) { in uhid_write()
72 __FUNCTION__, ret, sizeof(*ev)); in uhid_write()
84 struct uhid_event ev; in uhid_read_event() local
85 memset(&ev, 0, sizeof(ev)); in uhid_read_event()
88 OSI_NO_INTR(ret = read(p_dev->fd, &ev, sizeof(ev))); in uhid_read_event()
98 } else if ((ev.type == UHID_OUTPUT) || (ev.type==UHID_OUTPUT_EV)) { in uhid_read_event()
101 if (ret < (ssize_t)sizeof(ev)) { in uhid_read_event()
103 __FUNCTION__, ret, sizeof(ev.type)); in uhid_read_event()
108 switch (ev.type) { in uhid_read_event()
126 if (ret < (ssize_t)(sizeof(ev.type) + sizeof(ev.u.output))) { in uhid_read_event()
129 sizeof(ev.type) + sizeof(ev.u.output)); in uhid_read_event()
134 ,ev.u.output.rtype, ev.u.output.size); in uhid_read_event()
136 if(ev.u.output.rtype == UHID_FEATURE_REPORT) in uhid_read_event()
138 ev.u.output.size, ev.u.output.data); in uhid_read_event()
139 else if(ev.u.output.rtype == UHID_OUTPUT_REPORT) in uhid_read_event()
141 ev.u.output.size, ev.u.output.data); in uhid_read_event()
144 ev.u.output.size, ev.u.output.data); in uhid_read_event()
157 APPL_TRACE_DEBUG("Invalid event from uhid-dev: %u\n", ev.type); in uhid_read_event()
240 struct uhid_event ev; in bta_hh_co_destroy() local
241 memset(&ev, 0, sizeof(ev)); in bta_hh_co_destroy()
242 ev.type = UHID_DESTROY; in bta_hh_co_destroy()
243 uhid_write(fd, &ev); in bta_hh_co_destroy()
252 struct uhid_event ev; in bta_hh_co_write() local
253 memset(&ev, 0, sizeof(ev)); in bta_hh_co_write()
254 ev.type = UHID_INPUT; in bta_hh_co_write()
255 ev.u.input.size = len; in bta_hh_co_write()
256 if(len > sizeof(ev.u.input.data)){ in bta_hh_co_write()
261 memcpy(ev.u.input.data, rpt, len); in bta_hh_co_write()
263 return uhid_write(fd, &ev); in bta_hh_co_write()
456 struct uhid_event ev; in bta_hh_co_send_hid_info() local
471 memset(&ev, 0, sizeof(ev)); in bta_hh_co_send_hid_info()
472 ev.type = UHID_CREATE; in bta_hh_co_send_hid_info()
473 strncpy((char*)ev.u.create.name, dev_name, sizeof(ev.u.create.name) - 1); in bta_hh_co_send_hid_info()
474 snprintf((char*)ev.u.create.uniq, sizeof(ev.u.create.uniq), in bta_hh_co_send_hid_info()
479 ev.u.create.rd_size = dscp_len; in bta_hh_co_send_hid_info()
480 ev.u.create.rd_data = p_dscp; in bta_hh_co_send_hid_info()
481 ev.u.create.bus = BUS_BLUETOOTH; in bta_hh_co_send_hid_info()
482 ev.u.create.vendor = vendor_id; in bta_hh_co_send_hid_info()
483 ev.u.create.product = product_id; in bta_hh_co_send_hid_info()
484 ev.u.create.version = version; in bta_hh_co_send_hid_info()
485 ev.u.create.country = ctry_code; in bta_hh_co_send_hid_info()
486 result = uhid_write(p_dev->fd, &ev); in bta_hh_co_send_hid_info()