📄 srecord.h
字号:
#ifndef SRECORD_H
#define SRECORD_H
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
typedef std::vector < std::string > SRecord;
typedef std::vector < SRecord > SRecordVector;
class SRecordProcessor
{
public:
int save_merged(const std::string & path) const;
int load_binary(const std::string & path, int address);
int load_smunged(const std::string & path, int address, bool header);
int load(const std::string & path);
int package(const std::string & programmer_path, std::string image_path, const std::string & output_path);
private:
std::string format_binary(const char *data, int size, unsigned int address);
std::string get_header(int offset, int max_address);
int swap_bytes(int orig);
int char_to_int(char c);
char int_to_char(char i);
SRecordVector srecords_;
int flashAddress_;
char getSpair(char *src);
int getDWORD(char *src);
};
#endif /*
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -