Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBHostC270_example by
BaseUvc.h
00001 // BaseUvc.h 00002 #include "USBIsochronous.h" 00003 #pragma once 00004 00005 // --- UVC -------------------------------------------------- 00006 #define _30FPS 333333 00007 #define _25FPS 400000 00008 #define _20FPS 500000 00009 #define _15FPS 666666 00010 #define _10FPS 1000000 00011 #define _5FPS 2000000 00012 #define _1FPS 10000000 00013 00014 #define SET_CUR 0x01 00015 #define GET_CUR 0x81 00016 #define GET_MIN 0x82 00017 #define GET_MAX 0x83 00018 #define GET_RES 0x84 00019 #define GET_LEN 0x85 00020 #define GET_INFO 0x86 00021 #define GET_DEF 0x87 00022 00023 #define VS_PROBE_CONTROL 0x01 00024 #define VS_COMMIT_CONTROL 0x02 00025 00026 class BaseUvc { 00027 public: 00028 void poll(int millisec = 0); 00029 USB_TYPE Control(int req, int cs, int index, uint8_t* buf, int size); 00030 USB_TYPE setInterfaceAlternate(uint8_t intf, uint8_t alt); 00031 IsochronousEp* m_isoEp; 00032 uint32_t report_cc_count[16]; // ConditionCode 00033 uint32_t report_ps_cc_count[16]; // Packt Status ConditionCode 00034 // callback 00035 void onResult(uint16_t frame, uint8_t* buf, int len); 00036 void setOnResult( void (*pMethod)(uint16_t, uint8_t*, int) ); 00037 class CDummy; 00038 template<class T> 00039 void setOnResult( T* pItem, void (T::*pMethod)(uint16_t, uint8_t*, int) ) 00040 { 00041 m_pCb = NULL; 00042 m_pCbItem = (CDummy*) pItem; 00043 m_pCbMeth = (void (CDummy::*)(uint16_t, uint8_t*, int)) pMethod; 00044 } 00045 void clearOnResult(); 00046 CDummy* m_pCbItem; 00047 void (CDummy::*m_pCbMeth)(uint16_t, uint8_t*, int); 00048 void (*m_pCb)(uint16_t, uint8_t*, int); 00049 protected: 00050 USBHost * host; 00051 USBDeviceConnected * dev; 00052 };
Generated on Mon Jul 18 2022 19:52:39 by
1.7.2
