11 #include "MiniDisplay.h"
14 #define MIN(a,b) (((a)<(b))?(a):(b))
18 #define MAX(a,b) (((a)>(b))?(a):(b))
22 //This was computed from our number of pixels as follow 256x64/8/64 = 32 + 1 = 33
23 //+1 was added for our header
24 const int KFutabaMaxCommandOutputReport = 33;
25 //TODO: Get ride of that constant once we figure out a way to get it from hidapi
26 const int KFutabaMaxHidReportSize = 65;
28 const int KHidReportIdIndex=0;
29 const int KFutabaHidReportSizeIndex=1;
30 //Define Futaba vendor ID to filter our list of device
31 const unsigned short KFutabaVendorId = 0x1008;
32 const unsigned short KFutabaProductIdGP1212A01A = 0x100C;
33 const unsigned short KFutabaProductIdGP1212A02A = 0x1013; //Or is it 0x1015
34 const int KGP12xWidthInPixels = 256;
35 const int KGP12xHeightInPixels = 64;
36 const int KGP12xPixelsPerByte = 8;
37 const int KGP12xFrameBufferSizeInBytes = KGP12xWidthInPixels*KGP12xHeightInPixels/KGP12xPixelsPerByte; //256*64/8=2048
38 const int KGP12xFrameBufferPixelCount = KGP12xWidthInPixels*KGP12xHeightInPixels;
40 //typedef struct hid_device_info HidDeviceInfo;
43 Define a Futaba HID report.
45 class FutabaVfdReport: public HidReport<KFutabaMaxHidReportSize>
54 Define a generic Futaba VFD command.
56 class FutabaVfdCommand
62 //void Create(int aMaxSize);
65 //inline unsigned char& operator[](int aIndex){return iBuffer[aIndex];}
70 //unsigned char* iBuffer;
71 FutabaVfdReport iReports[KFutabaMaxCommandOutputReport];