Skip to content

Commit

Permalink
#57
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Sep 16, 2020
1 parent 30ab4ac commit 8f16876
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
18 changes: 18 additions & 0 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -64260,6 +64260,24 @@
}
]
}
},
{
"name": "SYSTem:DELay",
"parameters": [
{
"name": "time_ms",
"type": [
{
"type": "nr1"
}
]
}
],
"response": {
"type": [
{}
]
}
}
]
},
Expand Down
6 changes: 0 additions & 6 deletions src/eez/modules/psu/scpi/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ scpi_result_t scpi_cmd_debug(scpi_t *context) {
taskEXIT_CRITICAL();
restart();
#endif
} else if (cmd == 30) {
int32_t delayMs;
if (!SCPI_ParamInt32(context, &delayMs, false)) {
return SCPI_RES_ERR;
}
osDelay(delayMs);
} else {
SCPI_ErrorPush(context, SCPI_ERROR_HARDWARE_MISSING);
return SCPI_RES_ERR;
Expand Down
11 changes: 11 additions & 0 deletions src/eez/modules/psu/scpi/syst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,17 @@ scpi_result_t scpi_cmd_systemMeasureScalarVoltageDcQ(scpi_t *context) {
#endif
}

scpi_result_t scpi_cmd_systemDelay(scpi_t *context) {
int32_t delayMs;
if (!SCPI_ParamInt32(context, &delayMs, false)) {
return SCPI_RES_ERR;
}

osDelay(delayMs);

return SCPI_RES_OK;
}

} // namespace scpi
} // namespace psu
} // namespace eez
1 change: 1 addition & 0 deletions src/eez/scpi/commands_simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
SCPI_COMMAND("SYSTem:MEASure[:SCALar]:TEMPerature[:THERmistor][:DC]?", scpi_cmd_systemMeasureScalarTemperatureThermistorDcQ) \
SCPI_COMMAND("SYSTem:MEASure[:SCALar][:VOLTage][:DC]?", scpi_cmd_systemMeasureScalarVoltageDcQ) \
SCPI_COMMAND("SYSTem:CPU:SNO?", scpi_cmd_systemCpuSnoQ) \
SCPI_COMMAND("SYSTem:DELay", scpi_cmd_systemDelay) \
SCPI_COMMAND("TRIGger:DLOG:SOURce", scpi_cmd_triggerDlogSource) \
SCPI_COMMAND("TRIGger:DLOG:SOURce?", scpi_cmd_triggerDlogSourceQ) \
SCPI_COMMAND("TRIGger:DLOG[:IMMediate]", scpi_cmd_triggerDlogImmediate) \
Expand Down
1 change: 1 addition & 0 deletions src/eez/scpi/commands_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
SCPI_COMMAND("SYSTem:MEASure[:SCALar]:TEMPerature[:THERmistor][:DC]?", scpi_cmd_systemMeasureScalarTemperatureThermistorDcQ) \
SCPI_COMMAND("SYSTem:MEASure[:SCALar][:VOLTage][:DC]?", scpi_cmd_systemMeasureScalarVoltageDcQ) \
SCPI_COMMAND("SYSTem:CPU:SNO?", scpi_cmd_systemCpuSnoQ) \
SCPI_COMMAND("SYSTem:DELay", scpi_cmd_systemDelay) \
SCPI_COMMAND("TRIGger:DLOG:SOURce", scpi_cmd_triggerDlogSource) \
SCPI_COMMAND("TRIGger:DLOG:SOURce?", scpi_cmd_triggerDlogSourceQ) \
SCPI_COMMAND("TRIGger:DLOG[:IMMediate]", scpi_cmd_triggerDlogImmediate) \
Expand Down

0 comments on commit 8f16876

Please sign in to comment.