2022-09-07 16:36:16 -07:00
|
|
|
/*
|
|
|
|
* @file efi_output.cpp
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-08-22 11:37:17 -07:00
|
|
|
#include "pch.h"
|
2022-09-07 16:36:16 -07:00
|
|
|
#include "efi_output.h"
|
|
|
|
|
2023-08-22 11:37:17 -07:00
|
|
|
|
|
|
|
bool SwitchedState::update(bool newState) {
|
2023-08-20 14:08:33 -07:00
|
|
|
if (newState != *state) {
|
2023-08-22 11:37:17 -07:00
|
|
|
*state = newState ? 1 : 0;
|
2023-08-20 14:08:33 -07:00
|
|
|
counter++;
|
2023-08-22 11:37:17 -07:00
|
|
|
return true;
|
2023-08-20 14:08:33 -07:00
|
|
|
}
|
2023-08-22 11:37:17 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t SwitchedState::getCounter() {
|
|
|
|
return counter;
|
2023-08-20 14:08:33 -07:00
|
|
|
}
|
2023-08-22 11:37:17 -07:00
|
|
|
|