使用赋码仪主板 app升级,方案升级验证通过

This commit is contained in:
ranchuan
2023-10-11 18:10:06 +08:00
parent ed9e4c0c3e
commit f0f36cf79a
25 changed files with 324 additions and 207 deletions

View File

@@ -106,7 +106,12 @@ static int flash_erase(uint32_t sector)
}
}
// 擦除指定地址
int flash_erase_addr(uint32_t addr)
{
addr=addr-FLASH_BASE;
return flash_erase(addr/2048);
}
// 操作开始
int flash_operate_start(void)

View File

@@ -35,6 +35,7 @@ uint32_t *flash_get_jwtcode(void);
int flash_write(uint8_t *addr,const uint8_t *data,int len);
int flash_operate_end(void);
int flash_write_with_erase(uint8_t *addr,const uint8_t *data,int len);
int flash_erase_addr(uint32_t addr);
@@ -48,6 +49,7 @@ typedef struct{
uint8_t host_ip[4];
int host_port;
char host_if[8];
char device_type[12];
}rom_head;
@@ -68,17 +70,10 @@ typedef struct{
char host_if[8];// 主机接口
char device_type[12];// 设备类型 ,批检仪还是赋码仪
uint8_t mac[8];// mac地址
uint8_t local_ip[4];// 本机ip地址
uint8_t host_ip[4];// 主机ip地址
int host_port;// 主机端口
int local_cmd_port;// 本机命令端口
int host_log_port;// 主机log端口
int local_id;// 本机识别号
uint8_t host_log_ip[4];// 主机logip
int uartbsp;// 串口4的波特率
int coder_ret_mode;// 注码指令返回格式
int slave_addr_start;// 小板起始地址
int moter_max_count;// 电机最大步数
int uartbsp;// 串口的波特率
int hard_version;// 硬件版本号
int resistor_diff;// 电阻校准值
}sys_param_def;