@@ -2,7 +2,7 @@
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
@@ -23,6 +23,10 @@
|
||||
Fifo<uint8_t, 64> btTxFifo;
|
||||
Fifo<uint8_t, 64> btRxFifo;
|
||||
|
||||
#if defined(PCBX7)
|
||||
uint8_t btChipPresent = 0;
|
||||
#endif
|
||||
|
||||
enum BluetoothWriteState
|
||||
{
|
||||
BLUETOOTH_WRITE_IDLE,
|
||||
@@ -105,6 +109,12 @@ extern "C" void BT_USART_IRQHandler(void)
|
||||
USART_ClearITPendingBit(BT_USART, USART_IT_RXNE);
|
||||
uint8_t byte = USART_ReceiveData(BT_USART);
|
||||
btRxFifo.push(byte);
|
||||
#if defined(PCBX7)
|
||||
if (!btChipPresent) { //This is to differentiate X7 and X7S
|
||||
btChipPresent = 1;
|
||||
bluetoothDone();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (USART_GetITStatus(BT_USART, USART_IT_TXE) != RESET) {
|
||||
|
||||
@@ -55,19 +55,14 @@ elseif(PCB STREQUAL X9D)
|
||||
set(LCD_DRIVER lcd_driver_aspi.cpp)
|
||||
set(SERIAL2_DRIVER ../common/arm/stm32/serial2_driver.cpp)
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
elseif(PCB STREQUAL X7 OR PCB STREQUAL X7S)
|
||||
elseif(PCB STREQUAL X7)
|
||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||
set(CPU_TYPE STM32F2)
|
||||
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
||||
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
|
||||
set(HAPTIC YES)
|
||||
set(LUA_EXPORT lua_export_x7)
|
||||
if(PCB STREQUAL X7S)
|
||||
add_definitions(-DPCBX7S)
|
||||
set(FLAVOUR x7s)
|
||||
else()
|
||||
set(FLAVOUR x7)
|
||||
endif()
|
||||
set(FLAVOUR x7)
|
||||
add_definitions(-DPCBX7 -DSOFTWARE_VOLUME)
|
||||
add_definitions(-DEEPROM_VARIANT=0x4000)
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
@@ -76,7 +71,7 @@ elseif(PCB STREQUAL X7 OR PCB STREQUAL X7S)
|
||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7S)
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7)
|
||||
add_definitions(-DBLUETOOTH)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
@@ -115,7 +110,7 @@ set(GUI_SRC ${GUI_SRC}
|
||||
../screenshot.cpp
|
||||
)
|
||||
|
||||
if(PCB STREQUAL X7 OR PCB STREQUAL X7S)
|
||||
if(PCB STREQUAL X7)
|
||||
set(LED_DRIVER led_driver.cpp)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user