UVC host library
Dependents: LifeCam WebcamServer
uvc/uvcsub.cpp@3:3eb41d749f9a, 2012-08-15 (annotated)
- Committer:
- va009039
- Date:
- Wed Aug 15 13:52:53 2012 +0000
- Revision:
- 3:3eb41d749f9a
- Parent:
- 0:b0f04c137829
add USB_USE_MALLOC
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:b0f04c137829 | 1 | #include "mbed.h" |
va009039 | 0:b0f04c137829 | 2 | #include "uvc.h" |
va009039 | 0:b0f04c137829 | 3 | |
va009039 | 0:b0f04c137829 | 4 | void uvc::wait(float s) |
va009039 | 0:b0f04c137829 | 5 | { |
va009039 | 0:b0f04c137829 | 6 | Timer t; |
va009039 | 0:b0f04c137829 | 7 | t.start(); |
va009039 | 0:b0f04c137829 | 8 | while(t.read() < s) { |
va009039 | 0:b0f04c137829 | 9 | poll(); |
va009039 | 0:b0f04c137829 | 10 | } |
va009039 | 0:b0f04c137829 | 11 | } |
va009039 | 0:b0f04c137829 | 12 | |
va009039 | 0:b0f04c137829 | 13 | void uvc::wait_ms(int ms) |
va009039 | 0:b0f04c137829 | 14 | { |
va009039 | 0:b0f04c137829 | 15 | Timer t; |
va009039 | 0:b0f04c137829 | 16 | t.start(); |
va009039 | 0:b0f04c137829 | 17 | while(t.read_ms() < ms) { |
va009039 | 0:b0f04c137829 | 18 | poll(); |
va009039 | 0:b0f04c137829 | 19 | } |
va009039 | 0:b0f04c137829 | 20 | } |
va009039 | 0:b0f04c137829 | 21 |