small README
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
23
unittest/rebootLogic/src/libxiphos.cpp
Normal file
23
unittest/rebootLogic/src/libxiphos.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "libxiphos.h"
|
||||
#include "CoreController.h"
|
||||
|
||||
bool rebootWasCalled = false;
|
||||
xsc_libnor_chip_t lastChip;
|
||||
xsc_libnor_copy_t lastCopy;
|
||||
|
||||
bool getRebootWasCalled(xsc_libnor_chip_t& tgtChip, xsc_libnor_copy_t& tgtCopy) {
|
||||
tgtChip = lastChip;
|
||||
tgtCopy = lastCopy;
|
||||
bool tmp = rebootWasCalled;
|
||||
if(rebootWasCalled) {
|
||||
rebootWasCalled = false;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void xsc_boot_copy(xsc_libnor_chip_t boot_chip, xsc_libnor_copy_t boot_copy) {
|
||||
rebootWasCalled = true;
|
||||
lastChip = boot_chip;
|
||||
lastCopy = boot_copy;
|
||||
CoreController::setCurrentBootCopy(static_cast<xsc::Chip>(boot_chip), static_cast<xsc::Copy>(boot_copy));
|
||||
}
|
Reference in New Issue
Block a user