1. 新增sqlite文件、协议文档、调试截图、配置ini等各类辅助文件 2. 更新Keil开发包版本与工程配置,调整编译优化等级 3. 重构继电器控制逻辑、串口收发逻辑与线程优先级 4. 新增Modbus寄存器映射、校准结构体与Ymodem升级相关代码 5. 完善南北向协议解析、快充挡位配置与调试日志 6. 修复注释格式、数组越界与线程邮箱溢出问题 7. 新增屏幕控制、功率板调试与协议格式说明文档
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
#ifndef __CHRG_PKG_H__
|
|
#define __CHRG_PKG_H__
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "chrg_tty.h"
|
|
#include "chrg_def.h"
|
|
#include "chrg_north.h"
|
|
|
|
/*****************************************************************
|
|
函数名称: chrg_north_pkg_encode
|
|
函数描述: 北向数据帧编码
|
|
输入参数: id: sink/source cmd:指令 *data_in:数据 len_in:数据长度
|
|
*data_out:数据帧 len_out:数据帧长度
|
|
输出参数: -
|
|
返回说明: <0: 错误 >0:帧长度
|
|
其它说明: -
|
|
*****************************************************************/
|
|
extern int chrg_north_pkg_encode (eIDX_ID id, rt_uint8_t cmd, rt_uint8_t *data_in,
|
|
rt_uint8_t len_in, rt_uint8_t *data_out, rt_uint16_t *len_out);
|
|
|
|
/*****************************************************************
|
|
函数名称: chrg_north_pkg_decode
|
|
函数描述: 北向数据帧解码
|
|
输入参数: *data:数据 length:数据长度 *pSW:源载数据结构
|
|
输出参数: -
|
|
返回说明: <0: 错误 0:正确
|
|
其它说明: -
|
|
*****************************************************************/
|
|
extern int chrg_north_pkg_decode (rt_uint8_t *data, rt_uint16_t length, struct chrg_switch_t *pSW);
|
|
extern rt_bool_t flag_set;
|
|
|
|
|
|
#endif
|
|
|
|
|