/******************************************************************************* ** ** Function hidh_proc_repage_timeout ** ** Description This function handles timeout (to page device). ** ** Returns void ** *******************************************************************************/ void hidh_proc_repage_timeout (TIMER_LIST_ENT *p_tle) { hidh_conn_initiate( (UINT8) p_tle->param ) ; hh_cb.devices[p_tle->param].conn_tries++; hh_cb.callback( (UINT8) p_tle->param, hh_cb.devices[p_tle->param].addr, HID_HDEV_EVT_RETRYING, hh_cb.devices[p_tle->param].conn_tries, NULL ) ; }
/******************************************************************************* ** ** Function hidh_proc_repage_timeout ** ** Description This function handles timeout (to page device). ** ** Returns void ** *******************************************************************************/ void hidh_proc_repage_timeout (TIMER_LIST_ENT *p_tle) { HIDH_TRACE_DEBUG ("HID-Host Connection retry timeout fired"); if (HID_SUCCESS == hidh_conn_initiate( (UINT8) p_tle->param )) { hh_cb.devices[p_tle->param].conn_tries++; HIDH_TRACE_DEBUG ("HID-Host Connection retrying hid connection"); hh_cb.callback( (UINT8) p_tle->param, hh_cb.devices[p_tle->param].addr, HID_HDEV_EVT_RETRYING, hh_cb.devices[p_tle->param].conn_tries, NULL ) ; } }
/******************************************************************************* ** ** Function hidh_proc_repage_timeout ** ** Description This function handles timeout (to page device). ** ** Returns void ** *******************************************************************************/ void hidh_proc_repage_timeout (TIMER_LIST_ENT *p_tle) { tHID_HOST_DEV_CTB *device; UINT8 dhandle = PTR_TO_UINT(p_tle->param); hidh_conn_initiate(dhandle); device = &hh_cb.devices[dhandle]; device->conn_tries++; hh_cb.callback(dhandle, device->addr, HID_HDEV_EVT_RETRYING, device->conn_tries, NULL ) ; }
/******************************************************************************* ** ** Function HID_HostOpenDev ** ** Description This function is called when the user wants to initiate a ** connection attempt to a device. ** ** Returns void ** *******************************************************************************/ tHID_STATUS HID_HostOpenDev ( UINT8 dev_handle ) { if( !hh_cb.reg_flag ) return (HID_ERR_NOT_REGISTERED); if( (dev_handle >= HID_HOST_MAX_DEVICES) || (!hh_cb.devices[dev_handle].in_use) ) return HID_ERR_INVALID_PARAM; if( hh_cb.devices[dev_handle].state != HID_DEV_NO_CONN ) return HID_ERR_ALREADY_CONN; hh_cb.devices[dev_handle].conn_tries = 1; return hidh_conn_initiate( dev_handle ); }