From d503455114aee8766b30ba308604f8f8fd7eca99 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 4 May 2024 10:12:36 +0800 Subject: [PATCH] add 1291 debug cmd --- heart_rate_sensor_protocol.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/heart_rate_sensor_protocol.h b/heart_rate_sensor_protocol.h index ce0da4e..03f8832 100644 --- a/heart_rate_sensor_protocol.h +++ b/heart_rate_sensor_protocol.h @@ -117,10 +117,17 @@ 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_ads1291_wakeup = 200, + ify_hrs_ads1291_standby = 201, + ify_hrs_ads1291_reset = 202, + ify_hrs_ads1291_start_conversion = 203, + ify_hrs_ads1291_stop_conversion = 204, + ify_hrs_ads1291_offsetcal = 205, + ify_hrs_ads1291_read_reg = 206, + ify_hrs_ads1291_write_reg = 207, + ify_hrs_ads1291_report_enable = 208, + ify_hrs_ads1291_report_disable_enable = 209, + ify_hrs_ads1291_report = 210, } ify_hrs_cmd_t; @@ -238,6 +245,15 @@ typedef struct { uint8_t frame_index; uint8_t cmd; + uint32_t sample_data_index; + uint32_t reportdata[50]; +} ads1291_report_packet_t; + +typedef struct { + uint8_t frame_type; + uint8_t frame_index; + uint8_t cmd; + uint8_t drop_state0; uint8_t drop_state1; } sensor_drop_event_report_packet_t;