- int64_t m_iLastEepromWrite; /**< last time that this instance did an eeprom write */
- int64_t m_iScheduleEepromWrite; /**< in case there were more than 2 changes within 30 seconds, do another write at this time */
+ };
+
+ class CAdapterEepromWriteThread : public PLATFORM::CThread
+ {
+ public:
+ CAdapterEepromWriteThread(CUSBCECAdapterCommunication *com) :
+ m_com(com),
+ m_bWrite(false),
+ m_iLastEepromWrite(0),
+ m_iScheduleEepromWrite(0) {}
+ virtual ~CAdapterEepromWriteThread(void) {}
+
+ bool Write(void);
+ void* Process(void);
+ void Stop(void);
+ private:
+ CUSBCECAdapterCommunication *m_com;
+ bool m_bWrite;
+ PLATFORM::CCondition<bool> m_condition;
+ PLATFORM::CMutex m_mutex;
+ int64_t m_iLastEepromWrite; /**< last time that this instance did an eeprom write */
+ int64_t m_iScheduleEepromWrite; /**< in case there were more than 2 changes within 30 seconds, do another write at this time */