makes GPIO_PIN_RST optional for the sx1276
[ExpressLRS.git] / src / include / target / Frsky_RX_R9M.h
blob616082ddf812168ccccc3313a275ba908573ae39
1 /*
2 Credit to Jacob Walser (jaxxzer) for the pinout!!!
3 https://github.com/jaxxzer
4 */
5 #if !defined(TARGET_R9SLIM_RX)
6 #define TARGET_USE_EEPROM 1
7 #define TARGET_EEPROM_ADDR 0x50
8 #endif
10 #define GPIO_PIN_NSS PB12 //confirmed on SLIMPLUS, R900MINI
11 #define GPIO_PIN_DIO0 PA15 //confirmed on SLIMPLUS, R900MINI
12 #define GPIO_PIN_DIO1 PA1 // NOT CORRECT!!! PIN STILL NEEDS TO BE FOUND BUT IS CURRENTLY UNUSED
13 /////////////////////////////////////// NOT FOUND ON SLIMPLUS EITHER.
14 #define GPIO_PIN_MOSI PB15 //confirmed on SLIMPLUS, R900MINI
15 #define GPIO_PIN_MISO PB14 //confirmed on SLIMPLUS, R900MINI
16 #define GPIO_PIN_SCK PB13 //confirmed on SLIMPLUS, R900MINI
17 #define GPIO_PIN_RST PC14 //confirmed on SLIMPLUS, R900MINI
18 #define GPIO_PIN_SDA PB7
19 #define GPIO_PIN_SCL PB6
21 #if defined(USE_R9MM_R9MINI_SBUS)
22 #define GPIO_PIN_RCSIGNAL_RX PA3
23 #define GPIO_PIN_RCSIGNAL_TX PA2
24 #define DEVICE_NAME "FrSky R9MM SBUS"
25 #elif defined(TARGET_R9SLIM_RX)
26 #define GPIO_PIN_RCSIGNAL_RX PA3 // RX1 PIN OF CONNECTOR 1 ON SLIM
27 #define GPIO_PIN_RCSIGNAL_TX PA2 // TX1 PIN OF CONNECTOR 1 ON SLIM
28 #define DEVICE_NAME "FrSky R9SLIM RX"
29 #elif defined(TARGET_R9SLIMPLUS_RX) // R9SLIMPLUS USES DUAL UART CONFIGURATION FOR TX1/RX1
30 #define GPIO_PIN_RCSIGNAL_RX PB11 // RX1 PIN OF CONNECTOR 1 ON SLIMPLUS
31 #define GPIO_PIN_RCSIGNAL_TX PA9 // TX1 PIN OF CONNECTOR 1 ON SLIMPLUS
32 #define DEVICE_NAME "FrSky R9SLIM+"
33 #elif defined(TARGET_R900MINI_RX)
34 #define GPIO_PIN_RCSIGNAL_RX PA3 // convinient pin for direct chip solder
35 #define GPIO_PIN_RCSIGNAL_TX PA2 // convinient pin for direct chip solder
36 #define DEVICE_NAME "Jumper R900 MINI"
37 #else
38 #define GPIO_PIN_RCSIGNAL_RX PA10
39 #define GPIO_PIN_RCSIGNAL_TX PA9
40 #ifndef DEVICE_NAME
41 #define DEVICE_NAME "FrSky R9MM"
42 #endif
43 #endif
45 #if defined(TARGET_R9MX_RX)
46 #define GPIO_PIN_LED_RED PB2 // Red
47 #define GPIO_PIN_LED_GREEN PB3 // Green
48 #define GPIO_PIN_BUTTON PB0 // pullup e.g. LOW when pressed
49 #elif defined(TARGET_R9SLIM_RX)
50 #define GPIO_PIN_LED_RED PA11 // Red
51 #define GPIO_PIN_LED_GREEN PA12 // Green
52 #define GPIO_PIN_BUTTON PC13 // pullup e.g. LOW when pressed
53 /* PB3: RX = HIGH, TX = LOW */
54 #define GPIO_PIN_RX_ENABLE PB3
55 #elif defined(TARGET_R9SLIMPLUS_RX)
56 #define GPIO_PIN_LED_RED PA11 // Red
57 #define GPIO_PIN_LED_GREEN PA12 // Green
58 #define GPIO_PIN_BUTTON PC13 // pullup e.g. LOW when pressed
59 /* PB3: RX = HIGH, TX = LOW */
60 #define GPIO_PIN_RX_ENABLE PB3
61 /* PB9: antenna 1 (left) = HIGH, antenna 2 (right) = LOW
62 * Note: Right Antenna is selected by default, LOW */
63 #define GPIO_PIN_ANTENNA_SELECT PB9
64 #elif defined(TARGET_R900MINI_RX)
65 #define GPIO_PIN_LED_RED PA11 // Red
66 #define GPIO_PIN_LED_GREEN PA12 // Green
67 #define GPIO_PIN_BUTTON PC13 // pullup e.g. LOW when pressed
68 // RF Switch: HIGH = RX, LOW = TX
69 #define GPIO_PIN_RX_ENABLE PB3
70 #else //R9MM_R9MINI
71 #define GPIO_PIN_LED_RED PC1 // Red
72 #define GPIO_PIN_LED_GREEN PB3 // Green
73 #define GPIO_PIN_BUTTON PC13 // pullup e.g. LOW when pressed
74 #endif
76 // External pads
77 // #define R9m_Ch1 PA8
78 // #define R9m_Ch2 PA11
79 // #define R9m_Ch3 PA9
80 // #define R9m_Ch4 PA10
81 // #define R9m_sbus PA2
82 // #define R9m_sport PA5
83 // #define R9m_isport PB11
85 //method to set HSE and clock speed correctly//
86 // #if defined(HSE_VALUE)
87 // /* Redefine the HSE value; it's equal to 8 MHz on the STM32F4-DISCOVERY Kit */
88 //#undef HSE_VALUE
89 //#define HSE_VALUE ((uint32_t)16000000).
90 //#define HSE_VALUE 25000000U
91 // #endif /* HSE_VALUE */
92 //#define SYSCLK_FREQ_72MHz
95 // Output Power - Default to SX1272 max output