From da8e07706a41c157a3e42da3f69136f665f5a20f Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 8 Feb 2024 15:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- heart_rate_sensor_protocol.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/heart_rate_sensor_protocol.h b/heart_rate_sensor_protocol.h index a5cb2b7..9b4c1ca 100644 --- a/heart_rate_sensor_protocol.h +++ b/heart_rate_sensor_protocol.h @@ -20,6 +20,7 @@ typedef enum { kifyhrs_ecode_hardware_error = 5, kifyhrs_ecode_sensor_drop = 6, kifyhrs_ecode_no_record_find = 7, + kifyhrs_ecode_parameter_error = 8, } ify_hrs_error_code_t; typedef enum { @@ -46,22 +47,25 @@ 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_start_capture = 6, - ify_hrs_cmd_stop_capture = 7, - ify_hrs_cmd_start_realtime_report = 8, - ify_hrs_cmd_stop_realtime_report = 9, - ify_hrs_cmd_read_records_info = 10, - ify_hrs_cmd_del_record = 11, - ify_hrs_cmd_start_upload_record = 12, - ify_hrs_cmd_enter_ota = 13, - ify_hrs_cmd_read_sn = 14, - ify_hrs_cmd_reset = 15, - ify_hrs_cmd_stop_upload_record = 16, + 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_capture = 6, + ify_hrs_cmd_stop_capture = 7, + ify_hrs_cmd_start_realtime_report = 8, + ify_hrs_cmd_stop_realtime_report = 9, + ify_hrs_cmd_read_records_info = 10, + ify_hrs_cmd_del_record = 11, + ify_hrs_cmd_start_upload_record = 12, + ify_hrs_cmd_enter_ota = 13, + ify_hrs_cmd_read_sn = 14, + ify_hrs_cmd_reset = 15, + ify_hrs_cmd_stop_upload_record = 16, + ify_hrs_cmd_start_capture_time_v2 = 17, + ify_hrs_cmd_start_upload_record_v2 = 18, + ify_hrs_report_heartrate_data = 101, ify_hrs_report_battery_level = 102, ify_hrs_report_low_battey_level = 103,