From 81bdc5323d5618123e1cbe6ee590d3514ca216b0 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 2 May 2024 17:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- heart_rate_sensor_protocol.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/heart_rate_sensor_protocol.h b/heart_rate_sensor_protocol.h index 46126d5..5b00334 100644 --- a/heart_rate_sensor_protocol.h +++ b/heart_rate_sensor_protocol.h @@ -50,11 +50,11 @@ typedef enum { } ify_hrs_sensor_pos_t; typedef enum { - ify_hrs_cmd_read_device_version = 1, - ify_hrs_cmd_read_sensor_info = 2, - ify_hrs_cmd_read_device_state = 3, - ify_hrs_cmd_read_time = 4, - ify_hrs_cmd_sync_time = 5, + ify_hrs_cmd_read_device_version = 1, + ify_hrs_cmd_read_sensor_info = 2, + ify_hrs_cmd_read_device_state = 3, + ify_hrs_cmd_read_time = 4, + ify_hrs_cmd_sync_time = 5, ify_hrs_cmd_start_realtime_preview = 8, ify_hrs_cmd_stop_realtime_preview = 9, ify_hrs_cmd_read_records_info = 10, @@ -78,6 +78,11 @@ typedef enum { ify_hrs_report_sensor_drop_detect = 105, ify_hrs_report_record_upload_end = 106, + ify_hrs_test_cmd_start_capture = 200, // uint8 0/1 + ify_hrs_test_cmd_stop_capture = 201, // uint8 0/1 + ify_hrs_test_cmd_read_reg = 202, // uint8 addr + ify_hrs_test_cmd_write_reg = 203, // uint8 addr, uint8 val + } ify_hrs_cmd_t; /******************************************************************************* @@ -109,11 +114,11 @@ typedef struct { uint8_t low_battery : 1; // 位置 uint8_t full_storge : 1; // 位置 // uint8_t is_storaging : 1; // 位置 - uint8_t holder : 4; // 位置 + uint8_t holder : 4; // 位置 } device_state0; - uint8_t device_state1; // 预留 - uint8_t powerlevel; // 电量 - uint8_t storage_item_num; // 记录存储条数 + uint8_t device_state1; // 预留 + uint8_t powerlevel; // 电量 + uint8_t storage_item_num; // 记录存储条数 // uint32_t storage_setting_time_s; // uint32_t storage_has_storaged_time_s; } device_state_receipt_t;