modified to compile for me

Dependencies:   FATFileSystem

Dependents:   N64_Output_XPAD

Fork of F401RE-USBHost by Norimasa Okamoto

Committer:
Ownasaurus
Date:
Fri Feb 24 02:44:44 2017 +0000
Revision:
28:98551d9289a8
Parent:
23:4ab8bc835303
added print to indicate reason for occasional startup failure

Who changed what in which revision?

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