stmisp适配ESP32串口设置延时问题

This commit is contained in:
OPTOC
2025-10-14 10:21:56 +08:00
parent e7989c7444
commit b59b115a3f
2 changed files with 43 additions and 13 deletions

View File

@@ -19,6 +19,8 @@
#define READ_UN_CMD 0x92
#define WRITE_CMD 0x31
#define GO_CMD 0x21
typedef struct
{
uint8_t version; //目标buildroot版本
@@ -32,6 +34,8 @@ typedef struct
int (*get_length )(void); // 获取数据长度
uint8_t flag; //启动标志位
uint32_t adder_offset; //地址偏移
}stmisp_device_t;
/**
@@ -69,6 +73,11 @@ int cmd_get(stmisp_device_t *stmisp_device);
*/
int cmd_getid(stmisp_device_t *stmisp_device);
/**
* @brief isp实现go命令
*/
int cmd_go(stmisp_device_t *stmisp_device, uint32_t adder);
/**
* @brief isp设置写保护
*/
@@ -111,6 +120,11 @@ int cmd_read_memory(stmisp_device_t *stmisp_device, uint32_t addr, uint32_t leng
int cmd_write_memory(stmisp_device_t *stmisp_device, uint32_t addr, const uint8_t *data, size_t len, bool verify);
/**
* @brief 运行示例
*/
void Examples_run(void);
int stmisp_send(void* data, uint16_t len, int timeout);
int stmisp_recv(void* data, uint16_t len, int timeout);
int stmisp_get_length(void);