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