合并 1544/1 1544/head
authorhcj <1224667075@qq.com>
Fri, 20 Dec 2024 11:38:55 +0000 (19:38 +0800)
committerhcj <1224667075@qq.com>
Fri, 20 Dec 2024 11:38:55 +0000 (19:38 +0800)
1  2 
code/sdk/drivers/peripheral/utils/custom_save_runtime.h

@@@ -34,194 -36,191 +36,193 @@@ extern "C
      RUNTIME_LOG_OTA,           // 0x0004 ota升级
      RUNTIME_LOG_FACTORY_RESET, // 0x0005 恢复出厂设置
  
-     //蓝牙
+     // 蓝牙
      RUNTIME_LOG_BLE_MIN = 0x0100,
  
-     RUNTIME_LOG_BLE_BROADCAST_ON,
-     RUNTIME_LOG_BLE_BROADCAST_OFF,
-     RUNTIME_LOG_BLE_CONNECT,
-     RUNTIME_LOG_BLE_DISCONNECT,
- 
-     RUNTIME_LOG_BLE_CONNECT_UPDATE_50, //连接参数更新 0x0105
-     RUNTIME_LOG_BLE_CONNECT_UPDATE_12,
- 
-     RUNTIME_LOG_BLE_APP_CMD, // APP下发命令
-     RUNTIME_LOG_BLE_ALIPAY_CMD,
-     RUNTIME_LOG_BLE_WATCH_REPLY, //手表回复
- 
-     RUNTIME_LOG_BLE_APP_SYN_END, //同步结束
- 
-     RUNTIME_LOG_BR_CONNECT_HFP,
-     RUNTIME_LOG_BR_DISCONNECT_HFP,
-     RUNTIME_LOG_BR_CONNECT_A2DP,
-     RUNTIME_LOG_BR_DISCONNECT_A2DP,
-     RUNTIME_LOG_BR_A2DP_SNK_START_STREAM,
-     RUNTIME_LOG_BR_A2DP_SNK_NOT_PLAYING,
-     RUNTIME_LOG_BR_A2DP_SNK_PLAYING,
- 
- 
-     RUNTIME_LOG_BR_CONNECT_A2DP_HEADSET,
-     RUNTIME_LOG_BR_DISCONNECT_A2DP_HEADSET,
-     //电话
-     RUNTIME_LOG_PHONE_MIN = 0x0200,
-     RUNTIME_LOG_PHONE_HFP_ACTIVE,
-     RUNTIME_LOG_PHONE_HFP_HELD,
-     RUNTIME_LOG_PHONE_HFP_DIALING,
-     RUNTIME_LOG_PHONE_HFP_ALERTING,
-     RUNTIME_LOG_PHONE_HFP_INCOMING,
-     RUNTIME_LOG_PHONE_HFP_WAITING,
-     RUNTIME_LOG_PHONE_HFP_FINISHED,
-     RUNTIME_LOG_PHONE_HFP_TO_MOBILE_PHONE,
- 
-     RUNTIME_LOG_PHONE_CAT1_DIALING,
-     RUNTIME_LOG_PHONE_CAT1_INCOMING,
-     RUNTIME_LOG_PHONE_CAT1_WAITING,
-     RUNTIME_LOG_PHONE_CAT1_ACTIVE,
-     RUNTIME_LOG_PHONE_CAT1_FINISH,
-     RUNTIME_LOG_PHONE_CAT1_REJECT,
-     RUNTIME_LOG_PHONE_RESET, //状态复位
+     RUNTIME_LOG_BLE_BROADCAST_ON,           // 0x0101 广播开启
+     RUNTIME_LOG_BLE_BROADCAST_OFF,          // 0x0102 广播关闭
+     RUNTIME_LOG_BLE_CONNECT,                // 0x0103 ble连接
+     RUNTIME_LOG_BLE_DISCONNECT,             // 0x0104 ble断开
+ 
+     RUNTIME_LOG_BLE_CONNECT_UPDATE_50,      // 0x0105 连接参数更新50
+     RUNTIME_LOG_BLE_CONNECT_UPDATE_12,      // 0x0106 连接参数更新12 
+ 
+     RUNTIME_LOG_BLE_APP_CMD,                // 0107 APP下发命令
+     RUNTIME_LOG_BLE_ALIPAY_CMD,             // 0108 支付宝命令
+     RUNTIME_LOG_BLE_WATCH_REPLY,            // 0109 手表回复
+ 
+     RUNTIME_LOG_BLE_APP_SYN_END,            // 010a 同步结束
+ 
+     RUNTIME_LOG_BR_CONNECT_HFP,             // 010b HFP连接
+     RUNTIME_LOG_BR_DISCONNECT_HFP,          // 010c HFP断开
+     RUNTIME_LOG_BR_CONNECT_A2DP,            // 010d A2DP连接
+     RUNTIME_LOG_BR_DISCONNECT_A2DP,         // 010e A2DP断开
+     RUNTIME_LOG_BR_A2DP_SNK_START_STREAM,   // 010f A2DP流创建
+     RUNTIME_LOG_BR_A2DP_SNK_NOT_PLAYING,    // 0110 A2DP流销毁
+     RUNTIME_LOG_BR_A2DP_SNK_PLAYING,        // 0111 A2DP开始播放
+ 
+     RUNTIME_LOG_BR_CONNECT_A2DP_HEADSET,    // 0112 连接耳机
+     RUNTIME_LOG_BR_DISCONNECT_A2DP_HEADSET, // 0113 断开耳机
+     // 电话
+     RUNTIME_LOG_PHONE_MIN = 0x0200,  
+     RUNTIME_LOG_PHONE_HFP_ACTIVE,           // 0201 HFP电话接听
+     RUNTIME_LOG_PHONE_HFP_HELD,             // 0202 HFP电话挂起
+     RUNTIME_LOG_PHONE_HFP_DIALING,          // 0203 HFP电话拨打
+     RUNTIME_LOG_PHONE_HFP_ALERTING,         // 0204 HFP电话响铃
+     RUNTIME_LOG_PHONE_HFP_INCOMING,         // 0205 HFP电话来电
+     RUNTIME_LOG_PHONE_HFP_WAITING,          // 0206 HFP电话等待
+     RUNTIME_LOG_PHONE_HFP_FINISHED,         // 0207 HFP电话结束
+     RUNTIME_LOG_PHONE_HFP_TO_MOBILE_PHONE,  // 0208 HFP电话拨打电话
+ 
+     RUNTIME_LOG_PHONE_CAT1_DIALING,         // 0209 cat1电话拨打
+     RUNTIME_LOG_PHONE_CAT1_INCOMING,        // 020a cat1电话来电
+     RUNTIME_LOG_PHONE_CAT1_WAITING,         // 020b cat1电话等待
+     RUNTIME_LOG_PHONE_CAT1_ACTIVE,          // 020c cat1电话接听
+     RUNTIME_LOG_PHONE_CAT1_FINISH,          // 020d cat1电话结束
+     RUNTIME_LOG_PHONE_CAT1_REJECT,          // 020e cat1电话拒绝
+     RUNTIME_LOG_PHONE_RESET,                // 020f 电话状态复位
  
      // cat1
-     RUNTIME_LOG_CAT1_MIN=0x0300,
-     RUNTIME_LOG_CAT1_UDP_MSG_COMMING,
-     RUNTIME_LOG_CAT1_UDP_MSG_NETWORKSTAT,
-     RUNTIME_LOG_CAT1_UDP_MSG_TIME,
-     RUNTIME_LOG_CAT1_UDP_MSG_CONNECTED,
-     RUNTIME_LOG_CAT1_UDP_MSG_DISCONNECTED,
-     RUNTIME_LOG_CAT1_UDP_MSG_OTA_UPDATE,
-     RUNTIME_LOG_CAT1_UDP_MSG_REPLY,
-     RUNTIME_LOG_CAT1_UDP_MSG_DMP_CM_ADDRESS,
-     RUNTIME_LOG_CAT1_UDP_GET_CAT1VER,
-     RUNTIME_LOG_CAT1_UDP_MSG_ATCMD,
-     RUNTIME_LOG_CAT1_UDP_MSG_RECV_DMP,
-     RUNTIME_LOG_CAT1_UDP_MSG_SMS,
- 
+     RUNTIME_LOG_CAT1_MIN = 0x0300,
+     RUNTIME_LOG_CAT1_UDP_MSG_COMMING,           // 0301 CAT1来电消息
+     RUNTIME_LOG_CAT1_UDP_MSG_NETWORKSTAT,       // 0302 获取Cat1信号信息,VOLTE信息,信号强度,SIM卡状态 
+     RUNTIME_LOG_CAT1_UDP_MSG_TIME,              // 0303 获取Cat1时间
+     RUNTIME_LOG_CAT1_UDP_MSG_CONNECTED,         // 0304 CAT1电话接听消息 
+     RUNTIME_LOG_CAT1_UDP_MSG_DISCONNECTED,      // 0305 CAT1电话挂断消息
+     RUNTIME_LOG_CAT1_UDP_MSG_OTA_UPDATE,        // 0306 触发Cat1 OTA升级
+     RUNTIME_LOG_CAT1_UDP_MSG_REPLY,             // 0307 UDP_MSG_REPLY
+     RUNTIME_LOG_CAT1_UDP_MSG_DMP_CM_ADDRESS,    // 0308 BLE发送移动入库地址
+     RUNTIME_LOG_CAT1_UDP_GET_CAT1VER,           // 0309 获取Cat1版本号
+     RUNTIME_LOG_CAT1_UDP_MSG_ATCMD,             // 030a CAT1 AT指令
+     RUNTIME_LOG_CAT1_UDP_MSG_RECV_DMP,          // 030b 入库配置flag
+     RUNTIME_LOG_CAT1_UDP_MSG_SMS,               // 030c CAT1接收到的SMS信息给MCU,包含电话号及短信内容
  
      /*运动*/
-   RUNTIME_LOG_SPORT_MIN = 0x0400,
-   //手表发起运动
-   RUNTIME_LOG_DIAL_SPORT_LAUNCH,
-   // App发起运动
-   RUNTIME_LOG_APP_SPORT_LAUNCH,
-   //开始特殊运动(跑步,走路,跑步机,漫步机)
-   RUNTIME_LOG_SPORT_SPECIAL_START,
-   //开始普通运动
-   RUNTIME_LOG_SPORT_NORMAL_START,
-   //暂停运动
-   RUNTIME_LOG_SPORT_PAUSE,
-   //恢复运动
-   RUNTIME_LOG_SPORT_RESUME,
-   //结束运动
-   RUNTIME_LOG_SPORT_END,
-   /*******************************/
- 
-   /*******************************/
-   //心率
-   RUNTIME_LOG_HEART_MIN = 0x0500,
-   //主动测量心率
-   RUNTIME_LOG_HEART_MEASURE,
-   //测量心率结束
-   RUNTIME_LOG_HEART_MEASURE_END,
-   //被动测量心率
-   RUNTIME_LOG_HEART_PASSIVE_MEASURE,
-   //被动测量心率结束
-   RUNTIME_LOG_OXYGEN_PASSIVE_MEASURE_END,
-   //运动测量心率开始或继续
-   RUNTIME_LOG_HEART_SPORT_MEASURE,
-   //运动测量心率暂停或结束
-   RUNTIME_LOG_OXYGEN_SPORT_MEASURE_END,
-   /*******************************/
- 
-   //佩戴
-   RUNTIME_LOG_WEAR_MIN = 0x0600,
-    RUNTIME_LOG_WEAR_MIN_START = 0x0601,
+     RUNTIME_LOG_SPORT_MIN = 0x0400,
+     // 手表发起运动
+     RUNTIME_LOG_DIAL_SPORT_LAUNCH,
+     // App发起运动
+     RUNTIME_LOG_APP_SPORT_LAUNCH,
+     // 开始特殊运动(跑步,走路,跑步机,漫步机)
+     RUNTIME_LOG_SPORT_SPECIAL_START,
+     // 开始普通运动
+     RUNTIME_LOG_SPORT_NORMAL_START,
+     // 暂停运动
+     RUNTIME_LOG_SPORT_PAUSE,
+     // 恢复运动
+     RUNTIME_LOG_SPORT_RESUME,
+     // 结束运动
+     RUNTIME_LOG_SPORT_END,
+     /*******************************/
+ 
+     /*******************************/
+     // 心率
+     RUNTIME_LOG_HEART_MIN = 0x0500,
+     // 主动测量心率
+     RUNTIME_LOG_HEART_MEASURE,
+     // 测量心率结束
+     RUNTIME_LOG_HEART_MEASURE_END,
+     // 被动测量心率
+     RUNTIME_LOG_HEART_PASSIVE_MEASURE,
+     // 被动测量心率结束
+     RUNTIME_LOG_OXYGEN_PASSIVE_MEASURE_END,
+     // 运动测量心率开始或继续
+     RUNTIME_LOG_HEART_SPORT_MEASURE,
+     // 运动测量心率暂停或结束
+     RUNTIME_LOG_OXYGEN_SPORT_MEASURE_END,
+     /*******************************/
+ 
+     // 佩戴
+     RUNTIME_LOG_WEAR_MIN = 0x0600,
+     RUNTIME_LOG_WEAR_MIN_START = 0x0601,
      RUNTIME_LOG_WEAR_MIN_STOP = 0x0602,
  
-   /*******************************/
-   //血氧
-   RUNTIME_LOG_OXYGEN_MIN = 0x0700,
-   //主动测量血氧
-   RUNTIME_LOG_OXYGEN_MEASURE,
-   //测量血氧结束
-   RUNTIME_LOG_OXYGEN_MEASURE_END,
-   /*******************************/
- 
-   // LCD
-   RUNTIME_LOG_LCD_MIN = 0x0800,
-   RUNTIME_LOG_LCD_ON,  // 0x0801 屏幕亮
-   RUNTIME_LOG_LCD_OFF, // 0x0802 屏幕灭
-   //抬腕
-   RUNTIME_LOG_RAISE_MIN = 0x0900,
-   RUNTIME_LOG_RAISE_MIN_UP = 0x0901,
-   RUNTIME_LOG_RAISE_MIN_DOWN = 0x0902,
- 
-   //充电
-   RUNTIME_LOG_CHARGE_MIN = 0x0A00,
-   RUNTIME_LOG_CHARGE_START, // 0x0A01 充电开始
-   RUNTIME_LOG_CHARGE_STOP,  // 0x0A02 充电停止
- 
-   //电池电量变化
-   RUNTIME_LOG_BATTERY_MIN = 0x0B00,
-   RUNTIME_LOG_BATTERY_MIN_UP = 0x0B01,
-   RUNTIME_LOG_BATTERY_MIN_DOWN = 0x0B02,
- 
-   //马达
-   RUNTIME_LOG_MOTOR_MIN = 0x0C00,
-   RUNTIME_LOG_MOTOR_START, // 0x0C01 马达开始转动
-   RUNTIME_LOG_MOTOR_STOP,  // 0x0C02 马达停止转动
- 
-   /*******************************/
-   //表盘
-   RUNTIME_LOG_DIAL_MIN = 0x0D00,
-   //表盘切换视频表盘(后续增加该类型,目前不好判断)
-   RUNTIME_LOG_DIAL_VIDEO_START,
-   //表盘切换指针表盘
-   RUNTIME_LOG_DIAL_POINTER_START,
-   //表盘切换序列帧表盘
-   RUNTIME_LOG_DIAL_SEQUENCE_START,
-   //表盘切换数码表盘
-   RUNTIME_LOG_DIAL_DIGITAL_START,
-   /*******************************/
- 
-   //音乐
-   RUNTIME_LOG_MUSIC_MIN = 0x0E00,
-   RUNTIME_LOG_LOCAL_MUSIC_PLAY_START, // 0x0E01 本地音乐开始播放
-   RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE, // 0x0E02 本地音乐开始暂停
-   RUNTIME_LOG_LOCAL_MUSIC_PLAY_STOP,  // 0x0E03 本地音乐播放停止
- 
-   //铃声
-   RUNTIME_LOG_RING_MIN = 0x0F00,
-   RUNTIME_LOG_RING_PLAY_START_ALARM,     // 0x0F01 闹钟铃声开始播放
-   RUNTIME_LOG_RING_PLAY_STOP_ALARM,      // 0x0F02 闹钟铃声播放停止
-   RUNTIME_LOG_RING_PLAY_START_COUNTDOWN, // 0x0F03 倒计时铃声开始播放
-   RUNTIME_LOG_RING_PLAY_STOP_COUNTDOWN,  // 0x0F04 倒计时铃声播放停止
-   RUNTIME_LOG_RING_PLAY_START_FINDWATCH, // 0x0F05 查找手表铃声开始播放
-   RUNTIME_LOG_RING_PLAY_STOP_FINDWATCH, // 0x0F06 查找手表铃声播放停止
- 
-   //低功耗记录
+     /*******************************/
+     // 血氧
+     RUNTIME_LOG_OXYGEN_MIN = 0x0700,
+     // 主动测量血氧
+     RUNTIME_LOG_OXYGEN_MEASURE,
+     // 测量血氧结束
+     RUNTIME_LOG_OXYGEN_MEASURE_END,
+     /*******************************/
+ 
+     // LCD
+     RUNTIME_LOG_LCD_MIN = 0x0800,
+     RUNTIME_LOG_LCD_ON,  // 0x0801 屏幕亮
+     RUNTIME_LOG_LCD_OFF, // 0x0802 屏幕灭
+     // 抬腕
+     RUNTIME_LOG_RAISE_MIN = 0x0900,
+     RUNTIME_LOG_RAISE_MIN_UP = 0x0901,
+     RUNTIME_LOG_RAISE_MIN_DOWN = 0x0902,
+ 
+     // 充电
+     RUNTIME_LOG_CHARGE_MIN = 0x0A00,
+     RUNTIME_LOG_CHARGE_START, // 0x0A01 充电开始
+     RUNTIME_LOG_CHARGE_STOP,  // 0x0A02 充电停止
+ 
+     // 电池电量变化
+     RUNTIME_LOG_BATTERY_MIN = 0x0B00,
+     RUNTIME_LOG_BATTERY_MIN_UP = 0x0B01,
+     RUNTIME_LOG_BATTERY_MIN_DOWN = 0x0B02,
+ 
+     // 马达
+     RUNTIME_LOG_MOTOR_MIN = 0x0C00,
+     RUNTIME_LOG_MOTOR_START, // 0x0C01 马达开始转动
+     RUNTIME_LOG_MOTOR_STOP,  // 0x0C02 马达停止转动
+ 
+     /*******************************/
+     // 表盘
+     RUNTIME_LOG_DIAL_MIN = 0x0D00,
+     // 表盘切换视频表盘(后续增加该类型,目前不好判断)
+     RUNTIME_LOG_DIAL_VIDEO_START,
+     // 表盘切换指针表盘
+     RUNTIME_LOG_DIAL_POINTER_START,
+     // 表盘切换序列帧表盘
+     RUNTIME_LOG_DIAL_SEQUENCE_START,
+     // 表盘切换数码表盘
+     RUNTIME_LOG_DIAL_DIGITAL_START,
+     /*******************************/
+ 
+     // 音乐
+     RUNTIME_LOG_MUSIC_MIN = 0x0E00,
+     RUNTIME_LOG_LOCAL_MUSIC_PLAY_START, // 0x0E01 本地音乐开始播放
+     RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE, // 0x0E02 本地音乐开始暂停
+     RUNTIME_LOG_LOCAL_MUSIC_PLAY_STOP,  // 0x0E03 本地音乐播放停止
+ 
+     // 铃声
+     RUNTIME_LOG_RING_MIN = 0x0F00,
+     RUNTIME_LOG_RING_PLAY_START_ALARM,     // 0x0F01 闹钟铃声开始播放
+     RUNTIME_LOG_RING_PLAY_STOP_ALARM,      // 0x0F02 闹钟铃声播放停止
+     RUNTIME_LOG_RING_PLAY_START_COUNTDOWN, // 0x0F03 倒计时铃声开始播放
+     RUNTIME_LOG_RING_PLAY_STOP_COUNTDOWN,  // 0x0F04 倒计时铃声播放停止
+     RUNTIME_LOG_RING_PLAY_START_FINDWATCH, // 0x0F05 查找手表铃声开始播放
+     RUNTIME_LOG_RING_PLAY_STOP_FINDWATCH,  // 0x0F06 查找手表铃声播放停止
+ 
+     // 低功耗记录
      RUNTIME_LOG_lOW_POWER_MIN = 0x1000,
 -    RUNTIME_LOG_lOW_POWER_M_SLEEP,      // 0x1001 进入M低功耗记录
 -    RUNTIME_LOG_lOW_POWER_NO_M_SLEEP,   // 0x1002 退出M低功耗记录
 -    RUNTIME_LOG_lOW_POWER_SYS_SLEEP,    // 0x1003 进入系统低功耗记录
 -    RUNTIME_LOG_lOW_POWER_NO_SYS_SLEEP, // 0x1004 退出系统低功耗记录
 -    // 录音
 +    RUNTIME_LOG_lOW_POWER_M_SLEEP,
 +    RUNTIME_LOG_lOW_POWER_NO_M_SLEEP,
 +    RUNTIME_LOG_lOW_POWER_SYS_SLEEP_1,//醒来
 +    RUNTIME_LOG_lOW_POWER_SYS_SLEEP_0,//睡
-   //录音
-   RUNTIME_LOG_RECORD_MIN = 0x1100,
-   RUNTIME_LOG_RECORD_START,    // 0x1101 录音开始
-   RUNTIME_LOG_RECORD_STOP,     // 0x1102 录音停止
-   RUNTIME_LOG_RECORD_START_AI, // 0x1103 AI录音开始
-   RUNTIME_LOG_RECORD_STOP_AI,  // 0x1104 AI录音停止
++    //录音
+     RUNTIME_LOG_RECORD_MIN = 0x1100,
+     RUNTIME_LOG_RECORD_START,    // 0x1101 录音开始
+     RUNTIME_LOG_RECORD_STOP,     // 0x1102 录音停止
+     RUNTIME_LOG_RECORD_START_AI, // 0x1103 AI录音开始
+     RUNTIME_LOG_RECORD_STOP_AI,  // 0x1104 AI录音停止
  
-   //消息
-   RUNTIME_LOG_MSG_MIN = 0x1200,
-   //消息显示
-   RUNTIME_LOG_MSG_SHOW,
-   RUNTIME_LOG_VOTE_ID =0x1300,
+     // 消息
+     RUNTIME_LOG_MSG_MIN = 0x1200,
+     // 消息显示
+     RUNTIME_LOG_MSG_SHOW,
++    
++    RUNTIME_LOG_VOTE_ID =0x1300,
  
- } runtime_log_cmd_Id;
+   } runtime_log_cmd_Id;
  
- errcode_t uapi_save_runtime_log(uint16_t cmd);
+   errcode_t uapi_save_runtime_log(uint16_t cmd);
  
- errcode_t uapi_runtime_log_service_init(void);
+   errcode_t uapi_runtime_log_service_init(void);
  
  #ifdef __cplusplus
  #if __cplusplus