Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
xDotBridge/inc/SimpleRxSeqLog.h
- Committer:
- Matt Briggs
- Date:
- 2017-04-10
- Revision:
- 73:dc5adf462660
File content as of revision 73:dc5adf462660:
/* * 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_ */