BT fixes on X-LiteS

This commit is contained in:
Bertrand Songis
2019-02-15 18:51:40 +01:00
parent 2afe8794aa
commit 22f35c6d27
11 changed files with 49 additions and 52 deletions
+4 -4
View File
@@ -165,6 +165,10 @@ void boardInit()
EXTMODULE_RCC_APB2Periph | HEARTBEAT_RCC_APB2Periph |
BT_RCC_APB2Periph, ENABLE);
#if defined(BLUETOOTH)
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
#endif
#if !defined(PCBX9E)
// some X9E boards need that the pwrInit() is moved a little bit later
pwrInit();
@@ -204,10 +208,6 @@ void boardInit()
hapticInit();
#endif
#if defined(BLUETOOTH)
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
#endif
#if defined(DEBUG)
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE);
#endif
+3 -3
View File
@@ -1178,7 +1178,7 @@
#define BT_RX_GPIO_PinSource GPIO_PinSource9
#define BT_USART_IRQHandler USART6_IRQHandler
#elif defined(PCBX7) || defined(PCBXLITE)
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_DMA1)
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOE) // RCC_AHB1Periph_DMA1
#define BT_RCC_APB1Periph RCC_APB1Periph_USART3
#define BT_RCC_APB2Periph 0
#define BT_EN_GPIO GPIOE
@@ -1196,8 +1196,8 @@
#define BT_USART USART3
#define BT_USART_IRQHandler USART3_IRQHandler
#define BT_USART_IRQn USART3_IRQn
#define BT_DMA_Stream_RX DMA1_Stream1
#define BT_DMA_Channel_RX DMA_Channel_4
// #define BT_DMA_Stream_RX DMA1_Stream1
// #define BT_DMA_Channel_RX DMA_Channel_4
#else
#define BT_RCC_AHB1Periph 0
#define BT_RCC_APB1Periph 0