Changeset 5cd136ab in mainline for uspace/lib
- Timestamp:
- 2010-04-02T13:37:58Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9a66bc2e
- Parents:
- 57937dd
- Location:
- uspace/lib
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/Makefile
r57937dd r5cd136ab 54 54 generic/devmap.c \ 55 55 generic/devman.c \ 56 generic/device/hw_res.c \ 56 57 generic/event.c \ 57 58 generic/errno.c \ -
uspace/lib/libc/generic/devman.c
r57937dd r5cd136ab 28 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 /** @addtogroup libc 32 * @{ 33 */ 34 /** @file 35 */ 30 36 31 37 #include <string.h> … … 193 199 } 194 200 } 201 202 int devman_device_connect(device_handle_t handle, unsigned int flags) 203 { 204 int phone; 205 206 if (flags & IPC_FLAG_BLOCKING) { 207 phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN, 208 DEVMAN_CONNECT_TO_DEVICE, handle); 209 } else { 210 phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN, 211 DEVMAN_CONNECT_TO_DEVICE, handle); 212 } 213 214 return phone; 215 } 216 217 int devman_parent_device_connect(device_handle_t handle, unsigned int flags) 218 { 219 int phone; 220 221 if (flags & IPC_FLAG_BLOCKING) { 222 phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN, 223 DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle); 224 } else { 225 phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN, 226 DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle); 227 } 228 229 return phone; 230 } 231 232 /** @} 233 */ -
uspace/lib/libc/include/devman.h
r57937dd r5cd136ab 48 48 int devman_child_device_register(const char *, match_id_list_t *, device_handle_t, device_handle_t *); 49 49 50 int devman_device_connect(device_handle_t handle, unsigned int flags); 51 int devman_parent_device_connect(device_handle_t handle, unsigned int flags); 52 50 53 51 54 #endif -
uspace/lib/libc/include/ipc/dev_iface.h
r57937dd r5cd136ab 77 77 int irq; 78 78 } intr; 79 } ;79 } res; 80 80 } hw_resource_t; 81 81 82 typedef struct {82 typedef struct hw_resource_list { 83 83 size_t count; 84 84 hw_resource_t *resources; -
uspace/lib/libc/include/ipc/devman.h
r57937dd r5cd136ab 116 116 DEVMAN_DRIVER = 1, 117 117 DEVMAN_CLIENT, 118 DEVMAN_CONNECT_TO_DEVICE 118 DEVMAN_CONNECT_TO_DEVICE, 119 DEVMAN_CONNECT_TO_PARENTS_DEVICE 119 120 } devman_interface_t; 120 121 -
uspace/lib/libdrv/generic/driver.c
r57937dd r5cd136ab 141 141 return; 142 142 } 143 144 145 // TODO - if the client is not a driver, check whether it is allowed to use the device 143 146 144 147 // TODO open the device (introduce some callbacks for opening and closing devices registered by the driver)
Note:
See TracChangeset
for help on using the changeset viewer.