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.
Diff: Fota/Fragmentation/WriteFile.h
- Revision:
- 66:baa0f3116f1d
- Child:
- 68:5f787643e7d7
diff -r acc0468b9aec -r baa0f3116f1d Fota/Fragmentation/WriteFile.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Fota/Fragmentation/WriteFile.h Tue Apr 23 08:51:10 2019 -0500
@@ -0,0 +1,28 @@
+#ifndef _WRITE_FILE_H
+#define _WRITE_FILE_H
+#include "mDot.h"
+#ifdef FOTA
+class WriteFile {
+ public:
+ WriteFile(mDot* dot);
+ ~WriteFile();
+ void writeFile(uint8_t* buffer, uint32_t size);
+ void readFile(uint8_t* buffer, uint32_t size);
+ void seekFile(uint32_t index);
+ void createFile(uint16_t numOfFrags, uint8_t fragSize, uint8_t padding);
+ uint64_t completeFile(uint16_t numOfFrags, uint8_t padding, uint32_t total_frags);
+ void cleanUp(bool complete);
+ void reset();
+
+ private:
+ mDot* _dot;
+ char* _temp;
+ char* _firmware;
+ uint8_t* _frag;
+ uint8_t _padding;
+ uint8_t _frag_size;
+ uint16_t _num_frags;
+ mDot::mdot_file _upgrade, _file;
+};
+#endif
+#endif // WRITE_FILE_H