|
|
@ -56,7 +56,9 @@ void MicroComputerModuleDeviceScriptCmderPaser::initialize(ICmdParser* cancmder, |
|
|
|
cancmder->regCMD("app_module_read_raw_str", "(mid,size)", 2, [this](int32_t paramN, const char* paraV[], ICmdParserACK* ack) { //
|
|
|
|
app_module_read_raw_str(paramN, paraV, ack); |
|
|
|
}); |
|
|
|
|
|
|
|
cancmder->regCMD("app_set_reg", "(regindex,mid,val)", 3, [this](int32_t paramN, const char* paraV[], ICmdParserACK* ack) { //
|
|
|
|
app_module_read_raw_str(paramN, paraV, ack); |
|
|
|
}); |
|
|
|
deviceManager->regOnRegValChangeEvent([this](int32_t moduleid, int32_t regindex, int32_t oldval, int32_t toval) { //
|
|
|
|
ZLOGI(TAG, "onRegValChangeEvent(moduleId[%d], reg[%d], %d->%d)", moduleid, regindex, oldval, toval); |
|
|
|
}); |
|
|
@ -76,6 +78,15 @@ void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t paramN, con |
|
|
|
app_dump_reg(moduleId, regid); |
|
|
|
} |
|
|
|
|
|
|
|
void MicroComputerModuleDeviceScriptCmderPaser::app_set_reg(int32_t paramN, const char* paraV[], ICmdParserACK* ack) { |
|
|
|
ack->ecode = 0; |
|
|
|
uint16_t regid = atoi(paraV[0]); |
|
|
|
uint16_t moduleId = atoi(paraV[1]); |
|
|
|
uint16_t regval = atoi(paraV[2]); |
|
|
|
ack->ecode = m_deviceManager->module_set_reg(moduleId, regid, regval); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
void MicroComputerModuleDeviceScriptCmderPaser::app_module_read_raw_str(int32_t paramN, const char* paraV[], ICmdParserACK* ack) { |
|
|
|
ack->ecode = 0; |
|
|
|
uint16_t moduleId = atoi(paraV[0]); |
|
|
|