Changeset 03362fbd in mainline for uspace/lib/drv/include
- Timestamp:
- 2013-02-09T23:14:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 22dfd38
- Parents:
- b5d2e57 (diff), 005b765 (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/lib/drv/include
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/audio_mixer_iface.h
rb5d2e57 r03362fbd 39 39 40 40 #include <async.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 43 43 #include "ddf/driver.h" -
uspace/lib/drv/include/audio_pcm_iface.h
rb5d2e57 r03362fbd 38 38 39 39 #include <async.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 #include <loc.h> 42 42 #include <pcm/sample_format.h> -
uspace/lib/drv/include/ddf/driver.h
rb5d2e57 r03362fbd 42 42 #include "../dev_iface.h" 43 43 44 typedef struct ddf_dev ddf_dev_t;45 typedef struct ddf_fun ddf_fun_t;46 44 47 45 /* 48 46 * Device 49 47 */ 48 49 typedef struct ddf_dev ddf_dev_t; 50 typedef struct ddf_fun ddf_fun_t; 50 51 51 52 /** Devices operations */ … … 75 76 76 77 /** Device structure */ 77 struct ddf_dev { 78 /** 79 * Globally unique device identifier (assigned to the device by the 80 * device manager). 81 */ 82 devman_handle_t handle; 83 84 /** Reference count */ 85 atomic_t refcnt; 86 87 /** 88 * Session to the parent device driver (if it is different from this 89 * driver) 90 */ 91 async_sess_t *parent_sess; 92 93 /** Device name */ 94 const char *name; 95 96 /** Driver-specific data associated with this device */ 97 void *driver_data; 98 99 /** Link in the list of devices handled by the driver */ 100 link_t link; 101 }; 78 struct ddf_dev; 102 79 103 80 /** Function structure */ 104 struct ddf_fun { 105 /** True if bound to the device manager */ 106 bool bound; 107 108 /** Function indentifier (asigned by device manager) */ 109 devman_handle_t handle; 110 111 /** Reference count */ 112 atomic_t refcnt; 113 114 /** Device which this function belogs to */ 115 ddf_dev_t *dev; 116 117 /** Function type */ 118 fun_type_t ftype; 119 120 /** Function name */ 121 const char *name; 122 123 /** List of device ids for driver matching */ 124 match_id_list_t match_ids; 125 126 /** Driver-specific data associated with this function */ 127 void *driver_data; 128 129 /** Implementation of operations provided by this function */ 130 ddf_dev_ops_t *ops; 131 132 /** Connection handler or @c NULL to use the DDF default handler. */ 133 async_client_conn_t conn_handler; 134 135 /** Link in the list of functions handled by the driver */ 136 link_t link; 137 }; 81 struct ddf_fun; 138 82 139 83 /* … … 167 111 } driver_t; 168 112 113 /** XXX Only to transition USB */ 114 #ifdef _DDF_DATA_IMPLANT 115 extern void ddf_fun_data_implant(ddf_fun_t *, void *); 116 #endif 117 169 118 extern int ddf_driver_main(driver_t *); 170 119 171 120 extern void *ddf_dev_data_alloc(ddf_dev_t *, size_t); 121 extern void *ddf_dev_data_get(ddf_dev_t *); 122 extern devman_handle_t ddf_dev_get_handle(ddf_dev_t *); 123 extern const char *ddf_dev_get_name(ddf_dev_t *); 124 extern async_sess_t *ddf_dev_parent_sess_create(ddf_dev_t *, exch_mgmt_t); 125 extern async_sess_t *ddf_dev_parent_sess_get(ddf_dev_t *); 172 126 extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *); 127 extern devman_handle_t ddf_fun_get_handle(ddf_fun_t *); 173 128 extern void ddf_fun_destroy(ddf_fun_t *); 174 129 extern void *ddf_fun_data_alloc(ddf_fun_t *, size_t); 130 extern void *ddf_fun_data_get(ddf_fun_t *); 131 extern const char *ddf_fun_get_name(ddf_fun_t *); 132 extern int ddf_fun_set_name(ddf_fun_t *, const char *); 133 extern ddf_dev_t *ddf_fun_get_dev(ddf_fun_t *); 175 134 extern int ddf_fun_bind(ddf_fun_t *); 176 135 extern int ddf_fun_unbind(ddf_fun_t *); … … 178 137 extern int ddf_fun_offline(ddf_fun_t *); 179 138 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 180 139 extern void ddf_fun_set_ops(ddf_fun_t *, ddf_dev_ops_t *); 140 extern void ddf_fun_set_conn_handler(ddf_fun_t *, async_client_conn_t); 181 141 extern int ddf_fun_add_to_category(ddf_fun_t *, const char *); 182 142 -
uspace/lib/drv/include/ddf/log.h
rb5d2e57 r03362fbd 35 35 36 36 #include <io/log.h> 37 #include <io/verify.h> 37 38 38 extern int ddf_log_init(const char *, log_level_t); 39 extern void ddf_msg(log_level_t, const char *, ...); 39 extern int ddf_log_init(const char *); 40 extern void ddf_msg(log_level_t, const char *, ...) 41 PRINTF_ATTRIBUTE(2, 3); 40 42 41 43 extern void ddf_dump_buffer(char *, size_t, const void *, size_t, size_t, 42 44 size_t); 45 46 #define ddf_log_fatal(msg...) ddf_msg(LVL_FATAL, msg) 47 #define ddf_log_error(msg...) ddf_msg(LVL_ERROR, msg) 48 #define ddf_log_warning(msg...) ddf_msg(LVL_WARN, msg) 49 #define ddf_log_note(msg...) ddf_msg(LVL_NOTE, msg) 50 #define ddf_log_debug(msg...) ddf_msg(LVL_DEBUG, msg) 51 #define ddf_log_verbose(msg...) ddf_msg(LVL_DEBUG2, msg) 43 52 44 53 #endif -
uspace/lib/drv/include/usbhc_iface.h
rb5d2e57 r03362fbd 42 42 #include "ddf/driver.h" 43 43 #include <usb/usb.h> 44 #include < bool.h>44 #include <stdbool.h> 45 45 46 46 int usbhc_request_address(async_exch_t *, usb_address_t *, bool, usb_speed_t);
Note:
See TracChangeset
for help on using the changeset viewer.