From fe390993df9cd4fea098a7968ab655518931e93e Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 17 Feb 2024 15:02:25 +0800 Subject: [PATCH] add read_device_exception_state --- heart_rate_sensor_protocol.h | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/heart_rate_sensor_protocol.h b/heart_rate_sensor_protocol.h index 38f7db5..0a97423 100644 --- a/heart_rate_sensor_protocol.h +++ b/heart_rate_sensor_protocol.h @@ -22,6 +22,7 @@ typedef enum { kifyhrs_ecode_no_record_find = 7, kifyhrs_ecode_parameter_error = 8, kifyhrs_ecode_electrode_is_not_inserted = 9, + kifyhrs_ecode_device_exception = 10, } ify_hrs_error_code_t; typedef enum { @@ -48,26 +49,27 @@ 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_start_capture_time_v2 = 17, - ify_hrs_cmd_start_upload_record_v2 = 18, - ify_hrs_cmd_ads1293_error_detail_info = 19, // 内部使用 - ify_hrs_cmd_change_sn = 20, // 修改sn编码,仅且支持一次修改,修改后不可再次修改 + 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_cmd_ads1293_error_detail_info = 19, // 内部使用 + ify_hrs_cmd_change_sn = 20, // 修改sn编码,仅且支持一次修改,修改后不可再次修改 + ify_hrs_cmd_read_device_exception_state = 21, // 读取设备异常状态 ify_hrs_report_heartrate_data = 101, ify_hrs_report_battery_level = 102,