Changeset d6b1359 in mainline
- Timestamp:
- 2011-01-09T18:00:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80bffdb0
- Parents:
- 0c70f7e (diff), 8871dba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 14 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/hw/misc/virtchar1.c
r0c70f7e rd6b1359 40 40 #include <sys/types.h> 41 41 #include <async.h> 42 #include <device/char .h>42 #include <device/char_dev.h> 43 43 #include <str.h> 44 44 #include <vfs/vfs.h> 45 45 #include <sys/stat.h> 46 46 #include <fcntl.h> 47 #include <device/char.h>48 47 #include "../../tester.h" 49 48 … … 79 78 size_t i; 80 79 char buffer[BUFFER_SIZE]; 81 read_dev(phone, buffer, BUFFER_SIZE);80 char_dev_read(phone, buffer, BUFFER_SIZE); 82 81 TPRINTF(" ...verifying that we read zeroes only...\n"); 83 82 for (i = 0; i < BUFFER_SIZE; i++) { -
uspace/app/tester/hw/serial/serial1.c
r0c70f7e rd6b1359 45 45 #include <ipc/devman.h> 46 46 #include <devman.h> 47 #include <device/char .h>47 #include <device/char_dev.h> 48 48 #include <str.h> 49 49 #include <ipc/serial_ctl.h> … … 121 121 size_t total = 0; 122 122 while (total < cnt) { 123 ssize_t read = read_dev(phone, buf, cnt - total);123 ssize_t read = char_dev_read(phone, buf, cnt - total); 124 124 125 125 if (read < 0) { … … 152 152 * direction of data transfer. 153 153 */ 154 ssize_t written = write_dev(phone, buf, read);154 ssize_t written = char_dev_write(phone, buf, read); 155 155 156 156 if (written < 0) { … … 181 181 182 182 size_t eot_size = str_size(EOT); 183 ssize_t written = write_dev(phone, (void *) EOT, eot_size);183 ssize_t written = char_dev_write(phone, (void *) EOT, eot_size); 184 184 185 185 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, -
uspace/drv/isa/isa.c
r0c70f7e rd6b1359 51 51 52 52 #include <driver.h> 53 #include < resource.h>53 #include <ops/hw_res.h> 54 54 55 55 #include <devman.h> … … 84 84 } 85 85 86 static resource_iface_t isa_child_res_iface= {86 static hw_res_ops_t isa_child_hw_res_ops = { 87 87 &isa_get_child_resources, 88 88 &isa_enable_child_interrupt … … 502 502 static void isa_init() 503 503 { 504 isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_ res_iface;504 isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_hw_res_ops; 505 505 } 506 506 -
uspace/drv/ns8250/ns8250.c
r0c70f7e rd6b1359 53 53 54 54 #include <driver.h> 55 #include <char.h> 56 #include <resource.h> 55 #include <ops/char_dev.h> 57 56 58 57 #include <devman.h> … … 227 226 228 227 /** The character interface's callbacks. */ 229 static char_ iface_t ns8250_char_iface= {228 static char_dev_ops_t ns8250_char_dev_ops = { 230 229 .read = &ns8250_read, 231 230 .write = &ns8250_write … … 347 346 348 347 /* Get hw resources. */ 349 ret = get_hw_resources(dev->parent_phone, &hw_resources);348 ret = hw_res_get_resource_list(dev->parent_phone, &hw_resources); 350 349 if (ret != EOK) { 351 350 printf(NAME ": failed to get hw resources for the device " … … 394 393 } 395 394 396 clean_hw_resource_list(&hw_resources);395 hw_res_clean_resource_list(&hw_resources); 397 396 return ret; 398 397 399 398 failed: 400 399 ns8250_dev_cleanup(dev); 401 clean_hw_resource_list(&hw_resources);400 hw_res_clean_resource_list(&hw_resources); 402 401 return ret; 403 402 } … … 924 923 ns8250_dev_ops.close = &ns8250_close; 925 924 926 ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_ iface;925 ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_dev_ops; 927 926 ns8250_dev_ops.default_handler = &ns8250_default_handler; 928 927 } -
uspace/drv/pciintel/pci.c
r0c70f7e rd6b1359 49 49 #include <ipc/devman.h> 50 50 #include <ipc/dev_iface.h> 51 #include < resource.h>51 #include <ops/hw_res.h> 52 52 #include <device/hw_res.h> 53 53 #include <ddi.h> … … 77 77 } 78 78 79 static resource_iface_t pciintel_child_res_iface= {79 static hw_res_ops_t pciintel_child_hw_res_ops = { 80 80 &pciintel_get_child_resources, 81 81 &pciintel_enable_child_interrupt … … 473 473 hw_resource_list_t hw_resources; 474 474 475 rc = get_hw_resources(dev->parent_phone, &hw_resources);475 rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources); 476 476 if (rc != EOK) { 477 477 printf(NAME ": pci_add_device failed to get hw resources for " … … 497 497 delete_pci_bus_data(bus_data); 498 498 ipc_hangup(dev->parent_phone); 499 clean_hw_resource_list(&hw_resources);499 hw_res_clean_resource_list(&hw_resources); 500 500 return EADDRNOTAVAIL; 501 501 } … … 508 508 pci_bus_scan(dev, 0); 509 509 510 clean_hw_resource_list(&hw_resources);510 hw_res_clean_resource_list(&hw_resources); 511 511 512 512 return EOK; … … 515 515 static void pciintel_init(void) 516 516 { 517 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_ res_iface;517 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_hw_res_ops; 518 518 } 519 519 … … 537 537 { 538 538 if (dev_data != NULL) { 539 clean_hw_resource_list(&dev_data->hw_resources);539 hw_res_clean_resource_list(&dev_data->hw_resources); 540 540 free(dev_data); 541 541 } -
uspace/drv/rootpc/rootpc.c
r0c70f7e rd6b1359 50 50 #include <ipc/devman.h> 51 51 #include <ipc/dev_iface.h> 52 #include < resource.h>52 #include <ops/hw_res.h> 53 53 #include <device/hw_res.h> 54 54 … … 107 107 } 108 108 109 static resource_iface_t child_res_iface= {109 static hw_res_ops_t child_hw_res_ops = { 110 110 &rootpc_get_child_resources, 111 111 &rootpc_enable_child_interrupt … … 190 190 static void root_pc_init(void) 191 191 { 192 rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_ res_iface;192 rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_hw_res_ops; 193 193 } 194 194 -
uspace/drv/test1/char.c
r0c70f7e rd6b1359 33 33 #include <errno.h> 34 34 #include <mem.h> 35 #include < char.h>35 #include <ops/char_dev.h> 36 36 37 37 #include "test1.h" … … 46 46 } 47 47 48 static char_ iface_t char_interface= {48 static char_dev_ops_t char_dev_ops = { 49 49 .read = &impl_char_read, 50 50 .write = &imp_char_write … … 52 52 53 53 device_ops_t char_device_ops = { 54 .interfaces[CHAR_DEV_IFACE] = &char_ interface54 .interfaces[CHAR_DEV_IFACE] = &char_dev_ops 55 55 }; 56 56 -
uspace/lib/c/Makefile
r0c70f7e rd6b1359 59 59 generic/devman.c \ 60 60 generic/device/hw_res.c \ 61 generic/device/char .c \61 generic/device/char_dev.c \ 62 62 generic/event.c \ 63 63 generic/errno.c \ -
uspace/lib/c/generic/device/char_dev.c
r0c70f7e rd6b1359 34 34 35 35 #include <ipc/dev_iface.h> 36 #include <device/char .h>36 #include <device/char_dev.h> 37 37 #include <errno.h> 38 38 #include <async.h> … … 45 45 * using its character interface. 46 46 * 47 * @param dev_phone Phone to the device. 48 * @param buf Buffer for the data read 49 * from or written to the device. 50 * @param len Maximum length of the data to be 51 * read or written. 52 * @param read Read from the device if true, 53 * write to it otherwise. 47 * @param dev_phone Phone to the device. 48 * @param buf Buffer for the data read from or written to the device. 49 * @param size Maximum size of data (in bytes) to be read or written. 50 * @param read Read from the device if true, write to it otherwise. 54 51 * 55 * @return Non-negative number of bytes actually read 56 * from or written to the device on success, 57 * negative error number otherwise. 58 * 52 * @return Non-negative number of bytes actually read from or 53 * written to the device on success, negative error number 54 * otherwise. 59 55 */ 60 static ssize_t rw_dev(int dev_phone, void *buf, size_t len, bool read)56 static ssize_t char_dev_rw(int dev_phone, void *buf, size_t size, bool read) 61 57 { 62 58 async_serialize_start(); … … 68 64 if (read) { 69 65 req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), 70 CHAR_ READ_DEV, &answer);71 ret = async_data_read_start(dev_phone, buf, len);66 CHAR_DEV_READ, &answer); 67 ret = async_data_read_start(dev_phone, buf, size); 72 68 } else { 73 69 req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), 74 CHAR_ WRITE_DEV, &answer);75 ret = async_data_write_start(dev_phone, buf, len);70 CHAR_DEV_WRITE, &answer); 71 ret = async_data_write_start(dev_phone, buf, size); 76 72 } 77 73 … … 82 78 if (rc == EOK) 83 79 return (ssize_t) ret; 84 80 85 81 return (ssize_t) rc; 86 82 } … … 96 92 } 97 93 98 /** Read from device using its character interface.94 /** Read from character device. 99 95 * 100 * @param dev_phone Phone to the device. 101 * @param buf Output buffer for the data 102 * read from the device. 103 * @param len Maximum length of the data to be read. 96 * @param dev_phone Phone to the device. 97 * @param buf Output buffer for the data read from the device. 98 * @param size Maximum size (in bytes) of the data to be read. 104 99 * 105 * @return Non-negative number of bytes actually read 106 * from the device on success, negative error 107 * number otherwise. 108 * 100 * @return Non-negative number of bytes actually read from the 101 * device on success, negative error number otherwise. 109 102 */ 110 ssize_t read_dev(int dev_phone, void *buf, size_t len)103 ssize_t char_dev_read(int dev_phone, void *buf, size_t size) 111 104 { 112 return rw_dev(dev_phone, buf, len, true);105 return char_dev_rw(dev_phone, buf, size, true); 113 106 } 114 107 115 /** Write to device using its character interface.108 /** Write to character device. 116 109 * 117 * @param dev_phone 118 * @param buf Input buffer containg the data119 * to be written to thedevice.120 * @param len Maximum lengthof the data to be written.110 * @param dev_phone Phone to the device. 111 * @param buf Input buffer containg the data to be written to the 112 * device. 113 * @param size Maximum size (in bytes) of the data to be written. 121 114 * 122 * @return Non-negative number of bytes actually written 123 * to the device on success, negative error number 124 * otherwise. 125 * 115 * @return Non-negative number of bytes actually written to the 116 * device on success, negative error number otherwise. 126 117 */ 127 ssize_t write_dev(int dev_phone, void *buf, size_t len)118 ssize_t char_dev_write(int dev_phone, void *buf, size_t size) 128 119 { 129 return rw_dev(dev_phone, buf, len, false);120 return char_dev_rw(dev_phone, buf, size, false); 130 121 } 131 122 -
uspace/lib/c/generic/device/hw_res.c
r0c70f7e rd6b1359 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 29 /** @addtogroup libc 30 30 * @{ … … 32 32 /** @file 33 33 */ 34 34 35 35 #include <device/hw_res.h> 36 36 #include <errno.h> … … 38 38 #include <malloc.h> 39 39 40 int get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)40 int hw_res_get_resource_list(int dev_phone, hw_resource_list_t *hw_resources) 41 41 { 42 42 sysarg_t count = 0; 43 int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count); 43 44 int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), 45 HW_RES_GET_RESOURCE_LIST, &count); 46 44 47 hw_resources->count = count; 45 48 if (rc != EOK) … … 57 60 return rc; 58 61 } 59 62 60 63 return EOK; 61 64 } 62 65 63 bool enable_interrupt(int dev_phone)66 bool hw_res_enable_interrupt(int dev_phone) 64 67 { 65 int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), ENABLE_INTERRUPT); 68 int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), 69 HW_RES_ENABLE_INTERRUPT); 70 66 71 return rc == EOK; 67 72 } 68 69 70 71 /** @} 73 74 /** @} 72 75 */ -
uspace/lib/c/include/device/char_dev.h
r0c70f7e rd6b1359 27 27 */ 28 28 29 29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef LIBC_DEVICE_ HW_RES_H_36 #define LIBC_DEVICE_ HW_RES_H_35 #ifndef LIBC_DEVICE_CHAR_DEV_H_ 36 #define LIBC_DEVICE_CHAR_DEV_H_ 37 37 38 38 typedef enum { 39 CHAR_ READ_DEV= 0,40 CHAR_ WRITE_DEV41 } hw_res_funcs_t;39 CHAR_DEV_READ = 0, 40 CHAR_DEV_WRITE 41 } char_dev_method_t; 42 42 43 ssize_t read_dev(int dev_phone, void *buf, size_t len);44 ssize_t write_dev(int dev_phone, void *buf, size_t len);43 ssize_t char_dev_read(int dev_phone, void *buf, size_t len); 44 ssize_t char_dev_write(int dev_phone, void *buf, size_t len); 45 45 46 46 #endif -
uspace/lib/c/include/device/hw_res.h
r0c70f7e rd6b1359 27 27 */ 28 28 29 29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 39 39 #include <bool.h> 40 40 41 // HW resource provider interface 41 /** HW resource provider interface */ 42 typedef enum { 43 HW_RES_GET_RESOURCE_LIST = 0, 44 HW_RES_ENABLE_INTERRUPT 45 } hw_res_method_t; 42 46 43 typedef enum { 44 GET_RESOURCE_LIST = 0, 45 ENABLE_INTERRUPT 46 } hw_res_funcs_t; 47 48 /** HW resource types. */ 47 /** HW resource types */ 49 48 typedef enum { 50 49 INTERRUPT, … … 58 57 } endianness_t; 59 58 60 61 /** HW resource (e.g. interrupt, memory register, i/o register etc.). */ 62 typedef struct hw_resource { 59 /** HW resource (e.g. interrupt, memory register, i/o register etc.) */ 60 typedef struct { 63 61 hw_res_type_t type; 64 62 union { 65 63 struct { 66 64 uint64_t address; 67 endianness_t endianness; 68 size_t size; 65 endianness_t endianness; 66 size_t size; 69 67 } mem_range; 68 70 69 struct { 71 70 uint64_t address; 72 endianness_t endianness; 73 size_t size; 71 endianness_t endianness; 72 size_t size; 74 73 } io_range; 74 75 75 struct { 76 int irq; 77 } interrupt; 78 } res; 76 int irq; 77 } interrupt; 78 } res; 79 79 } hw_resource_t; 80 80 81 typedef struct hw_resource_list{81 typedef struct { 82 82 size_t count; 83 hw_resource_t *resources; 83 hw_resource_t *resources; 84 84 } hw_resource_list_t; 85 85 86 static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)86 static inline void hw_res_clean_resource_list(hw_resource_list_t *hw_res) 87 87 { 88 if (NULL != hw_res->resources) {88 if (hw_res->resources != NULL) { 89 89 free(hw_res->resources); 90 90 91 hw_res->resources = NULL; 91 92 } 92 hw_res->count = 0; 93 94 hw_res->count = 0; 93 95 } 94 96 95 96 97 extern int get_hw_resources(int, hw_resource_list_t *); 98 extern bool enable_interrupt(int); 99 97 extern int hw_res_get_resource_list(int, hw_resource_list_t *); 98 extern bool hw_res_enable_interrupt(int); 100 99 101 100 #endif -
uspace/lib/c/include/ipc/dev_iface.h
r0c70f7e rd6b1359 35 35 #include <libarch/types.h> 36 36 37 typedef enum { 38 HW_RES_DEV_IFACE = 0, 37 typedef enum { 38 HW_RES_DEV_IFACE = 0, 39 39 CHAR_DEV_IFACE, 40 // TODO add more interfaces41 40 DEV_IFACE_MAX 42 41 } dev_inferface_idx_t; -
uspace/lib/drv/Makefile
r0c70f7e rd6b1359 35 35 generic/driver.c \ 36 36 generic/dev_iface.c \ 37 generic/remote_ res.c \38 generic/remote_char .c37 generic/remote_hw_res.c \ 38 generic/remote_char_dev.c 39 39 40 40 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/drv/generic/dev_iface.c
r0c70f7e rd6b1359 37 37 38 38 #include "dev_iface.h" 39 #include "remote_ res.h"40 #include "remote_char .h"39 #include "remote_hw_res.h" 40 #include "remote_char_dev.h" 41 41 42 42 static iface_dipatch_table_t remote_ifaces = { 43 43 .ifaces = { 44 &remote_ res_iface,45 &remote_char_ iface44 &remote_hw_res_iface, 45 &remote_char_dev_iface 46 46 } 47 47 }; 48 48 49 49 remote_iface_t* get_remote_iface(int idx) 50 { 50 { 51 51 assert(is_valid_iface_idx(idx)); 52 52 return remote_ifaces.ifaces[idx]; -
uspace/lib/drv/generic/remote_char_dev.c
r0c70f7e rd6b1359 37 37 #include <errno.h> 38 38 39 #include " char.h"39 #include "ops/char_dev.h" 40 40 #include "driver.h" 41 41 … … 46 46 47 47 /** Remote character interface operations. */ 48 static remote_iface_func_ptr_t remote_char_ iface_ops[] = {48 static remote_iface_func_ptr_t remote_char_dev_iface_ops[] = { 49 49 &remote_char_read, 50 50 &remote_char_write … … 56 56 * character interface. 57 57 */ 58 remote_iface_t remote_char_ iface = {59 .method_count = sizeof(remote_char_ iface_ops) /58 remote_iface_t remote_char_dev_iface = { 59 .method_count = sizeof(remote_char_dev_iface_ops) / 60 60 sizeof(remote_iface_func_ptr_t), 61 .methods = remote_char_ iface_ops61 .methods = remote_char_dev_iface_ops 62 62 }; 63 63 … … 74 74 remote_char_read(device_t *dev, void *iface, ipc_callid_t callid, 75 75 ipc_call_t *call) 76 { 77 char_ iface_t *char_iface = (char_iface_t *) iface;76 { 77 char_dev_ops_t *char_iface = (char_dev_ops_t *) iface; 78 78 ipc_callid_t cid; 79 79 … … 122 122 ipc_call_t *call) 123 123 { 124 char_ iface_t *char_iface = (char_iface_t *) iface;124 char_dev_ops_t *char_iface = (char_dev_ops_t *) iface; 125 125 ipc_callid_t cid; 126 126 size_t len; … … 136 136 ipc_answer_0(callid, ENOTSUP); 137 137 return; 138 } 138 } 139 139 140 140 if (len > MAX_CHAR_RW_COUNT) -
uspace/lib/drv/generic/remote_hw_res.c
r0c70f7e rd6b1359 37 37 #include <errno.h> 38 38 39 #include "ops/hw_res.h" 39 40 #include "driver.h" 40 #include "resource.h"41 41 42 static void remote_res_get_resource s(device_t *, void *, ipc_callid_t,42 static void remote_res_get_resource_list(device_t *, void *, ipc_callid_t, 43 43 ipc_call_t *); 44 44 static void remote_res_enable_interrupt(device_t *, void *, ipc_callid_t, 45 45 ipc_call_t *); 46 46 47 static remote_iface_func_ptr_t remote_ res_iface_ops [] = {48 &remote_res_get_resource s,47 static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { 48 &remote_res_get_resource_list, 49 49 &remote_res_enable_interrupt 50 50 }; 51 51 52 remote_iface_t remote_ res_iface = {53 .method_count = sizeof(remote_ res_iface_ops) /52 remote_iface_t remote_hw_res_iface = { 53 .method_count = sizeof(remote_hw_res_iface_ops) / 54 54 sizeof(remote_iface_func_ptr_t), 55 .methods = remote_ res_iface_ops55 .methods = remote_hw_res_iface_ops 56 56 }; 57 57 … … 59 59 ipc_callid_t callid, ipc_call_t *call) 60 60 { 61 resource_iface_t *ires = (resource_iface_t *) iface;61 hw_res_ops_t *ires = (hw_res_ops_t *) iface; 62 62 63 63 if (NULL == ires->enable_interrupt) … … 69 69 } 70 70 71 static void remote_res_get_resource s(device_t *dev, void *iface,71 static void remote_res_get_resource_list(device_t *dev, void *iface, 72 72 ipc_callid_t callid, ipc_call_t *call) 73 73 { 74 resource_iface_t *ires = (resource_iface_t *) iface;75 if (NULL == ires->get_resource s) {74 hw_res_ops_t *ires = (hw_res_ops_t *) iface; 75 if (NULL == ires->get_resource_list) { 76 76 ipc_answer_0(callid, ENOTSUP); 77 77 return; 78 78 } 79 79 80 hw_resource_list_t *hw_resources = ires->get_resource s(dev);80 hw_resource_list_t *hw_resources = ires->get_resource_list(dev); 81 81 if (NULL == hw_resources){ 82 82 ipc_answer_0(callid, ENOENT); -
uspace/lib/drv/include/driver.h
r0c70f7e rd6b1359 41 41 #include <ipc/devman.h> 42 42 #include <ipc/dev_iface.h> 43 #include <device/hw_res.h>44 #include <device/char.h>45 43 #include <assert.h> 46 44 #include <ddi.h> -
uspace/lib/drv/include/ops/char_dev.h
r0c70f7e rd6b1359 33 33 */ 34 34 35 #ifndef LIBDRV_ CHAR_H_36 #define LIBDRV_ CHAR_H_35 #ifndef LIBDRV_OPS_CHAR_DEV_H_ 36 #define LIBDRV_OPS_CHAR_DEV_H_ 37 37 38 #include " driver.h"38 #include "../driver.h" 39 39 40 typedef struct char_iface{40 typedef struct { 41 41 int (*read)(device_t *, char *, size_t); 42 42 int (*write)(device_t *, char *, size_t); 43 } char_ iface_t;43 } char_dev_ops_t; 44 44 45 45 #endif -
uspace/lib/drv/include/ops/hw_res.h
r0c70f7e rd6b1359 33 33 */ 34 34 35 #ifndef LIBDRV_ RESOURCE_H_36 #define LIBDRV_ RESOURCE_H_35 #ifndef LIBDRV_OPS_HW_RES_H_ 36 #define LIBDRV_OPS_HW_RES_H_ 37 37 38 #include "driver.h" 38 #include <device/hw_res.h> 39 #include <sys/types.h> 39 40 40 typedef struct resource_iface { 41 hw_resource_list_t *(* get_resources)(device_t *); 41 #include "../driver.h" 42 43 typedef struct { 44 hw_resource_list_t *(*get_resource_list)(device_t *); 42 45 bool (*enable_interrupt)(device_t *); 43 } resource_iface_t; 44 46 } hw_res_ops_t; 45 47 46 48 #endif -
uspace/lib/drv/include/remote_char_dev.h
r0c70f7e rd6b1359 33 33 */ 34 34 35 #ifndef LIBDRV_REMOTE_ RES_H_36 #define LIBDRV_REMOTE_ RES_H_35 #ifndef LIBDRV_REMOTE_CHAR_DEV_H_ 36 #define LIBDRV_REMOTE_CHAR_DEV_H_ 37 37 38 remote_iface_t remote_res_iface;38 extern remote_iface_t remote_char_dev_iface; 39 39 40 40 #endif -
uspace/lib/drv/include/remote_hw_res.h
r0c70f7e rd6b1359 33 33 */ 34 34 35 #ifndef LIBDRV_REMOTE_ CHAR_H_36 #define LIBDRV_REMOTE_ CHAR_H_35 #ifndef LIBDRV_REMOTE_HW_RES_H_ 36 #define LIBDRV_REMOTE_HW_RES_H_ 37 37 38 remote_iface_t remote_char_iface;38 extern remote_iface_t remote_hw_res_iface; 39 39 40 40 #endif
Note:
See TracChangeset
for help on using the changeset viewer.