Xiphos WDT #797

Merged
muellerr merged 18 commits from add-xiphos-wdt-handling into main 2023-10-11 19:50:00 +02:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit fddae1bfc6 - Show all commits

View File

@ -84,7 +84,7 @@ ReturnValue_t XiphosWdtHandler::enableWdt() {
// Of course the enable API will fail if the device is already on, just perfect, love me some
// good C API... :)))
if (retval != 0 or status == 0) {
int retval = xsc_watchdog_enable(wdtHandle);
retval = xsc_watchdog_enable(wdtHandle);
if (retval != 0) {
sif::error << "XiphosWdtHandler: Enabling WDT failed with code " << retval << ": "
<< strerror(retval) << std::endl;
@ -105,7 +105,7 @@ ReturnValue_t XiphosWdtHandler::disableWdt() {
// Of course the disable API will fail if the device is already off, just perfect, love me some
// good C API... :)))
if (retval != 0 or status == 1) {
int retval = xsc_watchdog_disable(wdtHandle);
retval = xsc_watchdog_disable(wdtHandle);
if (retval != 0) {
sif::error << "XiphosWdtHandler: Disabling WDT failed with code " << retval << ": "
<< strerror(retval) << std::endl;
@ -114,3 +114,5 @@ ReturnValue_t XiphosWdtHandler::disableWdt() {
}
return returnvalue::OK;
}
MessageQueueId_t XiphosWdtHandler::getCommandQueue() const { return requestQueue->getId(); }

View File

@ -16,6 +16,7 @@ class XiphosWdtHandler : public SystemObject, public ExecutableObjectIF, public
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
[[nodiscard]] virtual MessageQueueId_t getCommandQueue() const override;
private:
// Wrappers to ensure idempotency of trash C API.