iap 优化,避免 v8 升级失败

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2023-12-08 08:42:05 +08:00
parent 1830fad2a7
commit 32d8112577
8 changed files with 171 additions and 64 deletions

View File

@@ -58,6 +58,11 @@ enum rym_code
#define RYM_END_SESSION_SEND_CAN_NUM 0x07
#endif
/* how many retries were made when the error occurred */
#ifndef RYM_MAX_ERRORS
#define RYM_MAX_ERRORS ((rt_size_t)20)
#endif
enum rym_stage
{
RYM_STAGE_NONE = 0,
@@ -105,6 +110,16 @@ struct rym_ctx
struct rt_semaphore sem;
rt_device_t dev;
/**
* @brief 适配 v5 iap 升级逻辑, 流程如下:
*
* 收到 EOT 后返回 ACT 'C';
* 收到一包空数据后返回 ACT, 正常结束 IAP
* 逻辑.
*
*/
rt_bool_t v5_iap_adapt;
};
/* recv a file on device dev with ymodem session ctx.