Motorola MCP750 Specifications Page 304

  • Download
  • Add to my manuals
  • Print
  • Page
    / 344
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 303
D
evice Driver Programming
17-28
Parameters
dev_desc the identifier for the device to which data are to be written. This identifier is
returned by the driver’s open routine.
buff_desc a pointer to the user I/O buffer that describes the physical locations from
which data are to be written
count the number of bytes to be written
req_id a pointer to the location to which the request identifier of the asynchronous
write operation is returned. The user process can use this identifier to obtain
the status of the operation. If req_id contains a null pointer, information about
the status of the request is not maintained. If req_id contains a pointer, the
user-level driver provides an identifier that the application must use to check
the status of the write request. (See “The acheck Routine” on page 17-28 and
“The await Routine” on page 17-29 for an explanation of the acheck and
await user-level driver routines. These routines can be supplied to allow
users to check the status of an asynchronous I/O request.)
Return Value
The driver’s awrite routine returns EUD_NOERROR if the operation is successfully
queued. It returns the appropriate user-level device driver error code if an error occurs (see
“Overview of the Device Configuration Program” on page 17-14 for a listing of the error
codes as defined in <userdriv.h>).
The acheck Routine 17
The driver’s acheck routine allows a user process to obtain the status of an asynchronous
I/O operation. It is called if the user process wants to poll rather than wait for completion
of an I/O request.
Specification
int xx_acheck(dev_desc
,
req_id
,
count)
int dev_desc
;
int req_id
;
int *count
;
Parameters
dev_desc the identifier for the device for which the asynchronous I/O operation is being
performed. This identifier is returned by the driver’s open routine.
req_id the request identifier of the asynchronous I/O operation for which the status is
being requested. This identifier is returned by the driver if a pointer is supplied
on a call to the driver’s aread or awrite routine.
count a pointer to the location to which the number of bytes transferred by the
specified I/O operation is returned
Page view 303
1 2 ... 299 300 301 302 303 304 305 306 307 308 309 ... 343 344

Comments to this Manuals

No comments