![](/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/util.h
- Committer:
- Matt Briggs
- Date:
- 2017-04-10
- Revision:
- 73:dc5adf462660
File content as of revision 73:dc5adf462660:
/* * util.h * * Created on: Mar 14, 2017 * Author: mbriggs */ #ifndef XDOTBRIDGE_INC_UTIL_H_ #define XDOTBRIDGE_INC_UTIL_H_ #include <vector> void appendUint16ToVector (std::vector<uint8_t> &dest, uint16_t in) { dest.push_back((in & 0xFF00) >> 8); // High data byte dest.push_back((in & 0x00FF)); // Low data byte } void appendUint32ToVector (std::vector<uint8_t> &dest, uint32_t in) { dest.push_back((in & 0xFF000000) >> 24); dest.push_back((in & 0x00FF0000) >> 16); dest.push_back((in & 0x0000FF00) >> 8); dest.push_back((in & 0x000000FF)); } #endif /* XDOTBRIDGE_INC_UTIL_H_ */