Wismy/x7 access (#7182)

X7 ACCESS
This commit is contained in:
Bertrand Songis
2019-12-12 14:44:34 +01:00
committed by GitHub
parent 249576f79b
commit b06e865141
18 changed files with 240 additions and 61 deletions
@@ -24,7 +24,9 @@
Fifo<uint8_t, BT_TX_FIFO_SIZE> btTxFifo;
Fifo<uint8_t, BT_RX_FIFO_SIZE> btRxFifo;
#if defined(PCBX7) || defined(PCBXLITE)
#if defined(PCBX7ACCESS)
//nothing to do
#elif defined(PCBX7) || defined(PCBXLITE)
volatile uint8_t btChipPresent = 0;
#endif
@@ -117,7 +119,9 @@ extern "C" void BT_USART_IRQHandler(void)
uint8_t byte = USART_ReceiveData(BT_USART);
btRxFifo.push(byte);
TRACE("BT %02X", byte);
#if defined(PCBX7) || defined(PCBXLITE)
#if defined(PCBX7ACCESS)
//nothing to do
#elif defined(PCBX7) || defined(PCBXLITE)
if (!btChipPresent) {
// This is to differentiate X7 and X7S and X-Lite with/without BT
btChipPresent = 1;