这篇教程C++ DEVICE_STATE_EVENT_NUMBER函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DEVICE_STATE_EVENT_NUMBER函数的典型用法代码示例。如果您正苦于以下问题:C++ DEVICE_STATE_EVENT_NUMBER函数的具体用法?C++ DEVICE_STATE_EVENT_NUMBER怎么用?C++ DEVICE_STATE_EVENT_NUMBER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DEVICE_STATE_EVENT_NUMBER函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: VCD_MSG_LOWstatic u32 vcd_init_in_null(struct vcd_drv_ctxt_type_t *p_drv_ctxt, struct vcd_init_config_type *p_config, s32 *p_driver_handle) { u32 rc = VCD_S_SUCCESS; struct vcd_dev_ctxt_type *p_dev_ctxt = &p_drv_ctxt->dev_ctxt; u32 b_done_create_timer = FALSE; VCD_MSG_LOW("vcd_init_in_dev_null:"); p_dev_ctxt->config = *p_config; p_dev_ctxt->p_device_base_addr = (u8 *)p_config->pf_map_dev_base_addr( p_dev_ctxt->config.p_device_name); if (!p_dev_ctxt->p_device_base_addr) { VCD_MSG_ERROR("NULL Device_base_addr"); return VCD_ERR_FAIL; } if (p_config->pf_register_isr) { p_config->pf_register_isr(p_dev_ctxt->config. p_device_name); } if (p_config->pf_timer_create) { if (p_config->pf_timer_create(vcd_hw_timeout_handler, NULL, &p_dev_ctxt->p_hw_timer_handle)) b_done_create_timer = TRUE; else { VCD_MSG_ERROR("timercreate failed"); return VCD_ERR_FAIL; } } rc = vcd_init_cmn(p_drv_ctxt, p_config, p_driver_handle); if (!VCD_FAILED(rc)) { vcd_do_device_state_transition(p_drv_ctxt, VCD_DEVICE_STATE_NOT_INIT, DEVICE_STATE_EVENT_NUMBER (pf_init)); } else { if (p_dev_ctxt->config.pf_un_map_dev_base_addr) p_dev_ctxt->config.pf_un_map_dev_base_addr(); if (p_dev_ctxt->config.pf_deregister_isr) p_dev_ctxt->config.pf_deregister_isr(); if (b_done_create_timer && p_dev_ctxt->config.pf_timer_release) p_dev_ctxt->config.pf_timer_release(p_dev_ctxt-> p_hw_timer_handle); } return rc;}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:60,
示例2: vcd_term_driver_contextvoid vcd_term_driver_context(struct vcd_drv_ctxt_type_t *p_drv_ctxt){ struct vcd_dev_ctxt_type *p_dev_ctxt = &p_drv_ctxt->dev_ctxt; VCD_MSG_HIGH("All driver instances terminated"); if (p_dev_ctxt->config.pf_deregister_isr) p_dev_ctxt->config.pf_deregister_isr(); if (p_dev_ctxt->config.pf_un_map_dev_base_addr) p_dev_ctxt->config.pf_un_map_dev_base_addr(); if (p_dev_ctxt->config.pf_timer_release) p_dev_ctxt->config.pf_timer_release( p_dev_ctxt->p_hw_timer_handle); vcd_free(p_dev_ctxt->a_trans_tbl); memset(p_dev_ctxt, 0, sizeof(struct vcd_dev_ctxt_type)); vcd_do_device_state_transition(p_drv_ctxt, VCD_DEVICE_STATE_NULL, DEVICE_STATE_EVENT_NUMBER(pf_term));}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:25,
示例3: vcd_handle_device_init_failedvoid vcd_handle_device_init_failed(struct vcd_drv_ctxt_type_t *p_drv_ctxt, u32 status){ struct vcd_clnt_ctxt_type_t *p_client; struct vcd_clnt_ctxt_type_t *p_tmp_client; VCD_MSG_ERROR("Device init failed. status = %d", status); p_client = p_drv_ctxt->dev_ctxt.p_cctxt_list_head; while (p_client) { p_client->callback(VCD_EVT_RESP_OPEN, status, NULL, 0, 0, p_client->p_client_data); p_tmp_client = p_client; p_client = p_client->p_next; vcd_destroy_client_context(p_tmp_client); } if (ddl_device_release(NULL)) VCD_MSG_ERROR("Failed: ddl_device_release"); (void)sched_destroy(p_drv_ctxt->dev_ctxt.sched_hdl); p_drv_ctxt->dev_ctxt.sched_hdl = NULL; if (vcd_power_event(&p_drv_ctxt->dev_ctxt, NULL, VCD_EVT_PWR_DEV_INIT_FAIL)) VCD_MSG_ERROR("VCD_EVT_PWR_DEV_INIT_FAIL failed"); vcd_do_device_state_transition(p_drv_ctxt, VCD_DEVICE_STATE_NOT_INIT, DEVICE_STATE_EVENT_NUMBER(pf_dev_cb));}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:32,
示例4: vcd_handle_device_err_fatalvoid vcd_handle_device_err_fatal(struct vcd_dev_ctxt_type *p_dev_ctxt, struct vcd_clnt_ctxt_type_t *p_trig_clnt){ struct vcd_clnt_ctxt_type_t *p_cctxt = p_dev_ctxt->p_cctxt_list_head; struct vcd_clnt_ctxt_type_t *p_tmp_clnt = NULL; VCD_MSG_LOW("vcd_handle_device_err_fatal:"); while (p_cctxt) { p_tmp_clnt = p_cctxt; p_cctxt = p_cctxt->p_next; if (p_tmp_clnt != p_trig_clnt) vcd_clnt_handle_device_err_fatal(p_tmp_clnt, VCD_EVT_IND_HWERRFATAL); } p_dev_ctxt->e_pending_cmd = VCD_CMD_DEVICE_RESET; if (!p_dev_ctxt->p_cctxt_list_head) vcd_do_device_state_transition(vcd_get_drv_context(), VCD_DEVICE_STATE_NOT_INIT, DEVICE_STATE_EVENT_NUMBER(pf_timeout)); else vcd_do_device_state_transition(vcd_get_drv_context(), VCD_DEVICE_STATE_INVALID, DEVICE_STATE_EVENT_NUMBER(pf_dev_cb));}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:23,
示例5: vcd_continuevoid vcd_continue(void){ struct vcd_drv_ctxt_type_t *p_drv_ctxt; struct vcd_dev_ctxt_type *p_dev_ctxt; u32 b_continue; struct vcd_transc_type *p_transc; u32 rc; VCD_MSG_LOW("vcd_continue:"); p_drv_ctxt = vcd_get_drv_context(); p_dev_ctxt = &p_drv_ctxt->dev_ctxt; p_dev_ctxt->b_continue = FALSE; if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_INIT) { VCD_MSG_HIGH("VCD_CMD_DEVICE_INIT is pending"); p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE; (void)vcd_init_device_context(p_drv_ctxt, DEVICE_STATE_EVENT_NUMBER(pf_open)); } else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_TERM) { VCD_MSG_HIGH("VCD_CMD_DEVICE_TERM is pending"); p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE; (void)vcd_deinit_device_context(p_drv_ctxt, DEVICE_STATE_EVENT_NUMBER(pf_close)); } else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_RESET) { VCD_MSG_HIGH("VCD_CMD_DEVICE_RESET is pending"); p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE; (void)vcd_reset_device_context(p_drv_ctxt, DEVICE_STATE_EVENT_NUMBER(pf_dev_cb)); } else { if (p_dev_ctxt->b_set_perf_lvl_pending) { rc = vcd_power_event(p_dev_ctxt, NULL, VCD_EVT_PWR_DEV_SET_PERFLVL); if (VCD_FAILED(rc)) { VCD_MSG_ERROR ("VCD_EVT_PWR_CLNT_SET_PERFLVL failed"); VCD_MSG_HIGH ("Not running at desired perf level." "curr=%d, reqd=%d", p_dev_ctxt->n_curr_perf_lvl, p_dev_ctxt->n_reqd_perf_lvl); } else { p_dev_ctxt->b_set_perf_lvl_pending = FALSE; } } do { b_continue = FALSE; if (vcd_get_command_channel_in_loop (p_dev_ctxt, &p_transc)) { if (vcd_submit_command_in_continue(p_dev_ctxt, p_transc)) b_continue = TRUE; else { VCD_MSG_MED ("No more commands to submit"); vcd_release_command_channel(p_dev_ctxt, p_transc); vcd_release_interim_command_channels (p_dev_ctxt); } } } while (b_continue); do { b_continue = FALSE; if (vcd_get_frame_channel_in_loop (p_dev_ctxt, &p_transc)) { if (vcd_try_submit_frame_in_continue(p_dev_ctxt, p_transc)) { b_continue = TRUE; } else { VCD_MSG_MED("No more frames to submit"); vcd_release_frame_channel(p_dev_ctxt, p_transc); vcd_release_interim_frame_channels (p_dev_ctxt); } } } while (b_continue); if (!vcd_core_is_busy(p_dev_ctxt)) { rc = vcd_power_event(p_dev_ctxt, NULL, VCD_EVT_PWR_CLNT_CMD_END); if (VCD_FAILED(rc)) VCD_MSG_ERROR("Failed:" "VCD_EVT_PWR_CLNT_CMD_END");//.........这里部分代码省略.........
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:101,
注:本文中的DEVICE_STATE_EVENT_NUMBER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DEVMETHOD函数代码示例 C++ DEVICE_LOG函数代码示例 |