Changeset 984a9ba in mainline for uspace/drv/intctl/i8259/i8259.c
- Timestamp:
- 2018-07-05T09:34:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/intctl/i8259/i8259.c
r76f566d r984a9ba 89 89 /** Handle one connection to i8259. 90 90 * 91 * @param iid Hash of the request that opened the connection.92 91 * @param icall Call data of the request that opened the connection. 93 * @param arg 94 * /95 static void i8259_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 96 { 97 cap_call_handle_t chandle; 92 * @param arg Local argument. 93 * 94 */ 95 static void i8259_connection(ipc_call_t *icall, void *arg) 96 { 98 97 ipc_call_t call; 99 98 i8259_t *i8259 = NULL /* XXX */; … … 102 101 * Answer the first IPC_M_CONNECT_ME_TO call. 103 102 */ 104 async_answer_0(icall _handle, EOK);105 106 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));103 async_answer_0(icall, EOK); 104 105 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 107 106 108 107 while (true) { 109 chandle =async_get_call(&call);108 async_get_call(&call); 110 109 111 110 if (!IPC_GET_IMETHOD(call)) { 112 111 /* The other side has hung up. */ 113 async_answer_0( chandle, EOK);112 async_answer_0(&call, EOK); 114 113 return; 115 114 } … … 117 116 switch (IPC_GET_IMETHOD(call)) { 118 117 case IRC_ENABLE_INTERRUPT: 119 async_answer_0( chandle, pic_enable_irq(i8259,118 async_answer_0(&call, pic_enable_irq(i8259, 120 119 IPC_GET_ARG1(call))); 121 120 break; 122 121 case IRC_DISABLE_INTERRUPT: 123 122 /* XXX TODO */ 124 async_answer_0( chandle, EOK);123 async_answer_0(&call, EOK); 125 124 break; 126 125 case IRC_CLEAR_INTERRUPT: 127 126 /* Noop */ 128 async_answer_0( chandle, EOK);127 async_answer_0(&call, EOK); 129 128 break; 130 129 default: 131 async_answer_0( chandle, EINVAL);130 async_answer_0(&call, EINVAL); 132 131 break; 133 132 }
Note:
See TracChangeset
for help on using the changeset viewer.