author | sl |
Wed, 21 May 2014 16:11:09 +0200 | |
changeset 9 | e6c42e1e2a96 |
child 10 | 4c3d32f38c09 |
permissions | -rw-r--r-- |
sl@9 | 1 |
|
sl@9 | 2 |
|
sl@9 | 3 |
#ifndef FUTABA_VFD_H |
sl@9 | 4 |
#define FUTABA_VFD_H |
sl@9 | 5 |
|
sl@9 | 6 |
#include "hidapi.h" |
sl@9 | 7 |
|
sl@9 | 8 |
//This was computed from our number of pixels as follow 256x64/8/64 = 32 + 1 = 33 |
sl@9 | 9 |
//+1 was added for our header |
sl@9 | 10 |
const int KFutabaMaxCommandOutputReport = 33; |
sl@9 | 11 |
//TODO: Get ride of that constant once we figure out a way to get it from hidapi |
sl@9 | 12 |
const int KFutabaOutputReportLength = 65; |
sl@9 | 13 |
|
sl@9 | 14 |
|
sl@9 | 15 |
/** |
sl@9 | 16 |
Define a generic Futaba VFD command. |
sl@9 | 17 |
*/ |
sl@9 | 18 |
class FutabaVfdCommand |
sl@9 | 19 |
{ |
sl@9 | 20 |
public: |
sl@9 | 21 |
FutabaVfdCommand(); |
sl@9 | 22 |
~FutabaVfdCommand(); |
sl@9 | 23 |
// |
sl@9 | 24 |
//void Create(int aMaxSize); |
sl@9 | 25 |
//void Delete(); |
sl@9 | 26 |
|
sl@9 | 27 |
//inline unsigned char& operator[](int aIndex){return iBuffer[aIndex];} |
sl@9 | 28 |
|
sl@9 | 29 |
void Reset(); |
sl@9 | 30 |
|
sl@9 | 31 |
private: |
sl@9 | 32 |
//unsigned char* iBuffer; |
sl@9 | 33 |
unsigned char iReports[KFutabaMaxCommandOutputReport][KFutabaOutputReportLength]; |
sl@9 | 34 |
int iSize; |
sl@9 | 35 |
int iMaxSize; |
sl@9 | 36 |
}; |
sl@9 | 37 |
|
sl@9 | 38 |
|
sl@9 | 39 |
#endif |