the node firmware of ChiaYi Xingang
Embed:
(wiki syntax)
Show/hide line numbers
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 Tue Jul 12 2022 21:47:10 by
![doxygen](doxygen.png)