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 /********************************************************************** 00002 * COPYRIGHT 2018 MULTI-TECH SYSTEMS, INC. 00003 * 00004 * ALL RIGHTS RESERVED BY AND FOR THE EXCLUSIVE BENEFIT OF 00005 * MULTI-TECH SYSTEMS, INC. 00006 * 00007 * MULTI-TECH SYSTEMS, INC. - CONFIDENTIAL AND PROPRIETARY 00008 * INFORMATION AND/OR TRADE SECRET. 00009 * 00010 * NOTICE: ALL CODE, PROGRAM, INFORMATION, SCRIPT, INSTRUCTION, 00011 * DATA, AND COMMENT HEREIN IS AND SHALL REMAIN THE CONFIDENTIAL 00012 * INFORMATION AND PROPERTY OF MULTI-TECH SYSTEMS, INC. 00013 * USE AND DISCLOSURE THEREOF, EXCEPT AS STRICTLY AUTHORIZED IN A 00014 * WRITTEN AGREEMENT SIGNED BY MULTI-TECH SYSTEMS, INC. IS PROHIBITED. 00015 * 00016 ***********************************************************************/ 00017 00018 #ifndef _WRITE_FILE_H 00019 #define _WRITE_FILE_H 00020 #include "mDot.h" 00021 #ifdef FOTA 00022 class WriteFile { 00023 public: 00024 WriteFile(mDot* dot); 00025 ~WriteFile(); 00026 void writeFile(uint8_t* buffer, uint32_t size); 00027 void readFile(uint8_t* buffer, uint32_t size); 00028 void seekFile(uint32_t index); 00029 void createFile(uint16_t numOfFrags, uint8_t fragSize, uint8_t padding); 00030 uint64_t completeFile(uint16_t numOfFrags, uint8_t padding, uint32_t total_frags); 00031 void cleanUp(bool complete); 00032 void reset(); 00033 00034 private: 00035 mDot* _dot; 00036 char* _temp; 00037 char* _firmware; 00038 uint8_t* _frag; 00039 uint8_t _padding; 00040 uint8_t _frag_size; 00041 uint16_t _num_frags; 00042 mDot::mdot_file _upgrade, _file; 00043 }; 00044 #endif 00045 #endif // WRITE_FILE_H
Generated on Fri Jul 15 2022 21:40:31 by
1.7.2