![](/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
xDotBridge/inc/SimpleRxSeqLog.h@73:dc5adf462660, 2017-04-10 (annotated)
- Committer:
- Matt Briggs
- Date:
- Mon Apr 10 16:06:31 2017 -0600
- Revision:
- 73:dc5adf462660
Forgot to add some files.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Matt Briggs | 73:dc5adf462660 | 1 | /* |
Matt Briggs | 73:dc5adf462660 | 2 | * simpleRxSeqLog.h |
Matt Briggs | 73:dc5adf462660 | 3 | * |
Matt Briggs | 73:dc5adf462660 | 4 | * Created on: Mar 23, 2017 |
Matt Briggs | 73:dc5adf462660 | 5 | * Author: mbriggs |
Matt Briggs | 73:dc5adf462660 | 6 | */ |
Matt Briggs | 73:dc5adf462660 | 7 | |
Matt Briggs | 73:dc5adf462660 | 8 | #ifndef SIMPLERXSEQLOG_H_ |
Matt Briggs | 73:dc5adf462660 | 9 | #define SIMPLERXSEQLOG_H_ |
Matt Briggs | 73:dc5adf462660 | 10 | |
Matt Briggs | 73:dc5adf462660 | 11 | #include "EepromLog.h" |
Matt Briggs | 73:dc5adf462660 | 12 | |
Matt Briggs | 73:dc5adf462660 | 13 | const uint8_t SIMPLE_RX_SEQ_LOG_SIZE = 3*sizeof(uint32_t); |
Matt Briggs | 73:dc5adf462660 | 14 | |
Matt Briggs | 73:dc5adf462660 | 15 | class SimpleRxSeqLog : public EepromLog { |
Matt Briggs | 73:dc5adf462660 | 16 | public: |
Matt Briggs | 73:dc5adf462660 | 17 | SimpleRxSeqLog (uint16_t baseAddr) : EepromLog(baseAddr, SIMPLE_RX_SEQ_LOG_SIZE) {} |
Matt Briggs | 73:dc5adf462660 | 18 | |
Matt Briggs | 73:dc5adf462660 | 19 | uint32_t loopCount() |
Matt Briggs | 73:dc5adf462660 | 20 | { |
Matt Briggs | 73:dc5adf462660 | 21 | return *((uint32_t *)(mData+0*sizeof(uint32_t))); |
Matt Briggs | 73:dc5adf462660 | 22 | } |
Matt Briggs | 73:dc5adf462660 | 23 | void setLoopCount(uint32_t val) |
Matt Briggs | 73:dc5adf462660 | 24 | { |
Matt Briggs | 73:dc5adf462660 | 25 | *((uint32_t*) (mData+0*sizeof(uint32_t))) = val; |
Matt Briggs | 73:dc5adf462660 | 26 | } |
Matt Briggs | 73:dc5adf462660 | 27 | uint32_t rxMsgCount() |
Matt Briggs | 73:dc5adf462660 | 28 | { |
Matt Briggs | 73:dc5adf462660 | 29 | return *((uint32_t *)(mData+1*sizeof(uint32_t))); |
Matt Briggs | 73:dc5adf462660 | 30 | } |
Matt Briggs | 73:dc5adf462660 | 31 | void setRxMsgCount(uint32_t val) |
Matt Briggs | 73:dc5adf462660 | 32 | { |
Matt Briggs | 73:dc5adf462660 | 33 | *((uint32_t*) (mData+1*sizeof(uint32_t))) = val; |
Matt Briggs | 73:dc5adf462660 | 34 | } |
Matt Briggs | 73:dc5adf462660 | 35 | uint32_t maxSeenMsgSeqNum() |
Matt Briggs | 73:dc5adf462660 | 36 | { |
Matt Briggs | 73:dc5adf462660 | 37 | return *((uint32_t*)(mData+2*sizeof(uint32_t))); |
Matt Briggs | 73:dc5adf462660 | 38 | } |
Matt Briggs | 73:dc5adf462660 | 39 | void setMaxSeenMsgSeqNum(uint32_t val) |
Matt Briggs | 73:dc5adf462660 | 40 | { |
Matt Briggs | 73:dc5adf462660 | 41 | *((uint32_t*) (mData+2*sizeof(uint32_t))) = val; |
Matt Briggs | 73:dc5adf462660 | 42 | } |
Matt Briggs | 73:dc5adf462660 | 43 | }; |
Matt Briggs | 73:dc5adf462660 | 44 | |
Matt Briggs | 73:dc5adf462660 | 45 | #endif /* XDOTBRIDGE_INC_SIMPLERXSEQLOG_H_ */ |