Changeset d51838f in mainline for uspace/lib/drv/generic/remote_hw_res.c
- Timestamp:
- 2017-10-14T22:49:18Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 75911d24
- Parents:
- ce732e74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_hw_res.c
rce732e74 rd51838f 45 45 static void remote_hw_res_enable_interrupt(ddf_fun_t *, void *, ipc_callid_t, 46 46 ipc_call_t *); 47 static void remote_hw_res_disable_interrupt(ddf_fun_t *, void *, ipc_callid_t, 48 ipc_call_t *); 49 static void remote_hw_res_clear_interrupt(ddf_fun_t *, void *, ipc_callid_t, 50 ipc_call_t *); 47 51 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_callid_t, 48 52 ipc_call_t *); … … 53 57 [HW_RES_GET_RESOURCE_LIST] = &remote_hw_res_get_resource_list, 54 58 [HW_RES_ENABLE_INTERRUPT] = &remote_hw_res_enable_interrupt, 59 [HW_RES_DISABLE_INTERRUPT] = &remote_hw_res_disable_interrupt, 60 [HW_RES_CLEAR_INTERRUPT] = &remote_hw_res_clear_interrupt, 55 61 [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup, 56 62 [HW_RES_DMA_CHANNEL_REMAIN] = &remote_hw_res_dma_channel_remain, … … 68 74 69 75 if (hw_res_ops->enable_interrupt == NULL) { 76 async_answer_0(callid, ENOTSUP); 77 return; 78 } 79 80 const int irq = DEV_IPC_GET_ARG1(*call); 81 const int ret = hw_res_ops->enable_interrupt(fun, irq); 82 async_answer_0(callid, ret); 83 } 84 85 static void remote_hw_res_disable_interrupt(ddf_fun_t *fun, void *ops, 86 ipc_callid_t callid, ipc_call_t *call) 87 { 88 hw_res_ops_t *hw_res_ops = (hw_res_ops_t *) ops; 89 90 if (hw_res_ops->disable_interrupt == NULL) { 91 async_answer_0(callid, ENOTSUP); 92 return; 93 } 94 95 const int irq = DEV_IPC_GET_ARG1(*call); 96 const int ret = hw_res_ops->disable_interrupt(fun, irq); 97 async_answer_0(callid, ret); 98 } 99 100 static void remote_hw_res_clear_interrupt(ddf_fun_t *fun, void *ops, 101 ipc_callid_t callid, ipc_call_t *call) 102 { 103 hw_res_ops_t *hw_res_ops = (hw_res_ops_t *) ops; 104 105 if (hw_res_ops->clear_interrupt == NULL) { 70 106 async_answer_0(callid, ENOTSUP); 71 107 return;
Note:
See TracChangeset
for help on using the changeset viewer.