Changeset 6fd365d in mainline for uspace/lib/drv/generic/remote_hw_res.c
- Timestamp:
- 2012-08-18T14:20:28Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1864948
- Parents:
- bc6762f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_hw_res.c
rbc6762f r6fd365d 46 46 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_callid_t, 47 47 ipc_call_t *); 48 static void remote_hw_res_dma_channel_remain(ddf_fun_t *, void *, ipc_callid_t, 49 ipc_call_t *); 48 50 49 51 static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { … … 51 53 [HW_RES_ENABLE_INTERRUPT] = &remote_hw_res_enable_interrupt, 52 54 [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup, 55 [HW_RES_DMA_CHANNEL_REMAIN] = &remote_hw_res_dma_channel_remain, 53 56 }; 54 57 … … 117 120 } 118 121 122 static void remote_hw_res_dma_channel_remain(ddf_fun_t *fun, void *ops, 123 ipc_callid_t callid, ipc_call_t *call) 124 { 125 hw_res_ops_t *hw_res_ops = ops; 126 127 if (hw_res_ops->dma_channel_setup == NULL) { 128 async_answer_0(callid, ENOTSUP); 129 return; 130 } 131 const unsigned channel = DEV_IPC_GET_ARG1(*call); 132 uint16_t remain = 0; 133 const int ret = hw_res_ops->dma_channel_remain(fun, channel, &remain); 134 async_answer_1(callid, ret, remain); 135 } 119 136 /** 120 137 * @}
Note:
See TracChangeset
for help on using the changeset viewer.