wideband/firmware/fault.cpp

21 lines
256 B
C++
Raw Normal View History

2020-12-10 18:32:41 -08:00
#include "fault.h"
2022-01-01 21:10:55 -08:00
using namespace wbo;
2020-12-10 18:32:41 -08:00
static Fault currentFault = Fault::None;
2021-11-03 23:02:11 -07:00
void SetFault(Fault fault)
2020-12-10 18:32:41 -08:00
{
currentFault = fault;
}
2021-11-03 23:02:11 -07:00
bool HasFault()
2020-12-10 18:32:41 -08:00
{
2020-12-10 21:33:33 -08:00
return currentFault != Fault::None;
2020-12-10 18:32:41 -08:00
}
2021-11-03 23:02:11 -07:00
Fault GetCurrentFault()
2020-12-10 18:32:41 -08:00
{
return currentFault;
}