Files
soc-codegen-template/apps/usr_jb_proto/Protocol/jb_product.h
T
2026-08-19 16:05:36 +08:00

56 lines
3.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ================================================================
* jb_product.h — 用户层头文件(自动生成)
* 设备: 侠客猫激光 | 生成时间: 2026-07-31 17:08:51
*
* 声明用户需实现的函数。数据结构定义见 jb_protocol.h
* ================================================================
*/
#ifndef _JB_PRODUCT_H
#define _JB_PRODUCT_H
#include "jb_protocol.h"
/* ════════════════════════════════════════════════════════════════
* 硬件配置(SOC SDK 已提供定时器,无需 UART 波特率配置)
* ════════════════════════════════════════════════════════════════ */
#define TIMER_PERIOD_MS 1
/* ════════════════════════════════════════════════════════════════
* 版本管理
* ════════════════════════════════════════════════════════════════ */
/* MCU software version: Vmajor.minor.patch */
#define JB_MCU_SW_VERSION_MAJOR 1
#define JB_MCU_SW_VERSION_MINOR 0
#define JB_MCU_SW_VERSION_PATCH 0
/* MCU hardware version: Vmajor.minor.patch */
#define JB_MCU_HW_VERSION_MAJOR 1
#define JB_MCU_HW_VERSION_MINOR 0
#define JB_MCU_HW_VERSION_PATCH 0
/* ════════════════════════════════════════════════════════════════
* 用户 API
* ════════════════════════════════════════════════════════════════ */
/* 全局设备数据 — 协议层直接读写该变量 */
extern jb_data_point_t gDevData;
/* ==================== 用户必须实现 ============================== */
void userInit(void); /* DP 默认值与外设初始化 */
void userHandle(void); /* 用户数据采集 */
void jbTimerIrq(void); /* Call from 1ms timer ISR */
/* =========== 协议回调(声明见 jb_protocol.h================== */
/* int8_t jbEventProcess(...); // 0x03 控制事件 */
/* void jbOnOtaNotify(...); // 0x30 OTA 请求 */
/* void jbOnOtaData(...); // 0x32 OTA 数据 */
/* void jbOnOtaStop(); // 0x36/0x38 停止 OTA */
/* void jbOnAck(...); // 任意请求 ACK(结果) */
/* ============= 主动请求(声明见 jb_protocol.h================ */
/* int32_t jbNotifyOtaStop(); // 0x38 通知 BLE 停止 OTA */
/* int32_t jbSendOtaResult(...); // 0x34 OTA 结果 */
#endif /* _JB_PRODUCT_H */