Display auto detect implementation.
10 #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 = 0x1015;
35 //typedef struct hid_device_info HidDeviceInfo;
38 Define a Futaba HID report.
40 class FutabaVfdReport: public HidReport<KFutabaMaxHidReportSize>
49 Define a generic Futaba VFD command.
51 class FutabaVfdCommand
57 //void Create(int aMaxSize);
60 //inline unsigned char& operator[](int aIndex){return iBuffer[aIndex];}
65 //unsigned char* iBuffer;
66 FutabaVfdReport iReports[KFutabaMaxCommandOutputReport];
73 class FutabaGraphicDisplay : public GraphicDisplay