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