rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
efi_output.cpp
Go to the documentation of this file.
1/*
2 * @file efi_output.cpp
3 *
4 */
5
6#include "pch.h"
7#include "efi_output.h"
8
9bool SwitchedState::update(bool const newState) {
10 if (state == nullptr) {
11 return false;
12 }
13
14 if (newState != *state) {
15 *state = newState ? 1 : 0;
16 counter++;
17 return true;
18 }
19
20 return false;
21}
22
23uint16_t SwitchedState::getCounter() const {
24 return counter;
25}
bool update(bool newState)
Definition efi_output.cpp:9
uint16_t counter
Definition efi_output.h:31
uint16_t getCounter() const
int8_t * state
Definition efi_output.h:30