Changes in uspace/lib/usb/src/recognise.c [bc1c6fb:3f0ef89d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/recognise.c
rbc1c6fb r3f0ef89d 31 31 */ 32 32 /** @file 33 * Functions for recognitionof attached devices.33 * @brief Functions for recognising kind of attached devices. 34 34 */ 35 35 #include <sys/types.h> … … 44 44 #include <assert.h> 45 45 46 /** Index to append after device name for uniqueness. */47 46 static size_t device_name_index = 0; 48 /** Mutex guard for device_name_index. */49 47 static FIBRIL_MUTEX_INITIALIZE(device_name_index_mutex); 50 48 51 /** DDF operations of child devices. */52 49 ddf_dev_ops_t child_ops = { 53 50 .interfaces[USB_DEV_IFACE] = &usb_iface_hub_child_impl 54 51 }; 55 52 56 /** Get integer part from BCD coded number. */57 53 #define BCD_INT(a) (((unsigned int)(a)) / 256) 58 /** Get fraction part from BCD coded number (as an integer, no less). */59 54 #define BCD_FRAC(a) (((unsigned int)(a)) % 256) 60 55 61 /** Format for BCD coded number to be used in printf. */62 56 #define BCD_FMT "%x.%x" 63 /** Arguments to printf for BCD coded number. */64 57 #define BCD_ARGS(a) BCD_INT((a)), BCD_FRAC((a)) 65 58 … … 120 113 } 121 114 122 /** Add match id to list or return with error code.123 *124 * @param match_ids List of match ids.125 * @param score Match id score.126 * @param format Format of the matching string127 * @param ... Arguments for the format.128 */129 115 #define ADD_MATCHID_OR_RETURN(match_ids, score, format, ...) \ 130 116 do { \ … … 138 124 /** Create device match ids based on its interface. 139 125 * 140 * @param[in] desc_device Device descriptor. 141 * @param[in] desc_interface Interface descriptor. 126 * @param[in] descriptor Interface descriptor. 142 127 * @param[out] matches Initialized list of match ids. 143 128 * @return Error code (the two mentioned are not the only ones). 144 129 * @retval EINVAL Invalid input parameters (expects non NULL pointers). 145 * @retval ENOENT Device class is not "use interface".130 * @retval ENOENT Interface does not specify class. 146 131 */ 147 132 int usb_device_create_match_ids_from_interface( … … 334 319 * @param[in] parent Parent device. 335 320 * @param[out] child_handle Handle of the child device. 336 * @param[in] dev_ops Child device ops.337 * @param[in] dev_data Arbitrary pointer to be stored in the child338 * as @c driver_data.339 * @param[out] child_fun Storage where pointer to allocated child function340 * will be written.341 321 * @return Error code. 342 322 */
Note:
See TracChangeset
for help on using the changeset viewer.