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.
Dependencies: mbed Rejestrator
F401RE-USBHost/USBHostC270/CamInfo.cpp@0:fa31f8461c63, 2015-04-18 (annotated)
- Committer:
- Waldek
- Date:
- Sat Apr 18 17:01:57 2015 +0000
- Revision:
- 0:fa31f8461c63
working version, stop
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Waldek | 0:fa31f8461c63 | 1 | // CamInfo.cpp |
Waldek | 0:fa31f8461c63 | 2 | #include "USBHostCam.h" |
Waldek | 0:fa31f8461c63 | 3 | |
Waldek | 0:fa31f8461c63 | 4 | // Logitech C270 |
Waldek | 0:fa31f8461c63 | 5 | #define C270_VID 0x046d |
Waldek | 0:fa31f8461c63 | 6 | #define C270_PID 0x0825 |
Waldek | 0:fa31f8461c63 | 7 | #define C270_160x120 2 |
Waldek | 0:fa31f8461c63 | 8 | #define C270_176x144 3 |
Waldek | 0:fa31f8461c63 | 9 | #define C270_320x176 4 |
Waldek | 0:fa31f8461c63 | 10 | #define C270_320x240 5 |
Waldek | 0:fa31f8461c63 | 11 | #define C270_352x288 6 |
Waldek | 0:fa31f8461c63 | 12 | #define C270_432x240 7 |
Waldek | 0:fa31f8461c63 | 13 | #define C270_640x480 1 |
Waldek | 0:fa31f8461c63 | 14 | #define C270_544x288 8 |
Waldek | 0:fa31f8461c63 | 15 | #define C270_640x360 9 |
Waldek | 0:fa31f8461c63 | 16 | #define C270_752x416 10 |
Waldek | 0:fa31f8461c63 | 17 | #define C270_800x448 11 |
Waldek | 0:fa31f8461c63 | 18 | #define C270_800x600 12 |
Waldek | 0:fa31f8461c63 | 19 | |
Waldek | 0:fa31f8461c63 | 20 | #define C270_MJPEG 2 |
Waldek | 0:fa31f8461c63 | 21 | #define C270_YUV2 1 |
Waldek | 0:fa31f8461c63 | 22 | |
Waldek | 0:fa31f8461c63 | 23 | #define C270_EN 0x81 |
Waldek | 0:fa31f8461c63 | 24 | #define C270_MPS 192 |
Waldek | 0:fa31f8461c63 | 25 | #define C270_IF_ALT_192 1 |
Waldek | 0:fa31f8461c63 | 26 | #define C270_IF_ALT(A) C270_IF_ALT_##A |
Waldek | 0:fa31f8461c63 | 27 | |
Waldek | 0:fa31f8461c63 | 28 | #define C270_INFO(SIZE) {C270_VID, C270_PID, _##SIZE, 0, \ |
Waldek | 0:fa31f8461c63 | 29 | "C270", \ |
Waldek | 0:fa31f8461c63 | 30 | C270_MJPEG, \ |
Waldek | 0:fa31f8461c63 | 31 | C270_##SIZE, \ |
Waldek | 0:fa31f8461c63 | 32 | _5FPS, \ |
Waldek | 0:fa31f8461c63 | 33 | C270_EN, \ |
Waldek | 0:fa31f8461c63 | 34 | 192, \ |
Waldek | 0:fa31f8461c63 | 35 | C270_IF_ALT(192), \ |
Waldek | 0:fa31f8461c63 | 36 | } |
Waldek | 0:fa31f8461c63 | 37 | |
Waldek | 0:fa31f8461c63 | 38 | #define C210_PID 0x819 |
Waldek | 0:fa31f8461c63 | 39 | #define C210_INFO(SIZE) {C270_VID, C210_PID, _##SIZE, 0, \ |
Waldek | 0:fa31f8461c63 | 40 | "C270", \ |
Waldek | 0:fa31f8461c63 | 41 | C270_MJPEG, \ |
Waldek | 0:fa31f8461c63 | 42 | C270_##SIZE, \ |
Waldek | 0:fa31f8461c63 | 43 | _5FPS, \ |
Waldek | 0:fa31f8461c63 | 44 | C270_EN, \ |
Waldek | 0:fa31f8461c63 | 45 | 192, \ |
Waldek | 0:fa31f8461c63 | 46 | C270_IF_ALT(192), \ |
Waldek | 0:fa31f8461c63 | 47 | } |
Waldek | 0:fa31f8461c63 | 48 | |
Waldek | 0:fa31f8461c63 | 49 | // Logitech Qcam Orbit AF QCAM-200R |
Waldek | 0:fa31f8461c63 | 50 | #define Q200R_VID 0x046d |
Waldek | 0:fa31f8461c63 | 51 | #define Q200R_PID 0x0994 |
Waldek | 0:fa31f8461c63 | 52 | #define Q200R_160x120 1 |
Waldek | 0:fa31f8461c63 | 53 | #define Q200R_176x144 2 |
Waldek | 0:fa31f8461c63 | 54 | #define Q200R_320x240 3 |
Waldek | 0:fa31f8461c63 | 55 | #define Q200R_352x288 4 |
Waldek | 0:fa31f8461c63 | 56 | #define Q200R_640x480 5 |
Waldek | 0:fa31f8461c63 | 57 | #define Q200R_800x600 6 |
Waldek | 0:fa31f8461c63 | 58 | |
Waldek | 0:fa31f8461c63 | 59 | #define Q200R_MJPEG 1 |
Waldek | 0:fa31f8461c63 | 60 | #define Q200R_YUV2 2 |
Waldek | 0:fa31f8461c63 | 61 | |
Waldek | 0:fa31f8461c63 | 62 | #define Q200R_EN 0x81 |
Waldek | 0:fa31f8461c63 | 63 | #define Q200R_MPS 192 |
Waldek | 0:fa31f8461c63 | 64 | #define Q200R_IF_ALT_192 1 |
Waldek | 0:fa31f8461c63 | 65 | #define Q200R_IF_ALT_384 2 |
Waldek | 0:fa31f8461c63 | 66 | #define Q200R_IF_ALT_512 3 |
Waldek | 0:fa31f8461c63 | 67 | #define Q200R_IF_ALT_640 4 |
Waldek | 0:fa31f8461c63 | 68 | #define Q200R_IF_ALT_800 5 |
Waldek | 0:fa31f8461c63 | 69 | #define Q200R_IF_ALT_944 6 |
Waldek | 0:fa31f8461c63 | 70 | #define Q200R_IF_ALT(A) Q200R_IF_ALT_##A |
Waldek | 0:fa31f8461c63 | 71 | #define Q200R_INFO(SIZE) {Q200R_VID, Q200R_PID, _##SIZE, 0, \ |
Waldek | 0:fa31f8461c63 | 72 | "Q200R", \ |
Waldek | 0:fa31f8461c63 | 73 | Q200R_MJPEG, \ |
Waldek | 0:fa31f8461c63 | 74 | Q200R_##SIZE, \ |
Waldek | 0:fa31f8461c63 | 75 | _5FPS, \ |
Waldek | 0:fa31f8461c63 | 76 | Q200R_EN, \ |
Waldek | 0:fa31f8461c63 | 77 | 192, \ |
Waldek | 0:fa31f8461c63 | 78 | Q200R_IF_ALT(192), \ |
Waldek | 0:fa31f8461c63 | 79 | } |
Waldek | 0:fa31f8461c63 | 80 | |
Waldek | 0:fa31f8461c63 | 81 | //LifeCam VX700 / VX500 |
Waldek | 0:fa31f8461c63 | 82 | #define VX700_VID 0x045e |
Waldek | 0:fa31f8461c63 | 83 | #define VX700_PID 0x074a |
Waldek | 0:fa31f8461c63 | 84 | |
Waldek | 0:fa31f8461c63 | 85 | #define VX700_160x120 5 |
Waldek | 0:fa31f8461c63 | 86 | #define VX700_176x144 4 |
Waldek | 0:fa31f8461c63 | 87 | #define VX700_320x240 3 |
Waldek | 0:fa31f8461c63 | 88 | #define VX700_352x288 2 |
Waldek | 0:fa31f8461c63 | 89 | #define VX700_640x480 1 |
Waldek | 0:fa31f8461c63 | 90 | |
Waldek | 0:fa31f8461c63 | 91 | #define VX700_MJPEG 1 |
Waldek | 0:fa31f8461c63 | 92 | |
Waldek | 0:fa31f8461c63 | 93 | #define VX700_EN 0x81 |
Waldek | 0:fa31f8461c63 | 94 | #define VX700_MPS 128 |
Waldek | 0:fa31f8461c63 | 95 | #define VX700_IF_ALT_128 1 |
Waldek | 0:fa31f8461c63 | 96 | #define VX700_IF_ALT(A) VX700_IF_ALT_##A |
Waldek | 0:fa31f8461c63 | 97 | #define VX700_INFO(SIZE) {VX700_VID, VX700_PID, _##SIZE, 0, \ |
Waldek | 0:fa31f8461c63 | 98 | "VX700", \ |
Waldek | 0:fa31f8461c63 | 99 | VX700_MJPEG, \ |
Waldek | 0:fa31f8461c63 | 100 | VX700_##SIZE, \ |
Waldek | 0:fa31f8461c63 | 101 | _5FPS, \ |
Waldek | 0:fa31f8461c63 | 102 | VX700_EN, \ |
Waldek | 0:fa31f8461c63 | 103 | 128, \ |
Waldek | 0:fa31f8461c63 | 104 | VX700_IF_ALT(128), \ |
Waldek | 0:fa31f8461c63 | 105 | } |
Waldek | 0:fa31f8461c63 | 106 | |
Waldek | 0:fa31f8461c63 | 107 | //Sonix USB 2.0 Camera |
Waldek | 0:fa31f8461c63 | 108 | #define SONIX_160x120 5 |
Waldek | 0:fa31f8461c63 | 109 | #define SONIX_176x144 4 |
Waldek | 0:fa31f8461c63 | 110 | #define SONIX_320x240 3 |
Waldek | 0:fa31f8461c63 | 111 | #define SONIX_352x288 2 |
Waldek | 0:fa31f8461c63 | 112 | #define SONIX_640x480 1 |
Waldek | 0:fa31f8461c63 | 113 | |
Waldek | 0:fa31f8461c63 | 114 | #define SONIX_IF_ALT_128 1 |
Waldek | 0:fa31f8461c63 | 115 | #define SONIX_IF_ALT_256 2 |
Waldek | 0:fa31f8461c63 | 116 | #define SONIX_IF_ALT_512 3 |
Waldek | 0:fa31f8461c63 | 117 | #define SONIX_IF_ALT_600 4 |
Waldek | 0:fa31f8461c63 | 118 | #define SONIX_IF_ALT_800 5 |
Waldek | 0:fa31f8461c63 | 119 | #define SONIX_IF_ALT_956 6 |
Waldek | 0:fa31f8461c63 | 120 | #define SONIX_IF_ALT(A) SONIX_IF_ALT_##A |
Waldek | 0:fa31f8461c63 | 121 | #define SONIX_INFO(SIZE) {0x0c45, 0x62c0, _##SIZE, 0, \ |
Waldek | 0:fa31f8461c63 | 122 | "SONIX", \ |
Waldek | 0:fa31f8461c63 | 123 | 1, \ |
Waldek | 0:fa31f8461c63 | 124 | SONIX_##SIZE, \ |
Waldek | 0:fa31f8461c63 | 125 | _5FPS, \ |
Waldek | 0:fa31f8461c63 | 126 | 0x81, \ |
Waldek | 0:fa31f8461c63 | 127 | 128, \ |
Waldek | 0:fa31f8461c63 | 128 | SONIX_IF_ALT(128), \ |
Waldek | 0:fa31f8461c63 | 129 | } |
Waldek | 0:fa31f8461c63 | 130 | |
Waldek | 0:fa31f8461c63 | 131 | static const CamInfo CamInfoList[] = { |
Waldek | 0:fa31f8461c63 | 132 | // Logitech C270 |
Waldek | 0:fa31f8461c63 | 133 | C270_INFO(160x120), |
Waldek | 0:fa31f8461c63 | 134 | C270_INFO(176x144), |
Waldek | 0:fa31f8461c63 | 135 | C270_INFO(320x176), |
Waldek | 0:fa31f8461c63 | 136 | C270_INFO(320x240), |
Waldek | 0:fa31f8461c63 | 137 | C270_INFO(352x288), |
Waldek | 0:fa31f8461c63 | 138 | C270_INFO(432x240), |
Waldek | 0:fa31f8461c63 | 139 | C270_INFO(640x480), |
Waldek | 0:fa31f8461c63 | 140 | C270_INFO(544x288), |
Waldek | 0:fa31f8461c63 | 141 | C270_INFO(640x360), |
Waldek | 0:fa31f8461c63 | 142 | C270_INFO(752x416), |
Waldek | 0:fa31f8461c63 | 143 | C270_INFO(800x448), |
Waldek | 0:fa31f8461c63 | 144 | C270_INFO(800x600), |
Waldek | 0:fa31f8461c63 | 145 | |
Waldek | 0:fa31f8461c63 | 146 | // Logitech C210 |
Waldek | 0:fa31f8461c63 | 147 | C210_INFO(160x120), |
Waldek | 0:fa31f8461c63 | 148 | C210_INFO(176x144), |
Waldek | 0:fa31f8461c63 | 149 | C210_INFO(320x176), |
Waldek | 0:fa31f8461c63 | 150 | C210_INFO(320x240), |
Waldek | 0:fa31f8461c63 | 151 | C210_INFO(352x288), |
Waldek | 0:fa31f8461c63 | 152 | C210_INFO(432x240), |
Waldek | 0:fa31f8461c63 | 153 | C210_INFO(640x480), |
Waldek | 0:fa31f8461c63 | 154 | C210_INFO(544x288), |
Waldek | 0:fa31f8461c63 | 155 | C210_INFO(640x360), |
Waldek | 0:fa31f8461c63 | 156 | C210_INFO(752x416), |
Waldek | 0:fa31f8461c63 | 157 | C210_INFO(800x448), |
Waldek | 0:fa31f8461c63 | 158 | C210_INFO(800x600), |
Waldek | 0:fa31f8461c63 | 159 | |
Waldek | 0:fa31f8461c63 | 160 | // Logitech Qcam Orbit AF QCAM-200R |
Waldek | 0:fa31f8461c63 | 161 | Q200R_INFO(160x120), |
Waldek | 0:fa31f8461c63 | 162 | Q200R_INFO(176x144), |
Waldek | 0:fa31f8461c63 | 163 | Q200R_INFO(320x240), |
Waldek | 0:fa31f8461c63 | 164 | Q200R_INFO(352x288), |
Waldek | 0:fa31f8461c63 | 165 | Q200R_INFO(640x480), |
Waldek | 0:fa31f8461c63 | 166 | Q200R_INFO(800x600), |
Waldek | 0:fa31f8461c63 | 167 | |
Waldek | 0:fa31f8461c63 | 168 | // LifeCam VX700 |
Waldek | 0:fa31f8461c63 | 169 | VX700_INFO(160x120), |
Waldek | 0:fa31f8461c63 | 170 | VX700_INFO(176x144), |
Waldek | 0:fa31f8461c63 | 171 | VX700_INFO(320x240), |
Waldek | 0:fa31f8461c63 | 172 | VX700_INFO(352x288), |
Waldek | 0:fa31f8461c63 | 173 | VX700_INFO(640x480), |
Waldek | 0:fa31f8461c63 | 174 | |
Waldek | 0:fa31f8461c63 | 175 | // Sonix USB 2.0 Camera |
Waldek | 0:fa31f8461c63 | 176 | SONIX_INFO(160x120), |
Waldek | 0:fa31f8461c63 | 177 | SONIX_INFO(176x144), |
Waldek | 0:fa31f8461c63 | 178 | SONIX_INFO(320x240), |
Waldek | 0:fa31f8461c63 | 179 | SONIX_INFO(352x288), |
Waldek | 0:fa31f8461c63 | 180 | SONIX_INFO(640x480), |
Waldek | 0:fa31f8461c63 | 181 | |
Waldek | 0:fa31f8461c63 | 182 | // Not found |
Waldek | 0:fa31f8461c63 | 183 | {0,0,0,0}, |
Waldek | 0:fa31f8461c63 | 184 | }; |
Waldek | 0:fa31f8461c63 | 185 | |
Waldek | 0:fa31f8461c63 | 186 | CamInfo* getCamInfoList() { |
Waldek | 0:fa31f8461c63 | 187 | return const_cast<CamInfo*>(CamInfoList); |
Waldek | 0:fa31f8461c63 | 188 | } |