Bsongis/x7 bluetooth (#5068)

* Trainer Bluetooth support added
X7S board added (X7 has no bluetooth while X7S has)
X10 HAL updated

* Bluetooth Telemetry

* En fix
Add all languages

* Temporary test for @bsongis

* Missing translations
This commit is contained in:
Bertrand Songis
2017-08-12 00:49:54 +02:00
committed by GitHub
parent 51be7b000e
commit 8d8fef23c9
51 changed files with 972 additions and 636 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
enum BluetoothStates {
BLUETOOTH_STATE_OFF,
BLUETOOTH_STATE_NAME_SENT,
BLUETOOTH_STATE_POWER_SENT,
BLUETOOTH_STATE_ROLE_SENT,
BLUETOOTH_STATE_IDLE,
BLUETOOTH_STATE_DISCOVER_REQUESTED,
BLUETOOTH_STATE_DISCOVER_SENT,
BLUETOOTH_STATE_DISCOVER_START,
BLUETOOTH_STATE_DISCOVER_END,
BLUETOOTH_STATE_BIND_REQUESTED,
BLUETOOTH_STATE_BIND_SENT,
BLUETOOTH_STATE_CONNECTED
};
#define LEN_BLUETOOTH_FRIEND 16
extern volatile uint8_t bluetoothState;
extern char bluetoothFriend[LEN_BLUETOOTH_FRIEND+1];
void bluetoothWriteString(const char * command);
void bluetoothForwardTelemetry(uint8_t data);
void bluetoothWakeup();