Fix unused param, add PERIPH_DRIVER flag for F4, tidied up F1 and F3 in prep.
[betaflight.git] / src / main / io / vtx_control.h
blob3715b60e00dff0e0d0be60267c22d8e5e549723c
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #include "fc/rc_modes.h"
22 #define MAX_CHANNEL_ACTIVATION_CONDITION_COUNT 10
24 typedef struct vtxChannelActivationCondition_s {
25 uint8_t auxChannelIndex;
26 uint8_t band;
27 uint8_t channel;
28 channelRange_t range;
29 } vtxChannelActivationCondition_t;
31 typedef struct vtxConfig_s {
32 vtxChannelActivationCondition_t vtxChannelActivationConditions[MAX_CHANNEL_ACTIVATION_CONDITION_COUNT];
33 } vtxConfig_t;
35 PG_DECLARE(vtxConfig_t, vtxConfig);
37 void vtxControlInit(void);
39 void vtxIncrementBand(void);
40 void vtxDecrementBand(void);
41 void vtxIncrementChannel(void);
42 void vtxDecrementChannel(void);
44 void vtxCyclePower(const uint8_t powerStep);
45 void vtxCycleBandOrChannel(const uint8_t bandStep, const uint8_t channelStep);
47 void vtxUpdateActivatedChannel(void);
49 void handleVTXControlButton(void);