Changes between Version 25 and Version 26 of DeviceDrivers
- Timestamp:
- 2012-01-13T16:30:16Z (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeviceDrivers
v25 v26 253 253 == Exposing Driver Services to Clients == 254 254 255 All driver services are provided to clients (applications) via the location service. For each bound exposed function node the device framework creates a service whose name is based on the physical path of that function. The services are created in the ''devices'' namespace. This is mapped to the {{{/loc/devices}}} directory via ''locfs''. For example:255 All driver services are provided to clients (applications) via the location service. As such, they enjoy all benefits of such services, some of which we will note explicitly. For each bound exposed function node the device framework creates a service whose name is based on the physical path of that function. The services are created in the ''devices'' namespace. This is mapped to the {{{/loc/devices}}} directory via ''locfs''. For example: 256 256 257 257 {{{ … … 263 263 }}} 264 264 265 Often the driver will want to add the function service to one or more service categories. Service categories imply the protocol spoken by a service (and possibly also the intended use). This can be done using the DDF function:265 Each service currently running in the system is uniquely identified by a numerical identifier called ''service ID''. Often the driver will want to add the function service to one or more service categories. Service categories imply the protocol spoken by a service (and possibly also the intended use). This can be done using the DDF function: 266 266 {{{ 267 267 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name) 268 268 }}} 269 269 270 For example, the input server automatically picks up and opens any device in the categories ''keyboard'' and ''mouse''.270 Service consumers can find services by category. They can also register to receive notification when new services are registered. For example, the input server automatically picks up and opens any (device) service in the categories ''keyboard'' and ''mouse''. 271 271 272 272 == Traditional I/O Device Drivers ==