You've already forked ESP32-DAPLink
mirror of
https://github.com/m5stack/ESP32-DAPLink.git
synced 2026-05-20 11:37:17 -07:00
31 lines
751 B
C++
31 lines
751 B
C++
/*
|
|
* Copyright (c) 2023-2023, lihongquan
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2023-9-8 lihongquan add license declaration
|
|
*/
|
|
#pragma once
|
|
|
|
#include "bin_prog.h"
|
|
#include "hex_parser.h"
|
|
#include "ff.h"
|
|
|
|
class HexProg : public BinProg
|
|
{
|
|
private:
|
|
static constexpr int _hex_buf_size = 256;
|
|
uint8_t _hex_buffer[_hex_buf_size];
|
|
hex_parser_t _parser;
|
|
uint32_t _start_address;
|
|
|
|
bool write_hex(const uint8_t *data, uint32_t size, uint32_t &decode_size);
|
|
|
|
public:
|
|
HexProg();
|
|
HexProg(const std::string &file);
|
|
bool programing_hex(const FlashIface::target_cfg_t &cfg, const std::string &file);
|
|
bool programing_hex(const FlashIface::target_cfg_t &cfg);
|
|
}; |