added gps reset callback
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
26
bsp_q7s/callbacks/gnssCallback.cpp
Normal file
26
bsp_q7s/callbacks/gnssCallback.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "gnssCallback.h"
|
||||
#include "devices/gpioIds.h"
|
||||
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
|
||||
ReturnValue_t gps::triggerGpioResetPin(void *args) {
|
||||
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
|
||||
if(args == nullptr) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
if (resetArgs->gpioComIF == nullptr) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
gpioId_t gpioId;
|
||||
if(resetArgs->gnss1) {
|
||||
gpioId = gpioIds::GNSS_1_NRESET;
|
||||
|
||||
}
|
||||
else {
|
||||
gpioId = gpioIds::GNSS_0_NRESET;
|
||||
}
|
||||
resetArgs->gpioComIF->pullLow(gpioId);
|
||||
TaskFactory::delayTask(resetArgs->waitPeriodMs);
|
||||
resetArgs->gpioComIF->pullHigh(gpioId);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
Reference in New Issue
Block a user