1 #include <USBKit.h> 2 3 4 #define MAX_BUFFER_SIZE 4096 //Size ot transfer buffer from camera 5 6 /* IDs of cameras the driver (hopefully) supports. Some different 7 * cameras have the same USB ids, so we just keep one here. */ 8 #define USB_FUJIFILM_VENDOR_ID 0x04cb 9 10 #define USB_FINEPIX_4800_PID 0x0104 11 #define USB_FINEPIX_F601_PID 0x0109 12 #define USB_FINEPIX_S602_PID 0x010b 13 #define USB_FINEPIX_F402_PID 0x010f 14 #define USB_FINEPIX_M603_PID 0x0111 15 #define USB_FINEPIX_A202_PID 0x0113 16 #define USB_FINEPIX_F401_PID 0x0115 17 #define USB_FINEPIX_A203_PID 0x0117 18 #define USB_FINEPIX_A303_PID 0x0119 19 #define USB_FINEPIX_S304_PID 0x011b 20 #define USB_FINEPIX_A204_PID 0x011d 21 #define USB_FINEPIX_F700_PID 0x0121 22 #define USB_FINEPIX_F410_PID 0x0123 23 #define USB_FINEPIX_A310_PID 0x0125 24 #define USB_FINEPIX_A210_PID 0x0127 25 #define USB_FINEPIX_A205_PID 0x0129 26 #define USB_FINEPIX_X1_PID 0x012B 27 #define USB_FINEPIX_S7000_PID 0x012d 28 #define USB_FINEPIX_X2_PID 0x012F 29 #define USB_FINEPIX_S5000_PID 0x0131 30 #define USB_FINEPIX_X3_PID 0x013B 31 #define USB_FINEPIX_S3000_PID 0x013d 32 #define USB_FINEPIX_X4_PID 0x013f 33 34 35 class FinePix : private BUSBRoster 36 { 37 public: 38 FinePix(); 39 virtual ~FinePix(); 40 41 status_t InitCheck(); // check if any error occurs 42 int SetupCam(); // ready camera for sending pictures 43 int GetPic(uint8 *frame, int &total_size); // get pictures! 44 45 status_t DeviceAdded(BUSBDevice* dev); //dev added 46 void DeviceRemoved(BUSBDevice* dev); //dev removed 47 48 private: 49 BUSBDevice* camera; 50 const BUSBEndpoint* bulk_in; 51 }; 52