BaseUsbHost example program

Dependencies:   BaseUsbHost FATFileSystem mbed mbed-rtos

Committer:
va009039
Date:
Fri Jan 25 14:55:08 2013 +0000
Revision:
5:495f7536897b
Parent:
2:c10029b87439
update library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 2:c10029b87439 1 // UvcCam.h 2012/12/9
va009039 2:c10029b87439 2 #ifndef UVC_CAM_H
va009039 2:c10029b87439 3 #define UVC_CAM_H
va009039 2:c10029b87439 4
va009039 2:c10029b87439 5 #define UVC_160x120 2
va009039 2:c10029b87439 6 #define UVC_176x144 3
va009039 2:c10029b87439 7 #define UVC_320x176 4
va009039 2:c10029b87439 8 #define UVC_320x240 5
va009039 2:c10029b87439 9 #define UVC_352x288 6
va009039 2:c10029b87439 10 #define UVC_432x240 7
va009039 2:c10029b87439 11 #define UVC_640x480 1
va009039 2:c10029b87439 12 #define UVC_544x288 8
va009039 2:c10029b87439 13 #define UVC_640x360 9
va009039 2:c10029b87439 14 #define UVC_752x416 10
va009039 2:c10029b87439 15 #define UVC_800x448 11
va009039 2:c10029b87439 16 #define UVC_800x600 12
va009039 2:c10029b87439 17
va009039 2:c10029b87439 18 #define UVC_MJPEG 2
va009039 2:c10029b87439 19 #define UVC_YUY2 1
va009039 2:c10029b87439 20
va009039 2:c10029b87439 21 #define VERBOSE(...) do{printf(__VA_ARGS__);} while(0);
va009039 2:c10029b87439 22
va009039 2:c10029b87439 23 class UvcCam : public BaseUvc {
va009039 2:c10029b87439 24 public:
va009039 2:c10029b87439 25 UvcCam(int formatIndex = UVC_MJPEG, int frameIndex = UVC_160x120, uint32_t interval = _5FPS, ControlEp* ctlEp = NULL);
va009039 2:c10029b87439 26 static bool check(ControlEp* ctlEp);
va009039 2:c10029b87439 27 };
va009039 2:c10029b87439 28
va009039 2:c10029b87439 29 class UvcCfg {
va009039 2:c10029b87439 30 public:
va009039 2:c10029b87439 31 UvcCfg(int formatIndex, int frameIndex, ControlEp* ctlEp);
va009039 2:c10029b87439 32 uint8_t bEndpointAddress;
va009039 2:c10029b87439 33 uint16_t wMaxPacketSize;
va009039 2:c10029b87439 34 uint8_t FormatIndex;
va009039 2:c10029b87439 35 uint8_t FrameIndex;
va009039 2:c10029b87439 36 uint32_t dwFrameInterval;
va009039 2:c10029b87439 37 uint8_t bInterface;
va009039 2:c10029b87439 38 uint8_t bAlternate;
va009039 2:c10029b87439 39 uint16_t bcdUVC;
va009039 2:c10029b87439 40 protected:
va009039 2:c10029b87439 41 void _parserAudioControl(uint8_t* buf, int len);
va009039 2:c10029b87439 42 void _parserAudioStream(uint8_t* buf, int len);
va009039 2:c10029b87439 43 void _parserVideoControl(uint8_t* buf, int len);
va009039 2:c10029b87439 44 void _parserVideoStream(uint8_t* buf, int len);
va009039 2:c10029b87439 45 void _parserConfigurationDescriptor(uint8_t* buf, int len);
va009039 2:c10029b87439 46 uint16_t _width;
va009039 2:c10029b87439 47 uint16_t _height;
va009039 2:c10029b87439 48 uint8_t _payload;
va009039 2:c10029b87439 49 int _If;
va009039 2:c10029b87439 50 int _Ifalt;
va009039 2:c10029b87439 51 int _IfClass;
va009039 2:c10029b87439 52 int _IfSubClass;
va009039 2:c10029b87439 53 };
va009039 2:c10029b87439 54
va009039 2:c10029b87439 55 #endif //UVC_CAM_H