Browse Source

update

master
zhaohe 1 year ago
parent
commit
fa5ad80d7f
  1. 19
      app/src/one_conduction_main.c
  2. 2
      ify_hrs_protocol

19
app/src/one_conduction_main.c

@ -184,6 +184,9 @@ void one_conduction_process_rx_packet(uint8_t* rx, int len) {
send_success_receipt(rxheader, 0);
}
/***********************************************************************************************************************
* ²âÊÔ *
***********************************************************************************************************************/
else if (cmd == ify_hrs_cmd_set_ecg_in_test_mode) {
int32_t testmode = *(int32_t*)rxheader->data;
ecg_service_set_in_test_mode(testmode);
@ -196,6 +199,22 @@ void one_conduction_process_rx_packet(uint8_t* rx, int len) {
send_success_receipt(rxheader, 0);
}
else if (cmd == ify_hrs_cmd_ecg_subic_read_reg) {
uint8_t addr = *(uint8_t*)rxheader->data;
uint8_t val = ecg_service_subic_read_reg(addr);
txheader->data[0] = val;
zdatachannel_data_send2((uint8_t*)txheader, sizeof(ify_hrs_packet_t) + 1);
}
else if (cmd == ify_hrs_cmd_ecg_subic_write_reg) {
uint8_t addr = *(uint8_t*)rxheader->data;
uint8_t val = *(uint8_t*)(rxheader->data + 1);
ecg_service_subic_write_reg(addr, val);
send_success_receipt(rxheader, 0);
}
else {
send_error_receipt(rxheader, kifyhrs_ecode_cmd_not_support);
}

2
ify_hrs_protocol

@ -1 +1 @@
Subproject commit a532e43847aa8dd525f86748104a496ec561e841
Subproject commit c5a86174de8f27f4c8ab6c18dd131effa7b43ea5
Loading…
Cancel
Save