客户侧能力:RTC、开机锁键与 BLE 协议收敛

1、新增 usr_periph RTC,DEVICEINFO 自动对时;对外精简为 get_time(sys_time*),开发板 RTC 时钟改用 LRC
2、iokey 开机锁键改为公开 start/stop 接口,板级宏 TCFG_IOKEY_BOOT_LOCK_ENABLE 可关闭
3、对齐模组 BLE 收发/组包与公开 API,更新 libusr_le_code.a;Release 包命名调整为 JBao_JL7016_SOC_SDK_Vx.x.x
This commit is contained in:
2026-08-19 15:26:35 +08:00
parent 3e9fb2cd06
commit aa724c6758
21 changed files with 1118 additions and 600 deletions
+22 -1
View File
@@ -483,7 +483,12 @@ typedef struct bleproto_otadata_rsp {
int id; ///< file_id
int32_t offset; ///< 当前读取到的数据偏移
uint32_t len; ///< 当次读取数据的大小
uint8_t data[BLEPROTO_APPDATA_OTADATA_SZ]; ///< 读取的数据
/**
* 固件数据指针(不内嵌大数组,避免 bleproto_appdata_desc_t 膨胀到 2KB+
* - decode:指向 appdata 内部缓冲(零拷贝),下次 decode 前有效
* - encode:由调用方提供可读缓冲
*/
const uint8_t *data;
} bleproto_otadata_rsp_t;
/****************************************************************************/
/* Public Data */
@@ -580,6 +585,22 @@ int bleproto_appdata_serialize(bleproto_appdata_t *appdata,
uint8_t * buf,
uint16_t size);
/**
* @brief 将已打包好的 payload 包装成单帧 appdata(不分包)
* @param txbuf 输出缓冲
* @param txbuf_size 输出缓冲大小
* @param header 应用层头(datalen/totalframe/frameseq 由本函数填写)
* @param payload 已序列化的 service 数据;可为 NULLpayload_len==0
* @param payload_len payload 长度,须 <=255(单帧 pthis_frame_len 为 u8
* @return >0 总字节数;<0 失败
* @note 小包场景(JB 55AA 透传等)用此接口,避免 bleproto_appdata_t 大缓冲
*/
int bleproto_appdata_wrap_raw(uint8_t *txbuf,
uint16_t txbuf_size,
const bleproto_appdata_header_t *header,
const uint8_t *payload,
uint16_t payload_len);
/**
* @brief 反序列化应用数据
*