Browse Source

update

master
zhaohe 1 year ago
parent
commit
32f4aa23f8
  1. 2
      ify_hrs_protocol
  2. 40
      mainwindow.cpp
  3. 169
      mainwindow.ui
  4. 30
      src/electrocardiograph_tester.cpp
  5. 5
      src/electrocardiograph_tester.hpp

2
ify_hrs_protocol

@ -1 +1 @@
Subproject commit a1fda58c30f6bb892c9f503280b3896c67e00dda
Subproject commit c5a86174de8f27f4c8ab6c18dd131effa7b43ea5

40
mainwindow.cpp

@ -577,18 +577,18 @@ void MainWindow::on_TestCmd_readSubIcRegs_clicked() {
instructionPreviewClear(); instructionPreviewClear();
try { try {
uint8_t data[12]; uint8_t data[12];
data[ADS129X_REG_ID] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_ID);
data[ADS129X_REG_CONFIG1] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CONFIG1);
data[ADS129X_REG_CONFIG2] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CONFIG2);
data[ADS129X_REG_LOFF] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_LOFF);
data[ADS129X_REG_CH1SET] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CH1SET);
data[ADS129X_REG_CH2SET] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CH2SET);
data[ADS129X_REG_RLDSENS] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_RLDSENS);
data[ADS129X_REG_LOFFSENS] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_LOFFSENS);
data[ADS129X_REG_LOFFSTAT] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_LOFFSTAT);
data[ADS129X_REG_RESP1] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_RESP1);
data[ADS129X_REG_RESP2] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_RESP2);
data[ADS129X_REG_GPIO] = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_GPIO);
data[ADS129X_REG_ID] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_ID);
data[ADS129X_REG_CONFIG1] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CONFIG1);
data[ADS129X_REG_CONFIG2] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CONFIG2);
data[ADS129X_REG_LOFF] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_LOFF);
data[ADS129X_REG_CH1SET] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CH1SET);
data[ADS129X_REG_CH2SET] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CH2SET);
data[ADS129X_REG_RLDSENS] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_RLDSENS);
data[ADS129X_REG_LOFFSENS] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_LOFFSENS);
data[ADS129X_REG_LOFFSTAT] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_LOFFSTAT);
data[ADS129X_REG_RESP1] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_RESP1);
data[ADS129X_REG_RESP2] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_RESP2);
data[ADS129X_REG_GPIO] = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_GPIO);
ishow("reg %10s %02d: 0x%02x", "ID", ADS129X_REG_ID, data[ADS129X_REG_ID]); ishow("reg %10s %02d: 0x%02x", "ID", ADS129X_REG_ID, data[ADS129X_REG_ID]);
ishow("reg %10s %02d: 0x%02x", "CONFIG1", ADS129X_REG_CONFIG1, data[ADS129X_REG_CONFIG1]); ishow("reg %10s %02d: 0x%02x", "CONFIG1", ADS129X_REG_CONFIG1, data[ADS129X_REG_CONFIG1]);
@ -615,7 +615,7 @@ void MainWindow::on_TestCmd_writeSubICReg_clicked() {
uint32_t val = str2int(ui->TestCmd_writeSubICReg_p1->toPlainText()); uint32_t val = str2int(ui->TestCmd_writeSubICReg_p1->toPlainText());
instructionPreviewClear(); instructionPreviewClear();
try { try {
ElectrocardiographTester::ins()->testCmdWriteReg(add, val);
ElectrocardiographTester::ins()->ecg_subic_write_reg(add, val);
ishow("write reg %d: 0x%02x success", add, val); ishow("write reg %d: 0x%02x success", add, val);
} catch (zexception &exception) { } catch (zexception &exception) {
processException(exception); processException(exception);
@ -629,13 +629,13 @@ void MainWindow::on_TestCmd_writeSubICRegMask_clicked() {
instructionPreviewClear(); instructionPreviewClear();
try { try {
uint8_t regval = ElectrocardiographTester::ins()->testCmdReadReg(add);
uint8_t regval = ElectrocardiographTester::ins()->ecg_subic_read_reg(add);
uint8_t oldval = regval; uint8_t oldval = regval;
uint8_t mask = (1 << bitnum) - 1; uint8_t mask = (1 << bitnum) - 1;
mask = mask << off; mask = mask << off;
regval = regval & (~mask); regval = regval & (~mask);
regval = regval | (val << off); regval = regval | (val << off);
ElectrocardiographTester::ins()->testCmdWriteReg(add, regval);
ElectrocardiographTester::ins()->ecg_subic_write_reg(add, regval);
ishow("write reg %d: 0x%02x -> 0x%02x success", add, oldval, regval); ishow("write reg %d: 0x%02x -> 0x%02x success", add, oldval, regval);
} catch (const std::exception &e) { } catch (const std::exception &e) {
std::cerr << e.what() << '\n'; std::cerr << e.what() << '\n';
@ -666,15 +666,15 @@ void MainWindow::on_TestCmd_stopCapture_clicked() {
void MainWindow::on_TestCmd_changeECGSrcToSquareWave_clicked() { void MainWindow::on_TestCmd_changeECGSrcToSquareWave_clicked() {
instructionPreviewClear(); instructionPreviewClear();
try { try {
uint8_t cfg2 = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CONFIG2);
uint8_t ch1set = ElectrocardiographTester::ins()->testCmdReadReg(ADS129X_REG_CH1SET);
uint8_t cfg2 = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CONFIG2);
uint8_t ch1set = ElectrocardiographTester::ins()->ecg_subic_read_reg(ADS129X_REG_CH1SET);
cfg2 = ADS129X_SET_BITS(cfg2, ADS129X_INT_TEST, ADS129X_INT_TEST_ON); cfg2 = ADS129X_SET_BITS(cfg2, ADS129X_INT_TEST, ADS129X_INT_TEST_ON);
cfg2 = ADS129X_SET_BITS(cfg2, ADS129X_INT_FREQ, ADS129X_INT_FREQ_AC); cfg2 = ADS129X_SET_BITS(cfg2, ADS129X_INT_FREQ, ADS129X_INT_FREQ_AC);
ch1set = ADS129X_SET_BITS(ch1set, ADS129X_MUXx, ADS129X_CHx_INPUT_TEST); ch1set = ADS129X_SET_BITS(ch1set, ADS129X_MUXx, ADS129X_CHx_INPUT_TEST);
ElectrocardiographTester::ins()->testCmdWriteReg(ADS129X_REG_CONFIG2, cfg2);
ElectrocardiographTester::ins()->testCmdWriteReg(ADS129X_REG_CH1SET, ch1set);
ElectrocardiographTester::ins()->ecg_subic_write_reg(ADS129X_REG_CONFIG2, cfg2);
ElectrocardiographTester::ins()->ecg_subic_write_reg(ADS129X_REG_CH1SET, ch1set);
ishow("call change ECG src to square wave success"); ishow("call change ECG src to square wave success");
} catch (zexception &exception) { } catch (zexception &exception) {
@ -748,7 +748,7 @@ void MainWindow::on_TestCmd_writeSubICAllReg_clicked() {
data[i] = str2int(reglist[i]); data[i] = str2int(reglist[i]);
} }
for (size_t i = 0; i < 12; i++) { for (size_t i = 0; i < 12; i++) {
ElectrocardiographTester::ins()->testCmdWriteReg(i, data[i]);
ElectrocardiographTester::ins()->ecg_subic_write_reg(i, data[i]);
ishow("write reg %d: 0x%02x success", i, data[i]); ishow("write reg %d: 0x%02x success", i, data[i]);
} }
ishow("write all reg success"); ishow("write all reg success");

169
mainwindow.ui

@ -903,7 +903,7 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number>
<number>2</number>
</property> </property>
<widget class="QWidget" name="buttonTabWidgetPage1"> <widget class="QWidget" name="buttonTabWidgetPage1">
<attribute name="title"> <attribute name="title">
@ -916,8 +916,8 @@ p, li { white-space: pre-wrap; }
<string>设备基本操作</string> <string>设备基本操作</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QPushButton" name="readDeviceState">
<item row="0" column="2">
<widget class="QPushButton" name="readSN">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -931,12 +931,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>读取设备状态信息</string>
<string>读取设备SN</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QPushButton" name="syncTime">
<item row="0" column="0">
<widget class="QPushButton" name="readDeviceVersion">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -950,12 +950,25 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>同步时间</string>
<string>读取设备版本信息</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QPushButton" name="readSN">
<item row="11" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="syncTime">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -969,12 +982,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>读取设备SN</string>
<string>同步时间</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QPushButton" name="readSensorInfo">
<item row="0" column="1">
<widget class="QPushButton" name="readDeviceState">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -988,12 +1001,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>读取传感器信息</string>
<string>读取设备状态信息</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QPushButton" name="setEcgInTestMode">
<widget class="QPushButton" name="setEcgInTestMode_2">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -1007,12 +1020,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>设置ECG为正常模式</string>
<string>失能ECG上报数据算法</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0">
<widget class="QPushButton" name="resetDevice">
<item row="2" column="1">
<widget class="QPushButton" name="readTime">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -1026,12 +1039,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>复位设备</string>
<string>读取设备时间</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QPushButton" name="readDeviceVersion">
<item row="0" column="3">
<widget class="QPushButton" name="readSensorInfo">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -1045,12 +1058,12 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>读取设备版本信息</string>
<string>读取传感器信息</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QPushButton" name="readTime">
<item row="7" column="1">
<widget class="QPushButton" name="setEcgInTestMode_3">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -1064,38 +1077,50 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>读取设备时间</string>
<string>使能ECG上报数据算法</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="8" column="0">
<widget class="QPushButton" name="setEcgInTestMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0">
<property name="minimumSize">
<size> <size>
<width>40</width>
<height>20</height>
<width>0</width>
<height>30</height>
</size> </size>
</property> </property>
</spacer>
<property name="text">
<string>测试-设置ECG为测试模式</string>
</property>
</widget>
</item> </item>
<item row="9" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="8" column="1">
<widget class="QPushButton" name="setEcgInNormalMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0">
<property name="minimumSize">
<size> <size>
<width>20</width>
<height>40</height>
<width>0</width>
<height>30</height>
</size> </size>
</property> </property>
</spacer>
<property name="text">
<string>测试-设置ECG为正常模式</string>
</property>
</widget>
</item> </item>
<item row="8" column="0">
<widget class="QPushButton" name="setEcgInNormalMode">
<item row="9" column="0">
<widget class="QPushButton" name="resetDevice">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -1109,7 +1134,7 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>设置ECG为正常模式</string>
<string>复位设备</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -1815,14 +1840,14 @@ p, li { white-space: pre-wrap; }
<attribute name="title"> <attribute name="title">
<string>滤波器配置</string> <string>滤波器配置</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QGroupBox" name="FilterBox"> <widget class="QGroupBox" name="FilterBox">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>650</width>
<height>371</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>滤波器配置</string> <string>滤波器配置</string>
@ -2180,20 +2205,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>300</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<item row="1" column="0">
<spacer name="verticalSpacer_10"> <spacer name="verticalSpacer_10">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -2211,19 +2223,34 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="FilterUpdateParameter"> <widget class="QPushButton" name="FilterUpdateParameter">
<property name="geometry">
<rect>
<x>540</x>
<y>400</y>
<width>111</width>
<height>41</height>
</rect>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>更新滤波器参数</string> <string>更新滤波器参数</string>
</property> </property>
</widget> </widget>
</item>
<item>
<spacer name="verticalSpacer_12">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
</widget> </widget>
</item> </item>

30
src/electrocardiograph_tester.cpp

@ -382,29 +382,27 @@ void ElectrocardiographTester::testCmdStopCapture() {
throw zexception(kifyhrs_ecode_cmd_not_support, "not implement"); throw zexception(kifyhrs_ecode_cmd_not_support, "not implement");
} }
uint8_t ElectrocardiographTester::testCmdReadReg(uint8_t addr) {
uint8_t ElectrocardiographTester::ecg_subic_read_reg(uint8_t addr) {
lock_guard<mutex> lock(m_tx_lock); lock_guard<mutex> lock(m_tx_lock);
throw zexception(kifyhrs_ecode_cmd_not_support, "not implement");
#if 0
m_txcmd->cmd = ify_hrs_test_cmd_read_reg;
#if 1
m_txcmd->cmd = ify_hrs_cmd_ecg_subic_read_reg;
m_txcmd->data[0] = addr; m_txcmd->data[0] = addr;
m_txcmd->cmd = ify_hrs_test_cmd_read_reg;
sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + 1, m_rxcmd, &m_rxsize, 100); sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + 1, m_rxcmd, &m_rxsize, 100);
return m_rxcmd->data[0]; return m_rxcmd->data[0];
#endif #endif
} }
void ElectrocardiographTester::testCmdWriteReg(uint8_t addr, uint8_t val) {
void ElectrocardiographTester::ecg_subic_write_reg(uint8_t addr, uint8_t val) {
lock_guard<mutex> lock(m_tx_lock); lock_guard<mutex> lock(m_tx_lock);
throw zexception(kifyhrs_ecode_cmd_not_support, "not implement");
#if 0
#if 1
m_txcmd->cmd = ify_hrs_test_cmd_write_reg;
m_txcmd->cmd = ify_hrs_cmd_ecg_subic_write_reg;
m_txcmd->data[0] = addr; m_txcmd->data[0] = addr;
m_txcmd->data[1] = val; m_txcmd->data[1] = val;
m_txcmd->cmd = ify_hrs_test_cmd_write_reg;
sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + 2, m_rxcmd, &m_rxsize, 100); sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + 2, m_rxcmd, &m_rxsize, 100);
#endif #endif
} }
@ -412,7 +410,6 @@ void ElectrocardiographTester::testCmdWriteReg(uint8_t addr, uint8_t val) {
void ElectrocardiographTester::set_ecg_in_test_mode(int32_t testmode) { void ElectrocardiographTester::set_ecg_in_test_mode(int32_t testmode) {
lock_guard<mutex> lock(m_tx_lock); lock_guard<mutex> lock(m_tx_lock);
int32_t *para = (int32_t *)m_txcmd->data; int32_t *para = (int32_t *)m_txcmd->data;
para[0] = testmode; para[0] = testmode;
@ -420,3 +417,14 @@ void ElectrocardiographTester::set_ecg_in_test_mode(int32_t testmode) {
sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + sizeof(int32_t), m_rxcmd, &m_rxsize, 100); sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + sizeof(int32_t), m_rxcmd, &m_rxsize, 100);
return; return;
} }
void ElectrocardiographTester::set_ecg_report_data_in_raw_mode(int32_t rawmode) {
lock_guard<mutex> lock(m_tx_lock);
int32_t *para = (int32_t *)m_txcmd->data;
para[0] = rawmode;
m_txcmd->cmd = ify_hrs_cmd_set_ecg_report_data_in_raw_mode;
sendCmd(m_txcmd, sizeof(ify_hrs_packet_t) + sizeof(int32_t), m_rxcmd, &m_rxsize, 100);
return;
}

5
src/electrocardiograph_tester.hpp

@ -108,11 +108,12 @@ class ElectrocardiographTester {
void reset(); // 重置设备 void reset(); // 重置设备
void set_ecg_in_test_mode(int32_t testmode); void set_ecg_in_test_mode(int32_t testmode);
void set_ecg_report_data_in_raw_mode(int32_t rawmode);
void testCmdStartCapture(); void testCmdStartCapture();
void testCmdStopCapture(); void testCmdStopCapture();
uint8_t testCmdReadReg(uint8_t addr);
void testCmdWriteReg(uint8_t addr, uint8_t val);
uint8_t ecg_subic_read_reg(uint8_t addr);
void ecg_subic_write_reg(uint8_t addr, uint8_t val);
private: private:
void sendCmd(ify_hrs_packet_t *tx, int32_t txlen, ify_hrs_packet_t *rx, int32_t *rxlen, int32_t overtime); void sendCmd(ify_hrs_packet_t *tx, int32_t txlen, ify_hrs_packet_t *rx, int32_t *rxlen, int32_t overtime);

Loading…
Cancel
Save