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.
WriteFile.h
00001 #ifndef _WRITE_FILE_H 00002 #define _WRITE_FILE_H 00003 #include "mDot.h" 00004 #ifdef FOTA 00005 class WriteFile { 00006 public: 00007 WriteFile(mDot* dot); 00008 ~WriteFile(); 00009 void writeFile(uint8_t* buffer, uint32_t size); 00010 void readFile(uint8_t* buffer, uint32_t size); 00011 void seekFile(uint32_t index); 00012 void createFile(uint16_t numOfFrags, uint8_t fragSize, uint8_t padding); 00013 uint64_t completeFile(uint16_t numOfFrags, uint8_t padding, uint32_t total_frags); 00014 void cleanUp(bool complete); 00015 void reset(); 00016 00017 private: 00018 mDot* _dot; 00019 char* _temp; 00020 char* _firmware; 00021 uint8_t* _frag; 00022 uint8_t _padding; 00023 uint8_t _frag_size; 00024 uint16_t _num_frags; 00025 mDot::mdot_file _upgrade, _file; 00026 }; 00027 #endif 00028 #endif // WRITE_FILE_H
Generated on Wed Jul 13 2022 16:42:53 by
1.7.2