feat: Radiomaster GX15 support (#7643)

Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <pfeerick@users.noreply.github.com>
This commit is contained in:
3djc
2026-08-19 09:51:59 +10:00
committed by GitHub
co-authored by 3djc Claude Opus 5 philmoz Peter Feerick
parent 423876b10b
commit 62ed67a462
28 changed files with 2601 additions and 15 deletions
+541
View File
@@ -0,0 +1,541 @@
{
"adc_inputs": {
"adcs": [
{
"name": "MAIN",
"adc": "ADC1",
"dma": "DMA2",
"dma_channel": "LL_DMAMUX1_REQ_ADC1",
"dma_stream": "LL_DMA_STREAM_4",
"dma_stream_irq": "DMA2_Stream4_IRQn",
"dma_stream_irq_handler": "DMA2_Stream4_IRQHandler",
"sample_time": "LL_ADC_SAMPLINGTIME_8CYCLES_5"
},
{
"name": "EXT",
"adc": "ADC3",
"dma": "DMA2",
"dma_channel": "LL_DMAMUX1_REQ_ADC3",
"dma_stream": "LL_DMA_STREAM_0",
"dma_stream_irq": "DMA2_Stream0_IRQn",
"dma_stream_irq_handler": "DMA2_Stream0_IRQHandler",
"sample_time": "LL_ADC_SAMPLINGTIME_8CYCLES_5"
}
],
"inputs": [
{
"name": "LH",
"type": "STICK",
"adc": "MAIN",
"gpio": "GPIOA",
"pin": "LL_GPIO_PIN_6",
"channel": "LL_ADC_CHANNEL_3"
},
{
"name": "LV",
"type": "STICK",
"adc": "MAIN",
"gpio": "GPIOC",
"pin": "LL_GPIO_PIN_3",
"channel": "LL_ADC_CHANNEL_13",
"inverted": true
},
{
"name": "RV",
"type": "STICK",
"adc": "MAIN",
"gpio": "GPIOC",
"pin": "LL_GPIO_PIN_4",
"channel": "LL_ADC_CHANNEL_4"
},
{
"name": "RH",
"type": "STICK",
"adc": "MAIN",
"gpio": "GPIOC",
"pin": "LL_GPIO_PIN_5",
"channel": "LL_ADC_CHANNEL_8",
"inverted": true
},
{
"name": "P1",
"type": "FLEX",
"adc": "MAIN",
"gpio": "GPIOC",
"pin": "LL_GPIO_PIN_1",
"channel": "LL_ADC_CHANNEL_11",
"inverted": true,
"label": "S1",
"short_label": "1",
"default": "POT_CENTER"
},
{
"name": "P2",
"type": "FLEX",
"adc": "MAIN",
"gpio": "GPIOB",
"pin": "LL_GPIO_PIN_1",
"channel": "LL_ADC_CHANNEL_5",
"inverted": true,
"label": "S2",
"short_label": "2",
"default": "POT_CENTER"
},
{
"name": "SL1",
"type": "FLEX",
"adc": "EXT",
"gpio": "GPIOH",
"pin": "LL_GPIO_PIN_2",
"channel": "LL_ADC_CHANNEL_13",
"label": "LS",
"short_label": "L",
"default": "SLIDER"
},
{
"name": "SL2",
"type": "FLEX",
"adc": "MAIN",
"gpio": "GPIOA",
"pin": "LL_GPIO_PIN_7",
"channel": "LL_ADC_CHANNEL_7",
"inverted": true,
"label": "RS",
"short_label": "R",
"default": "SLIDER"
},
{
"name": "EXT1",
"type": "FLEX",
"adc": "MAIN",
"gpio": "GPIOA",
"pin": "LL_GPIO_PIN_5",
"channel": "LL_ADC_CHANNEL_19",
"label": "EXT1",
"short_label": "E1"
},
{
"name": "EXT2",
"type": "FLEX",
"adc": "EXT",
"gpio": "GPIOH",
"pin": "LL_GPIO_PIN_5",
"channel": "LL_ADC_CHANNEL_16",
"label": "EXT2",
"short_label": "E2"
},
{
"name": "VBAT",
"type": "VBAT",
"adc": "EXT",
"gpio": "GPIOH",
"pin": "LL_GPIO_PIN_3",
"channel": "LL_ADC_CHANNEL_14"
},
{
"name": "RTC_BAT",
"type": "RTC_BAT",
"adc": "EXT",
"gpio": null,
"pin": null,
"channel": "LL_ADC_CHANNEL_VBAT"
}
]
},
"switches": [
{
"name": "SA",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P15",
"gpio_low": null,
"pin_low": "PCA95XX_P14",
"is_cfs": false
},
{
"name": "SB",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P13",
"gpio_low": null,
"pin_low": "PCA95XX_P12",
"is_cfs": false
},
{
"name": "SC",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P11",
"gpio_low": null,
"pin_low": "PCA95XX_P10",
"is_cfs": false
},
{
"name": "SD",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P7",
"gpio_low": null,
"pin_low": "PCA95XX_P6",
"is_cfs": false
},
{
"name": "SE",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P16",
"gpio_low": null,
"pin_low": "PCA95XX_P17",
"is_cfs": false
},
{
"name": "SF",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P1",
"is_cfs": false
},
{
"name": "SG",
"type": "3POS",
"flags": 0,
"inverted": false,
"default": "3POS",
"display": null,
"gpio_high": null,
"pin_high": "PCA95XX_P4",
"gpio_low": null,
"pin_low": "PCA95XX_P5",
"is_cfs": false
},
{
"name": "SH",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "TOGGLE",
"display": null,
"gpio": null,
"pin": "PCA95XX_P0",
"is_cfs": false
},
{
"name": "SI",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "NONE",
"display": null,
"gpio": null,
"pin": "PCA95XX_P2",
"is_cfs": false
},
{
"name": "SJ",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "NONE",
"display": null,
"gpio": null,
"pin": "PCA95XX_P3",
"is_cfs": false
},
{
"name": "SW1",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P0",
"is_cfs": true,
"cfs_idx": 0
},
{
"name": "SW2",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P1",
"is_cfs": true,
"cfs_idx": 1
},
{
"name": "SW3",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P2",
"is_cfs": true,
"cfs_idx": 2
},
{
"name": "SW4",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P3",
"is_cfs": true,
"cfs_idx": 3
},
{
"name": "SW5",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P4",
"is_cfs": true,
"cfs_idx": 4
},
{
"name": "SW6",
"type": "2POS",
"flags": 0,
"inverted": false,
"default": "2POS",
"display": null,
"gpio": null,
"pin": "PCA95XX_P5",
"is_cfs": true,
"cfs_idx": 5
}
],
"keys": [
{
"gpio": "GPIOG",
"pin": "LL_GPIO_PIN_3",
"active_low": true,
"key": "KEY_EXIT",
"name": "EXIT",
"label": "RTN"
},
{
"gpio": "GPIOG",
"pin": "LL_GPIO_PIN_12",
"active_low": true,
"key": "KEY_ENTER",
"name": "ENTER",
"label": "Enter"
},
{
"gpio": "GPIOG",
"pin": "LL_GPIO_PIN_7",
"active_low": true,
"key": "KEY_PAGEUP",
"name": "PAGEUP",
"label": "PAGE<"
},
{
"gpio": "GPIOA",
"pin": "LL_GPIO_PIN_8",
"active_low": true,
"key": "KEY_PAGEDN",
"name": "PAGEDN",
"label": "PAGE>"
},
{
"gpio": "GPIOE",
"pin": "LL_GPIO_PIN_3",
"active_low": true,
"key": "KEY_MODEL",
"name": "MDL",
"label": "MDL"
},
{
"gpio": "GPIOG",
"pin": "LL_GPIO_PIN_2",
"active_low": true,
"key": "KEY_TELE",
"name": "TELE",
"label": "TELE"
},
{
"gpio": "GPIOB",
"pin": "LL_GPIO_PIN_2",
"active_low": true,
"key": "KEY_SYS",
"name": "SYS",
"label": "SYS"
}
],
"trims": [
{
"name": "T1"
},
{
"name": "T2"
},
{
"name": "T3"
},
{
"name": "T4"
},
{
"name": "T5",
"dec": {
"gpio": "GPIOH",
"pin": "LL_GPIO_PIN_15",
"active_low": true
},
"inc": {
"gpio": "GPIOH",
"pin": "LL_GPIO_PIN_13",
"active_low": true
},
"active_low": true
},
{
"name": "T6"
}
],
"display": {
"lcd_w": 480,
"lcd_h": 320,
"lcd_phys_w": 320,
"lcd_phys_h": 480,
"lcd_depth": 16,
"ltdc_irq_prio": 4,
"dma_screen_irq_prio": 6
},
"backlight": {
"backlight_gpio": "GPIO_PIN(GPIOA, 10)",
"backlight_timer": "TIM1",
"backlight_timer_channel": "LL_TIM_CHANNEL_CH3",
"backlight_gpio_af": "GPIO_AF1",
"backlight_timer_freq": "(PERI1_FREQUENCY * TIMER_MULT_APB1)"
},
"leds": {
"led_strip_length": 26,
"bling_led_strip_start": 6,
"bling_led_strip_length": 20,
"cfs_led_strip_start": 0,
"cfs_led_strip_length": 6,
"cfs_leds_per_switch": 1,
"led_strip_gpio": "GPIO_PIN(GPIOA, 0)",
"led_strip_gpio_af": "LL_GPIO_AF_1",
"led_strip_timer": "TIM2",
"led_strip_timer_freq": "(PERI1_FREQUENCY * TIMER_MULT_APB1)",
"led_strip_timer_channel": "LL_TIM_CHANNEL_CH1",
"led_strip_timer_dma": "DMA1",
"led_strip_timer_dma_channel": "LL_DMAMUX1_REQ_TIM2_UP",
"led_strip_timer_dma_stream": "LL_DMA_STREAM_0",
"led_strip_timer_dma_irqn": "DMA1_Stream0_IRQn",
"led_strip_timer_dma_irqhandler": "DMA1_Stream0_IRQHandler",
"led_strip_refresh_period": 50,
"status_leds": true,
"led_red_gpio": "GPIO_PIN(GPIOI, 8)",
"led_green_gpio": "GPIO_PIN(GPIOI, 11)",
"led_blue_gpio": "GPIO_PIN(GPIOI, 10)"
},
"hardware": {
"has_ext_module_support": true,
"has_int_module_support": true,
"cpu": "STM32H750xB",
"cpu_type": "STM32H7"
},
"timers": {
"cpu_freq": 480000000,
"peri1_frequency": 120000000,
"peri2_frequency": 120000000,
"timer_mult_apb1": 2,
"timer_mult_apb2": 2,
"ms_timer": "TIM14",
"ms_timer_irqn": "TIM8_TRG_COM_TIM14_IRQn",
"ms_timer_irqhandler": "TIM8_TRG_COM_TIM14_IRQHandler",
"mixer_scheduler_timer": "TIM12",
"mixer_scheduler_timer_freq": "(PERI1_FREQUENCY * TIMER_MULT_APB1)",
"mixer_scheduler_timer_irqn": "TIM8_BRK_TIM12_IRQn",
"mixer_scheduler_timer_irqhandler": "TIM8_BRK_TIM12_IRQHandler"
},
"imu": {
"imu_i2c_bus": "I2C_Bus_1",
"imu_i2c_address": "0x6A",
"imu_int_gpio": "GPIO_PIN(GPIOG, 13)",
"imu_invert_x": true,
"imu_invert_y": true,
"exti": [
{
"irq": "EXTI15_10_IRQ",
"priority": 6
}
]
},
"rotenc": {
"rotary_encoder_gpio_a": "GPIOI",
"rotary_encoder_gpio_pin_a": "LL_GPIO_PIN_7",
"rotary_encoder_gpio_b": "GPIOJ",
"rotary_encoder_gpio_pin_b": "LL_GPIO_PIN_8",
"rotary_encoder_position": "(((ROTARY_ENCODER_GPIO_A->IDR >> 7) & 0x01)|((ROTARY_ENCODER_GPIO_B->IDR >> 7) & 0x02))",
"rotary_encoder_exti_line1": "LL_EXTI_LINE_7",
"rotary_encoder_exti_line2": "LL_EXTI_LINE_8",
"exti": [
{
"irq": "EXTI7_IRQ",
"priority": 5
},
{
"irq": "EXTI8_IRQ",
"priority": 5
}
],
"rotary_encoder_exti_port_a": "LL_SYSCFG_EXTI_PORTI",
"rotary_encoder_exti_port_b": "LL_SYSCFG_EXTI_PORTJ",
"rotary_encoder_exti_sys_line1": "LL_SYSCFG_EXTI_LINE7",
"rotary_encoder_exti_sys_line2": "LL_SYSCFG_EXTI_LINE8",
"rotary_encoder_timer": "TIM17",
"rotary_encoder_timer_irqn": "TIM17_IRQn",
"rotary_encoder_timer_irqhandler": "TIM17_IRQHandler"
},
"haptic": {
"haptic_pwm": true,
"haptic_gpio": "GPIO_PIN(GPIOC, 7)",
"haptic_gpio_timer": "TIM3",
"haptic_gpio_af": "GPIO_AF2",
"haptic_timer_output_enable": "TIM_CCER_CC2E | TIM_CCER_CC2NE",
"haptic_timer_mode": "TIM_CCMR1_OC2M_1 | TIM_CCMR1_OC2M_2 | TIM_CCMR1_OC2PE",
"haptic_timer_compare_value": "HAPTIC_GPIO_TIMER->CCR2"
},
"key_lock_combo": [
"KEY_SYS",
"KEY_MODEL"
]
}
@@ -36,5 +36,9 @@ void usbChargerInit()
bool usbChargerLed()
{
#if defined UCHARGER_INVERTED
return (!gpio_read(UCHARGER_GPIO) && usbPlugged());
#else
return (gpio_read(UCHARGER_GPIO) && usbPlugged());
#endif
}