-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtime_state.h
37 lines (30 loc) · 1.17 KB
/
runtime_state.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* This file is part of the INAV Bunch https://github.com/iNavFlight/inav-bunch
* Copyright (c) 2020 Pawel Spychalski [email protected]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef RUNTIME_STATE_H
#define RUNTIME_STATE_H
#include <Arduino.h>
typedef enum {
RUNTIME_STATE_RADIO_LISTEN = (1 << 0),
RUNTIME_STATE_MSP_POLL_DATA = (1 << 1),
RUNTIME_STATE_BEACON_LOCKED = (1 << 3),
} DeviceState_e;
#define DISABLE_STATE(mask) (runtimeState &= ~(mask))
#define ENABLE_STATE(mask) (runtimeState |= (mask))
#define STATE(mask) (runtimeState & (mask))
extern uint32_t runtimeState;
#endif