1usb_get_current_frame_numbKeerr(n9eFl)Functions for Dursibv_egrest_current_frame_number(9F)
2
3
4

NAME

6       usb_get_current_frame_number - Return current logical usb frame number
7

SYNOPSIS

9       #include <sys/usb/usba.h>
10
11
12
13       usb_frame_number_t usb_get_current_frame_number(dev_info_t *dip);
14
15

INTERFACE LEVEL

17       Solaris DDI specific (Solaris DDI)
18

PARAMETERS

20       dip    Pointer to the device's dev_info structure.
21
22

DESCRIPTION

24       The usb_get_current_frame_number() function retrieves the current logi‐
25       cal USB frame number.
26
27
28       Isochronous requests can be started on a particular numbered frame.  An
29       offset  number  of  frames (typically between 4 and 10) can be added to
30       the current logical frame number to specify the number of  an  upcoming
31       frame to start an isochronous request.
32
33
34       The  USB  specification  requires  that the frame frequency (the period
35       between start-of-frame packets) is one millisecond.  The Solaris  oper‐
36       ating environment USB implementation uses a running counter of the num‐
37       ber of milliseconds since boot as the current logical frame number.
38

RETURN VALUES

40       On success, the  usb_get_current_frame_number()  function  returns  the
41       current  USB  frame number. On failure it returns 0. The function fails
42       if dip is NULL.
43

CONTEXT

45       May be called from user, kernel or interrupt context.
46

EXAMPLES

48             usb_pipe_handle_t handle;
49             usb_frame_number_t offset = 10;
50             usb_isoc_req_t *isoc_req;
51
52             isoc_req = usb_alloc_isoc_req(...);
53               ...
54               ...
55             isoc_req->isoc_frame_no = usb_get_current_frame_number(dip) + offset;
56             isoc_req->isoc_attributes = USB_ATTRS_ISOC_START_FRAME;
57               ...
58               ...
59             if (usb_pipe_isoc_xfer(handle, isoc_req, 0) != USB_SUCCESS) {
60               ...
61             }
62
63

ATTRIBUTES

65       See attributes(5) for descriptions of the following attributes:
66
67
68
69
70       ┌─────────────────────────────┬─────────────────────────────┐
71       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
72       ├─────────────────────────────┼─────────────────────────────┤
73       │Architecture                 │PCI-based systems            │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │Interface stability          │Committed                    │
76       ├─────────────────────────────┼─────────────────────────────┤
77       │Availability                 │SUNWusb                      │
78       └─────────────────────────────┴─────────────────────────────┘
79

SEE ALSO

81       attributes(5),                                  usb_alloc_isoc_req(9F),
82       usb_get_max_pkts_per_isoc_request(9F),          usb_pipe_isoc_xfer(9F),
83       usb_pipe_get_max_bulk_transfer_size(9F), usb_isoc_request(9S)
84
85
86
87SunOS 5.11                       25 July 2004 usb_get_current_frame_number(9F)
Impressum