sl@0: #ifndef HID_REPORT_H sl@0: #define HID_REPORT_H sl@0: sl@0: #include sl@0: sl@0: /** sl@0: Define an HID report. sl@0: Can be used as input and output. sl@0: */ sl@0: template sl@0: class HidReport sl@0: { sl@0: public: sl@0: HidReport(){Reset();} sl@0: void Reset(); sl@0: inline unsigned char& operator[](int aIndex){return iBuffer[aIndex];} sl@0: const unsigned char* Buffer() const {return iBuffer;} sl@0: unsigned char* Buffer() {return iBuffer;} sl@0: int Size() {return S;} sl@0: protected: sl@0: unsigned char iBuffer[S]; sl@0: }; sl@0: sl@0: template sl@0: void HidReport::Reset() sl@0: { sl@0: memset(iBuffer,0,sizeof(iBuffer)); sl@0: } sl@0: sl@0: sl@0: #endif