Preliminary T18 support (#7581)
This commit is contained in:
@@ -322,7 +322,7 @@
|
||||
#define ADC_TRANSFER_COMPLETE() (ADC_DMA->LISR & DMA_LISR_TCIF0)
|
||||
#if defined(RADIO_TX16S)
|
||||
#define ADC_VREF_PREC2 330
|
||||
#elif defined(RADIO_T16)
|
||||
#elif defined(RADIO_T16) || defined(RADIO_T18)
|
||||
#define ADC_VREF_PREC2 300
|
||||
#else
|
||||
#define ADC_VREF_PREC2 250
|
||||
@@ -330,11 +330,21 @@
|
||||
#endif
|
||||
|
||||
// Power
|
||||
#if defined(RADIO_T18)
|
||||
#define PWR_RCC_AHB1Periph RCC_AHB1Periph_GPIOJ | RCC_AHB1Periph_GPIOB
|
||||
#define PWR_ON_GPIO GPIOJ
|
||||
#define PWR_ON_GPIO_PIN GPIO_Pin_1 // PJ.01
|
||||
#define PWR_SWITCH_GPIO GPIOJ
|
||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_0 // PJ.00
|
||||
#define PWR_EXTRA_SWITCH_GPIO GPIOB
|
||||
#define PWR_EXTRA_SWITCH_GPIO_PIN GPIO_Pin_0 // PB.00
|
||||
#else
|
||||
#define PWR_RCC_AHB1Periph RCC_AHB1Periph_GPIOJ
|
||||
#define PWR_ON_GPIO GPIOJ
|
||||
#define PWR_ON_GPIO_PIN GPIO_Pin_1 // PJ.01
|
||||
#define PWR_SWITCH_GPIO GPIOJ
|
||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_0 // PJ.00
|
||||
#endif
|
||||
|
||||
// USB Charger
|
||||
#if defined(USB_CHARGER)
|
||||
@@ -514,6 +524,9 @@
|
||||
#define LCD_GPIO_NRST GPIOI
|
||||
#define LCD_GPIO_PIN_NRST GPIO_Pin_10 // PI.10
|
||||
#endif
|
||||
#if defined(PCBX10) && !defined(RADIO_T18) && !defined(SIMU)
|
||||
#define LCD_VERTICAL_INVERT
|
||||
#endif
|
||||
#define LTDC_IRQ_PRIO 4
|
||||
#define DMA_SCREEN_IRQ_PRIO 6
|
||||
|
||||
@@ -549,6 +562,14 @@
|
||||
#define BACKLIGHT_GPIO_AF GPIO_AF_TIM8
|
||||
#define BACKLIGHT_TIMER_FREQ (PERI2_FREQUENCY * TIMER_MULT_APB2)
|
||||
#endif
|
||||
#if defined(RADIO_T18)
|
||||
#define KEYS_BACKLIGHT_RCC_AHB1Periph RCC_AHB1Periph_GPIOC
|
||||
#define KEYS_BACKLIGHT_GPIO GPIOC
|
||||
#define KEYS_BACKLIGHT_GPIO_PIN GPIO_Pin_4 // PC.04
|
||||
#define KEYS_BACKLIGHT_GPIO_PinSource GPIO_PinSource4
|
||||
#else
|
||||
#define KEYS_BACKLIGHT_RCC_AHB1Periph 0
|
||||
#endif
|
||||
|
||||
// SD
|
||||
#define SD_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA2)
|
||||
|
||||
Reference in New Issue
Block a user