Changeset 9991c47 in mainline for uspace/lib/drv/generic/remote_hw_res.c
- Timestamp:
- 2011-11-13T22:18:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8a5962f
- Parents:
- e6def65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_hw_res.c
re6def65 r9991c47 43 43 static void remote_hw_res_enable_interrupt(ddf_fun_t *, void *, ipc_callid_t, 44 44 ipc_call_t *); 45 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_callid_t, 46 ipc_call_t *); 45 47 46 48 static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { 47 &remote_hw_res_get_resource_list, 48 &remote_hw_res_enable_interrupt 49 [HW_RES_GET_RESOURCE_LIST] = &remote_hw_res_get_resource_list, 50 [HW_RES_ENABLE_INTERRUPT] = &remote_hw_res_enable_interrupt, 51 [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup, 49 52 }; 50 53 … … 94 97 } 95 98 99 static void remote_hw_res_dma_channel_setup(ddf_fun_t *fun, void *ops, 100 ipc_callid_t callid, ipc_call_t *call) 101 { 102 hw_res_ops_t *hw_res_ops = ops; 103 104 if (hw_res_ops->dma_channel_setup == NULL) { 105 async_answer_0(callid, ENOTSUP); 106 return; 107 } 108 const unsigned channel = DEV_IPC_GET_ARG1(*call); 109 const uint32_t address = DEV_IPC_GET_ARG2(*call); 110 const uint16_t size = DEV_IPC_GET_ARG3(*call) & 0xffff; 111 const uint8_t mode = DEV_IPC_GET_ARG3(*call) >> 16; 112 113 const int ret = hw_res_ops->dma_channel_setup( 114 channel, address, size, mode); 115 async_answer_0(callid, ret); 116 } 117 96 118 /** 97 119 * @}
Note:
See TracChangeset
for help on using the changeset viewer.