Browse Source

update

master
zhaohe 2 years ago
parent
commit
585a71eddb
  1. 28
      components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp

28
components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp

@ -64,20 +64,24 @@ void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t paramN, con
}
void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t moduleId, int32_t regid) {
#define DUMP_CONFIG(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%d", tag, configid, configval); \
} \
#define DUMP_CONFIG(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%d", tag, configid, configval); \
} else if (ecode != err::kmodule_not_find_config_index) { \
ZLOGI(TAG, "%s(%d) :read_error %s(%d)", tag, configid, err::error2str(ecode), ecode); \
} \
}
#define DUMP_CONFIG_BIT(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%s", tag, configid, dumpbit(configval)); \
} \
#define DUMP_CONFIG_BIT(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%s", tag, configid, dumpbit(configval)); \
} else if (ecode != err::kmodule_not_find_config_index) { \
ZLOGI(TAG, "%s(%d) :read_error %s(%d)", tag, configid, err::error2str(ecode), ecode); \
} \
}
int32_t configval = 0;
int32_t ecode = 0;

Loading…
Cancel
Save