X7D renamed to X7

This commit is contained in:
Bertrand Songis
2016-12-12 07:39:51 +01:00
parent 7b5dfd7de5
commit 82d6b96f8b
60 changed files with 162 additions and 162 deletions
+24 -24
View File
@@ -22,7 +22,7 @@
#define _HAL_H_
// Keys
#if defined(PCBX7D)
#if defined(PCBX7)
#define KEYS_GPIO_REG_PAGE GPIOD->IDR
#define KEYS_GPIO_PIN_PAGE GPIO_Pin_3 // PD.03
#define KEYS_GPIO_REG_MENU GPIOD->IDR
@@ -41,7 +41,7 @@
#if defined(PCBX9E)
#define KEYS_GPIO_REG_ENTER GPIOF->IDR
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_0 // PF.00
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_10 // PE.10
#else
@@ -59,7 +59,7 @@
#define ENC_GPIO_PIN_A GPIO_Pin_12 // PD.12
#define ENC_GPIO_PIN_B GPIO_Pin_13 // PD.13
#define ROTARY_ENCODER_POSITION() (ENC_GPIO->IDR >> 12) & 0x03
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define ENC_GPIO GPIOE
#define ENC_GPIO_PIN_A GPIO_Pin_9 // PE.09
#define ENC_GPIO_PIN_B GPIO_Pin_11 // PE.11
@@ -67,7 +67,7 @@
#endif
// This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7D))
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7))
#define KEYS_GPIO_REG_PLUS ENC_GPIO->IDR
#define KEYS_GPIO_PIN_PLUS ENC_GPIO_PIN_A
#define KEYS_GPIO_REG_MINUS ENC_GPIO->IDR
@@ -92,7 +92,7 @@
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_2 // PC.02
#define TRIMS_GPIO_REG_RHR GPIOC->IDR
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_13 // PC.13
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define TRIMS_GPIO_REG_LHL GPIOD->IDR
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_15 // PD.15
#define TRIMS_GPIO_REG_LHR GPIOC->IDR
@@ -134,7 +134,7 @@
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_10 // PD.10
#define SWITCHES_GPIO_REG_A_L GPIOD->IDR
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_14 // PD.14
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_A_L GPIOE->IDR
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_7 // PE.07
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
@@ -151,7 +151,7 @@
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_11 // PG.11
#define SWITCHES_GPIO_REG_B_L GPIOG->IDR
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_10 // PG.10
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_B_L GPIOE->IDR
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_15 // PE.15
#define SWITCHES_GPIO_REG_B_H GPIOA->IDR
@@ -168,7 +168,7 @@
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_13 // PF.13
#define SWITCHES_GPIO_REG_C_L GPIOF->IDR
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_14 // PF.14
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_C_L GPIOD->IDR
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_11 // PD.11
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
@@ -190,7 +190,7 @@
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_7 // PE.07
#define SWITCHES_GPIO_REG_D_L GPIOE->IDR
#define SWITCHES_GPIO_PIN_D_L GPIO_Pin_13 // PE.13
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_D_L GPIOE->IDR
#define SWITCHES_GPIO_PIN_D_L GPIO_Pin_1 // PE.01
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
@@ -207,7 +207,7 @@
#define SWITCHES_GPIO_PIN_E_H GPIO_Pin_7 // PE.07
#define SWITCHES_GPIO_REG_E_L GPIOE->IDR
#define SWITCHES_GPIO_PIN_E_L GPIO_Pin_13 // PE.13
#elif !defined(PCBX7D)
#elif !defined(PCBX7)
#define SWITCHES_GPIO_REG_E_H GPIOB->IDR
#define SWITCHES_GPIO_PIN_E_H GPIO_Pin_3 // PB.03
#define SWITCHES_GPIO_REG_E_L GPIOB->IDR
@@ -217,7 +217,7 @@
#if defined(PCBX9E)
#define SWITCHES_GPIO_REG_F GPIOE->IDR
#define SWITCHES_GPIO_PIN_F GPIO_Pin_11 // PE.11
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_F GPIOE->IDR
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
#else
@@ -230,7 +230,7 @@
#define SWITCHES_GPIO_PIN_G_H GPIO_Pin_3 // PF.03
#define SWITCHES_GPIO_REG_G_L GPIOF->IDR
#define SWITCHES_GPIO_PIN_G_L GPIO_Pin_4 // PF.04
#elif !defined(PCBX7D)
#elif !defined(PCBX7)
#define SWITCHES_GPIO_REG_G_H GPIOE->IDR
#define SWITCHES_GPIO_PIN_G_H GPIO_Pin_9 // PE.09
#define SWITCHES_GPIO_REG_G_L GPIOE->IDR
@@ -243,7 +243,7 @@
#elif defined(PCBX9DP)
#define SWITCHES_GPIO_REG_H GPIOD->IDR
#define SWITCHES_GPIO_PIN_H GPIO_Pin_14 // PD.14
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define SWITCHES_GPIO_REG_H GPIOD->IDR
#define SWITCHES_GPIO_PIN_H GPIO_Pin_14 // PD.14
#else
@@ -310,7 +310,7 @@
#define KEYS_GPIOC_PINS (TRIMS_GPIO_PIN_RVD | TRIMS_GPIO_PIN_RVU | TRIMS_GPIO_PIN_RHL | TRIMS_GPIO_PIN_RHR)
#define KEYS_GPIOD_PINS (KEYS_GPIO_PIN_MENU | KEYS_GPIO_PIN_EXIT | KEYS_GPIO_PIN_PAGE | SWITCHES_GPIO_PIN_H)
#define KEYS_GPIOE_PINS (KEYS_GPIO_PIN_PLUS | KEYS_GPIO_PIN_ENTER | KEYS_GPIO_PIN_MINUS | TRIMS_GPIO_PIN_LHR | TRIMS_GPIO_PIN_LHL | TRIMS_GPIO_PIN_LVD | TRIMS_GPIO_PIN_LVU | SWITCHES_GPIO_PIN_F | SWITCHES_GPIO_PIN_A_L | SWITCHES_GPIO_PIN_B_H | SWITCHES_GPIO_PIN_B_L | SWITCHES_GPIO_PIN_C_H | SWITCHES_GPIO_PIN_D_H | SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_G_H | SWITCHES_GPIO_PIN_G_L)
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB|RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE)
#define KEYS_GPIOA_PINS SWITCHES_GPIO_PIN_B_H
#define KEYS_GPIOC_PINS (TRIMS_GPIO_PIN_LHR | TRIMS_GPIO_PIN_RVD | TRIMS_GPIO_PIN_RVU)
@@ -335,7 +335,7 @@
#endif
#define ADC_GPIO_PIN_STICK_RV GPIO_Pin_0 // PA.00
#define ADC_GPIO_PIN_STICK_RH GPIO_Pin_1 // PA.01
#if defined(PCBX7D)
#if defined(PCBX7)
#define ADC_GPIO_PIN_STICK_LV GPIO_Pin_2 // PA.02
#define ADC_GPIO_PIN_STICK_LH GPIO_Pin_3 // PA.03
#define ADC_CHANNEL_STICK_LV ADC_Channel_2 // ADC1_IN2
@@ -395,7 +395,7 @@
#define ADC_CHANNEL_SLIDER1 ADC_Channel_14
#define ADC_CHANNEL_SLIDER2 ADC_Channel_15
#define ADC_CHANNEL_BATT ADC_Channel_10
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define ADC_GPIO_PIN_POT1 GPIO_Pin_6 // PA.06
#define ADC_GPIO_PIN_POT2 GPIO_Pin_0 // PB.00
#define ADC_GPIO_PIN_BATT GPIO_Pin_0 // PC.00
@@ -424,13 +424,13 @@
// PWR and LED driver
#define PWR_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD)
#if defined(PCBX9E) || defined(PCBX7D)
#if defined(PCBX9E) || defined(PCBX7)
#define PWR_PRESS_BUTTON
#endif
#define PWR_GPIO GPIOD
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_1 // PD.01
#define PWR_ON_GPIO_PIN GPIO_Pin_0 // PD.00
#if defined(PCBX7D)
#if defined(PCBX7)
#define LED_GREEN_GPIO GPIOC
#define LED_GREEN_GPIO_PIN GPIO_Pin_4 // PC.04
#define LED_RED_GPIO GPIOC
@@ -442,7 +442,7 @@
// Internal Module
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA2)
#define INTMODULE_RCC_APB2Periph RCC_APB2Periph_TIM1
#if defined(PCBX9E) || defined(PCBX9DP) || defined(PCBX7D)
#if defined(PCBX9E) || defined(PCBX9DP) || defined(PCBX7)
#define INTMODULE_PWR_GPIO GPIOC
#define INTMODULE_PWR_GPIO_PIN GPIO_Pin_6 // PC.06
#else
@@ -506,7 +506,7 @@
#define TRAINER_TIMER_FREQ (PERI1_FREQUENCY * TIMER_MULT_APB1)
// Serial Port
#if defined(PCBX7D)
#if defined(PCBX7)
#define SERIAL_RCC_AHB1Periph 0
#define SERIAL_RCC_APB1Periph 0
#else
@@ -596,7 +596,7 @@
#define BACKLIGHT_GPIO_PinSource_2 GPIO_PinSource13
#define BACKLIGHT_GPIO_AF_1 GPIO_AF_TIM4
#define BACKLIGHT_GPIO_AF_2 GPIO_AF_TIM4
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define BACKLIGHT_RCC_AHB1Periph RCC_AHB1Periph_GPIOD
#define BACKLIGHT_RCC_APB1Periph RCC_APB1Periph_TIM4
#define BACKLIGHT_RCC_APB2Periph 0
@@ -640,7 +640,7 @@
#define LCD_DMA_FLAG_INT DMA_HIFCR_CTCIF7
#define LCD_SPI SPI3
#define LCD_GPIO_AF GPIO_AF_SPI3
#elif defined(PCBX9DP) || defined(PCBX7D)
#elif defined(PCBX9DP) || defined(PCBX7)
#define LCD_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA1)
#define LCD_RCC_APB1Periph RCC_APB1Periph_SPI3
#define LCD_SPI_GPIO GPIOC
@@ -735,7 +735,7 @@
#define AUDIO_DMA DMA1
// Haptic
#if defined(PCBX9E) || defined(PCBX9DP) || defined(PCBX7D)
#if defined(PCBX9E) || defined(PCBX9DP) || defined(PCBX7)
#define HAPTIC_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define HAPTIC_RCC_APB2Periph RCC_APB2Periph_TIM10
#define HAPTIC_GPIO_PinSource GPIO_PinSource8
@@ -778,7 +778,7 @@
#define BT_BCTS_GPIO_PIN GPIO_Pin_6 // PG.06
#define BT_TX_GPIO_PinSource GPIO_PinSource14
#define BT_RX_GPIO_PinSource GPIO_PinSource9
#elif defined(PCBX7D)
#elif defined(PCBX7)
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_DMA1)
#define BT_RCC_APB1Periph RCC_APB1Periph_USART3
#define BT_EN_GPIO GPIOE