![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/inc/SimpleRxSeqLog.h
- Revision:
- 73:dc5adf462660
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xDotBridge/inc/SimpleRxSeqLog.h Mon Apr 10 16:06:31 2017 -0600 @@ -0,0 +1,45 @@ +/* + * simpleRxSeqLog.h + * + * Created on: Mar 23, 2017 + * Author: mbriggs + */ + +#ifndef SIMPLERXSEQLOG_H_ +#define SIMPLERXSEQLOG_H_ + +#include "EepromLog.h" + +const uint8_t SIMPLE_RX_SEQ_LOG_SIZE = 3*sizeof(uint32_t); + +class SimpleRxSeqLog : public EepromLog { +public: + SimpleRxSeqLog (uint16_t baseAddr) : EepromLog(baseAddr, SIMPLE_RX_SEQ_LOG_SIZE) {} + + uint32_t loopCount() + { + return *((uint32_t *)(mData+0*sizeof(uint32_t))); + } + void setLoopCount(uint32_t val) + { + *((uint32_t*) (mData+0*sizeof(uint32_t))) = val; + } + uint32_t rxMsgCount() + { + return *((uint32_t *)(mData+1*sizeof(uint32_t))); + } + void setRxMsgCount(uint32_t val) + { + *((uint32_t*) (mData+1*sizeof(uint32_t))) = val; + } + uint32_t maxSeenMsgSeqNum() + { + return *((uint32_t*)(mData+2*sizeof(uint32_t))); + } + void setMaxSeenMsgSeqNum(uint32_t val) + { + *((uint32_t*) (mData+2*sizeof(uint32_t))) = val; + } +}; + +#endif /* XDOTBRIDGE_INC_SIMPLERXSEQLOG_H_ */