Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnEventFrame.cpp
- Revision:
- 1:e392595b4b76
- Parent:
- 0:664899e0b988
- Child:
- 3:24c5f0f50bf1
--- a/SnEventFrame.cpp Sat Jun 30 02:03:51 2012 +0000
+++ b/SnEventFrame.cpp Fri Jul 20 19:04:02 2012 +0000
@@ -2,6 +2,8 @@
#include "SnCRCUtils.h"
+const uint8_t SnEventFrame::kIOVers = 1; // MUST BE INCREASED if any member var changes (==> also if kNchans, etc. change!)
+
void SnEventFrame::ReadFrom(const char* const buf,
const uint8_t loseLSB, const uint8_t loseMSB,
const uint16_t wvBaseline) {
@@ -16,7 +18,7 @@
} b;
b.s = buf;
- int8_t Rv=0;
+ uint8_t Rv=0;
b.s = SnBitUtils::ReadFrom(b.s, Rv); // i/o version
if (Rv>0) {
b.s = SnBitUtils::ReadFrom(b.s, fMbedTime);
@@ -60,7 +62,7 @@
// CRC made using union on a little endian (mbed) processor
fCRC = 0u;
const uint16_t* dev = fData;
- for (int16_t i=0; i<kTotSamps; i++, dev++) {
+ for (uint16_t i=0; i<kTotSamps; i++, dev++) {
fCRC = update_crc32_xfer_short(fCRC, *dev);
}
}