Added generated timer definitions for STM32F7X2 universal target.
[betaflight.git] / src / main / rx / rx_spi.h
blob094b854a52f526bc24a34ba7e1187285fafeff90
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #include "rx/rx.h"
25 // Used in MSP. Append at end.
26 typedef enum {
27 RX_SPI_NRF24_V202_250K = 0,
28 RX_SPI_NRF24_V202_1M,
29 RX_SPI_NRF24_SYMA_X,
30 RX_SPI_NRF24_SYMA_X5C,
31 RX_SPI_NRF24_CX10,
32 RX_SPI_NRF24_CX10A,
33 RX_SPI_NRF24_H8_3D,
34 RX_SPI_NRF24_INAV,
35 RX_SPI_FRSKY_D,
36 RX_SPI_FRSKY_X,
37 RX_SPI_A7105_FLYSKY,
38 RX_SPI_A7105_FLYSKY_2A,
39 RX_SPI_NRF24_KN,
40 RX_SPI_PROTOCOL_COUNT
41 } rx_spi_protocol_e;
43 typedef enum {
44 RX_SPI_RECEIVED_NONE = 0,
45 RX_SPI_RECEIVED_BIND,
46 RX_SPI_RECEIVED_DATA
47 } rx_spi_received_e;
49 // RC channels in AETR order
50 typedef enum {
51 RC_SPI_ROLL = 0,
52 RC_SPI_PITCH,
53 RC_SPI_THROTTLE,
54 RC_SPI_YAW,
55 RC_SPI_AUX1,
56 RC_SPI_AUX2,
57 RC_SPI_AUX3,
58 RC_SPI_AUX4,
59 RC_SPI_AUX5,
60 RC_SPI_AUX6,
61 RC_SPI_AUX7,
62 RC_SPI_AUX8,
63 RC_SPI_AUX9,
64 RC_SPI_AUX10,
65 RC_SPI_AUX11,
66 RC_SPI_AUX12,
67 RC_SPI_AUX13,
68 RC_SPI_AUX14
69 } rc_spi_aetr_e;
71 // RC channels as used by deviation
72 #define RC_CHANNEL_RATE RC_SPI_AUX1
73 #define RC_CHANNEL_FLIP RC_SPI_AUX2
74 #define RC_CHANNEL_PICTURE RC_SPI_AUX3
75 #define RC_CHANNEL_VIDEO RC_SPI_AUX4
76 #define RC_CHANNEL_HEADLESS RC_SPI_AUX5
77 #define RC_CHANNEL_RTH RC_SPI_AUX6 // return to home
79 bool rxSpiInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig);