2 #if !defined(DEVICE_NAME)
3 #define DEVICE_NAME "FrSky R9M"
6 #define TARGET_USE_EEPROM 1
7 #define TARGET_EEPROM_ADDR 0x51
8 #define TARGET_EEPROM_400K
10 // GPIO pin definitions
11 #define GPIO_PIN_RFamp_APC1 PA6 //APC2 is connected through a I2C dac and is handled elsewhere
12 #define GPIO_PIN_RFswitch_CONTROL PB3 //HIGH = RX, LOW = TX
14 #define GPIO_PIN_NSS PB12
15 #define GPIO_PIN_DIO0 PA15
16 #define GPIO_PIN_MOSI PB15
17 #define GPIO_PIN_MISO PB14
18 #define GPIO_PIN_SCK PB13
19 #define GPIO_PIN_RST PC14
20 #define GPIO_PIN_RX_ENABLE GPIO_PIN_RFswitch_CONTROL
21 #define GPIO_PIN_TX_ENABLE GPIO_PIN_RFamp_APC1
22 #define GPIO_PIN_SDA PB7
23 #define GPIO_PIN_SCL PB6
24 #define GPIO_PIN_RCSIGNAL_RX PB11 // not yet confirmed
25 #define GPIO_PIN_RCSIGNAL_TX PB10 // not yet confirmed
26 #define GPIO_PIN_LED_RED PA11 // Red LED
27 #define GPIO_PIN_LED_GREEN PA12 // Green LED
28 #define GPIO_PIN_BUTTON PA8 // pullup e.g. LOW when pressed
29 #define GPIO_PIN_BUZZER PB1
30 #define GPIO_PIN_DIP1 PA12 // dip switch 1
31 #define GPIO_PIN_DIP2 PA11 // dip switch 2
32 #define GPIO_PIN_FAN_EN PB9 // Fan mod https://github.com/AlessandroAU/ExpressLRS/wiki/R9M-Fan-Mod-Cover
34 #define GPIO_PIN_DEBUG_RX PA10 // confirmed
35 #define GPIO_PIN_DEBUG_TX PA9 // confirmed
38 #define GPIO_PIN_BUFFER_OE PA5 //CONFIRMED
39 #define GPIO_PIN_BUFFER_OE_INVERTED 0
40 #define GPIO_PIN_DIO1 PA1 //Not Needed, HEARTBEAT pin
43 #define POWER_OUTPUT_DAC 0b0001100
44 #define MinPower PWR_10mW
45 #define HighPower PWR_250mW
46 #define MaxPower PWR_1000mW
47 #if !defined(POWER_OUTPUT_VALUES)
48 #define POWER_OUTPUT_VALUES {720,875,1000,1140,1390,1730,2100,2600}
49 #define POWER_OUTPUT_VALUES_868 {650,860,1000,1160,1420,1730,2100,2600}