Lines Matching refs:dev_handle
359 tHID_STATUS HID_HostRemoveDev(uint8_t dev_handle) { in HID_HostRemoveDev() argument
362 if ((dev_handle >= HID_HOST_MAX_DEVICES) || in HID_HostRemoveDev()
363 (!hh_cb.devices[dev_handle].in_use)) in HID_HostRemoveDev()
366 HID_HostCloseDev(dev_handle); in HID_HostRemoveDev()
367 hh_cb.devices[dev_handle].in_use = false; in HID_HostRemoveDev()
368 hh_cb.devices[dev_handle].conn.conn_state = HID_CONN_STATE_UNUSED; in HID_HostRemoveDev()
369 hh_cb.devices[dev_handle].conn.ctrl_cid = in HID_HostRemoveDev()
370 hh_cb.devices[dev_handle].conn.intr_cid = 0; in HID_HostRemoveDev()
371 hh_cb.devices[dev_handle].attr_mask = 0; in HID_HostRemoveDev()
385 tHID_STATUS HID_HostOpenDev(uint8_t dev_handle) { in HID_HostOpenDev() argument
388 if ((dev_handle >= HID_HOST_MAX_DEVICES) || in HID_HostOpenDev()
389 (!hh_cb.devices[dev_handle].in_use)) in HID_HostOpenDev()
392 if (hh_cb.devices[dev_handle].state != HID_DEV_NO_CONN) in HID_HostOpenDev()
395 hh_cb.devices[dev_handle].conn_tries = 1; in HID_HostOpenDev()
396 return hidh_conn_initiate(dev_handle); in HID_HostOpenDev()
411 tHID_STATUS HID_HostWriteDev(uint8_t dev_handle, uint8_t t_type, uint8_t param, in HID_HostWriteDev() argument
420 if ((dev_handle >= HID_HOST_MAX_DEVICES) || in HID_HostWriteDev()
421 (!hh_cb.devices[dev_handle].in_use)) { in HID_HostWriteDev()
426 else if (hh_cb.devices[dev_handle].state != HID_DEV_CONNECTED) { in HID_HostWriteDev()
427 HIDH_TRACE_ERROR("HID_ERR_NO_CONNECTION dev_handle %d", dev_handle); in HID_HostWriteDev()
435 hidh_conn_snd_data(dev_handle, t_type, param, data, report_id, pbuf); in HID_HostWriteDev()
449 tHID_STATUS HID_HostCloseDev(uint8_t dev_handle) { in HID_HostCloseDev() argument
452 if ((dev_handle >= HID_HOST_MAX_DEVICES) || in HID_HostCloseDev()
453 (!hh_cb.devices[dev_handle].in_use)) in HID_HostCloseDev()
456 if (hh_cb.devices[dev_handle].state != HID_DEV_CONNECTED) in HID_HostCloseDev()
459 alarm_cancel(hh_cb.devices[dev_handle].conn.process_repage_timer); in HID_HostCloseDev()
460 hh_cb.devices[dev_handle].conn_tries = HID_HOST_MAX_CONN_RETRY + 1; in HID_HostCloseDev()
461 return hidh_conn_disconnect(dev_handle); in HID_HostCloseDev()