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.
Fork of mbed_fota by
Diff: ext_fota/SerialManager.h
- Revision:
- 2:dba344c91bce
- Child:
- 5:e11b23f9aacc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ext_fota/SerialManager.h Mon Jun 22 09:43:13 2015 +0000 @@ -0,0 +1,35 @@ +#ifndef SERIALMANAGER_H +#define SERIALMANAGER_H + +#include "mbed.h" + +namespace sevencore_fota{ + +class SerialManager +{ +public: + SerialManager(Serial *_device); + SerialManager(Serial *_device,Serial *_hostpc); + ~SerialManager(void); + int SendToSerial(uint8_t *data,unsigned short size); + int ReceiveToSerial(unsigned char *receive_msg); + +private: + void PrintSerialManager(void); + + bool print_flag; + Serial *device; + Serial *hostpc; + uint8_t FE_MSG_PACKET_TYPE; + int MAX_PACKET_LENGTH; + unsigned char bReceiveState; + unsigned short wDataLength; + unsigned short wReceivePos; + unsigned char bHdrBytesRead; + unsigned char bReceiveElementArr[512]; + +}; + +}//namespace + +#endif//SERIALMANAGER_H