mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
FrSky X3 board support added
This commit is contained in:
parent
bc5c3587d8
commit
8ec797730e
22 changed files with 270 additions and 60 deletions
|
@ -1,7 +1,7 @@
|
||||||
include(CMakeForceCompiler)
|
include(CMakeForceCompiler)
|
||||||
include(Bitmaps)
|
include(Bitmaps)
|
||||||
|
|
||||||
set(PCB_TYPES X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
|
set(PCB_TYPES X3 X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
|
||||||
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
|
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
|
||||||
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
|
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ set(FATFS_SRC
|
||||||
|
|
||||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
|
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
|
||||||
include(targets/horus/CMakeLists.txt)
|
include(targets/horus/CMakeLists.txt)
|
||||||
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL X3 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
||||||
include(targets/taranis/CMakeLists.txt)
|
include(targets/taranis/CMakeLists.txt)
|
||||||
elseif(PCB STREQUAL SKY9X OR PCB STREQUAL 9XRPRO OR PCB STREQUAL AR9X)
|
elseif(PCB STREQUAL SKY9X OR PCB STREQUAL 9XRPRO OR PCB STREQUAL AR9X)
|
||||||
include(targets/sky9x/CMakeLists.txt)
|
include(targets/sky9x/CMakeLists.txt)
|
||||||
|
@ -131,7 +131,7 @@ else()
|
||||||
add_definitions(-DEEPROM -DEEPROM_RAW)
|
add_definitions(-DEEPROM -DEEPROM_RAW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCH STREQUAL ARM AND NOT PCB STREQUAL X12S AND NOT PCB STREQUAL X10 AND NOT PCB STREQUAL XLITE AND NOT PCB STREQUAL XLITES)
|
if(ARCH STREQUAL ARM AND NOT PCB STREQUAL X12S AND NOT PCB STREQUAL X10 AND NOT PCB STREQUAL XLITE AND NOT PCB STREQUAL XLITES AND NOT PCB STREQUAL X3)
|
||||||
add_definitions(-DEEPROM_CONVERSIONS)
|
add_definitions(-DEEPROM_CONVERSIONS)
|
||||||
set(SRC ${SRC} storage/eeprom_conversions.cpp)
|
set(SRC ${SRC} storage/eeprom_conversions.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -71,32 +71,50 @@ char * bluetoothReadline(bool error_reset)
|
||||||
if (!btRxFifo.pop(byte)) {
|
if (!btRxFifo.pop(byte)) {
|
||||||
#if defined(PCBX9E) && !defined(USEHORUSBT) // X9E BT module can get unresponsive
|
#if defined(PCBX9E) && !defined(USEHORUSBT) // X9E BT module can get unresponsive
|
||||||
TRACE("NO RESPONSE FROM BT MODULE");
|
TRACE("NO RESPONSE FROM BT MODULE");
|
||||||
|
#endif
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRACE_NOCRLF("%02X ", byte);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (error_reset && byte == 'R' && bluetoothBufferIndex == 4 && memcmp(bluetoothBuffer, "ERRO", 4)) {
|
||||||
|
#if defined(PCBX9E) // X9E enter BT reset loop if following code is implemented
|
||||||
|
TRACE("BT Error...");
|
||||||
|
#else
|
||||||
|
TRACE("BT Reset...");
|
||||||
|
bluetoothBufferIndex = 0;
|
||||||
|
bluetoothDone();
|
||||||
|
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||||
|
bluetoothWakeupTime = get_tmr10ms() + 100; /* 1s */
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
TRACE_NOCRLF("%02X ", byte);
|
else
|
||||||
|
#endif
|
||||||
|
|
||||||
if (byte == '\n') {
|
if (byte == '\n') {
|
||||||
if (bluetoothBufferIndex > 2 && bluetoothBuffer[bluetoothBufferIndex-1] == '\r') {
|
if (bluetoothBufferIndex > 2 && bluetoothBuffer[bluetoothBufferIndex-1] == '\r') {
|
||||||
bluetoothBuffer[bluetoothBufferIndex-1] = '\0';
|
bluetoothBuffer[bluetoothBufferIndex-1] = '\0';
|
||||||
bluetoothBufferIndex = 0;
|
bluetoothBufferIndex = 0;
|
||||||
TRACE("BT< %s", bluetoothBuffer);
|
TRACE("BT< %s", bluetoothBuffer);
|
||||||
if (error_reset && !strcmp((char *)bluetoothBuffer, "ERROR")) {
|
if (error_reset && !strcmp((char *)bluetoothBuffer, "ERROR")) {
|
||||||
#if defined(PCBX9E) // X9E enter BT reset loop if following code is implemented
|
#if defined(PCBX9E) // X9E enter BT reset loop if following code is implemented
|
||||||
TRACE("BT error...");
|
TRACE("BT Error...");
|
||||||
#else
|
#else
|
||||||
TRACE("BT Reset...");
|
TRACE("BT Reset...");
|
||||||
bluetoothDone();
|
bluetoothDone();
|
||||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||||
bluetoothWakeupTime = get_tmr10ms() + 100; /* 1s */
|
bluetoothWakeupTime = get_tmr10ms() + 100; /* 1s */
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!strncmp((char *)bluetoothBuffer, "Central:", 8))
|
if (!memcmp(bluetoothBuffer, "Central:", 8))
|
||||||
strcpy(bluetoothLocalAddr, (char *)bluetoothBuffer+8);
|
strcpy(bluetoothLocalAddr, (char *) bluetoothBuffer + 8);
|
||||||
else if (!strncmp((char *)bluetoothBuffer, "Peripheral:", 11))
|
else if (!memcmp(bluetoothBuffer, "Peripheral:", 11))
|
||||||
strcpy(bluetoothLocalAddr, (char *)bluetoothBuffer+11);
|
strcpy(bluetoothLocalAddr, (char *) bluetoothBuffer + 11);
|
||||||
return (char *)bluetoothBuffer;
|
return (char *) bluetoothBuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -328,44 +346,67 @@ void bluetoothWakeup()
|
||||||
if (now < bluetoothWakeupTime)
|
if (now < bluetoothWakeupTime)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!usbPlugged()) {
|
||||||
|
bluetoothWakeupTime += 1000; // 10s
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bluetoothWakeupTime = now + 5; /* 50ms default */
|
bluetoothWakeupTime = now + 5; /* 50ms default */
|
||||||
|
|
||||||
|
static uint8_t oldbluetooth = 255;
|
||||||
|
|
||||||
|
if (oldbluetooth != bluetoothState) {
|
||||||
|
TRACE("State %d", bluetoothState);
|
||||||
|
oldbluetooth = bluetoothState;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_OFF || (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && !IS_BLUETOOTH_TRAINER())) {
|
if (g_eeGeneral.bluetoothMode == BLUETOOTH_OFF || (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && !IS_BLUETOOTH_TRAINER())) {
|
||||||
|
//TRACE_NOCRLF("A");
|
||||||
if (bluetoothState != BLUETOOTH_STATE_OFF) {
|
if (bluetoothState != BLUETOOTH_STATE_OFF) {
|
||||||
|
//TRACE_NOCRLF("Z");
|
||||||
bluetoothDone();
|
bluetoothDone();
|
||||||
bluetoothState = BLUETOOTH_STATE_OFF;
|
bluetoothState = BLUETOOTH_STATE_OFF;
|
||||||
}
|
}
|
||||||
bluetoothWakeupTime = now + 10; /* 100ms */
|
bluetoothWakeupTime = now + 10; /* 100ms */
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_OFF) {
|
else if (bluetoothState == BLUETOOTH_STATE_OFF) {
|
||||||
|
//TRACE_NOCRLF("B");
|
||||||
bluetoothInit(BLUETOOTH_FACTORY_BAUDRATE);
|
bluetoothInit(BLUETOOTH_FACTORY_BAUDRATE);
|
||||||
bluetoothState = BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT;
|
bluetoothState = BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bluetoothState != BLUETOOTH_STATE_OFF) {
|
if (bluetoothState != BLUETOOTH_STATE_OFF) {
|
||||||
|
//TRACE_NOCRLF("C");
|
||||||
bluetoothWriteWakeup();
|
bluetoothWriteWakeup();
|
||||||
if (bluetoothIsWriting()) {
|
if (bluetoothIsWriting()) {
|
||||||
|
//TRACE_NOCRLF("D");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bluetoothState == BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT) {
|
if (bluetoothState == BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT) {
|
||||||
|
//TRACE_NOCRLF("F");
|
||||||
bluetoothWriteString("AT+BAUD4\r\n");
|
bluetoothWriteString("AT+BAUD4\r\n");
|
||||||
bluetoothState = BLUETOOTH_STATE_BAUDRATE_SENT;
|
bluetoothState = BLUETOOTH_STATE_BAUDRATE_SENT;
|
||||||
bluetoothWakeupTime = now + 10; /* 100ms */
|
bluetoothWakeupTime = now + 10; /* 100ms */
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_BAUDRATE_SENT) {
|
else if (bluetoothState == BLUETOOTH_STATE_BAUDRATE_SENT) {
|
||||||
|
//TRACE_NOCRLF("G");
|
||||||
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
|
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
|
||||||
bluetoothState = BLUETOOTH_STATE_BAUDRATE_INIT;
|
bluetoothState = BLUETOOTH_STATE_BAUDRATE_INIT;
|
||||||
bluetoothReadline(false);
|
bluetoothReadline(false);
|
||||||
bluetoothWakeupTime = now + 10; /* 100ms */
|
bluetoothWakeupTime = now + 10; /* 100ms */
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_CONNECTED) {
|
else if (bluetoothState == BLUETOOTH_STATE_CONNECTED) {
|
||||||
|
//TRACE_NOCRLF("H");
|
||||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH) {
|
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH) {
|
||||||
|
//TRACE_NOCRLF("I");
|
||||||
bluetoothReceiveTrainer();
|
bluetoothReceiveTrainer();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
//TRACE_NOCRLF("J");
|
||||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH) {
|
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH) {
|
||||||
|
TRACE_NOCRLF("S");
|
||||||
bluetoothSendTrainer();
|
bluetoothSendTrainer();
|
||||||
bluetoothWakeupTime = now + 2; /* 20ms */
|
bluetoothWakeupTime = now + 2; /* 20ms */
|
||||||
}
|
}
|
||||||
|
@ -373,8 +414,13 @@ void bluetoothWakeup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
//TRACE_NOCRLF("L");
|
||||||
char * line = bluetoothReadline();
|
char * line = bluetoothReadline();
|
||||||
|
if (line) {
|
||||||
|
TRACE("BT %s", line);
|
||||||
|
}
|
||||||
if (bluetoothState == BLUETOOTH_STATE_BAUDRATE_INIT) {
|
if (bluetoothState == BLUETOOTH_STATE_BAUDRATE_INIT) {
|
||||||
|
//TRACE_NOCRLF("M");
|
||||||
char command[32];
|
char command[32];
|
||||||
char * cur = strAppend(command, BLUETOOTH_COMMAND_NAME);
|
char * cur = strAppend(command, BLUETOOTH_COMMAND_NAME);
|
||||||
uint8_t len = ZLEN(g_eeGeneral.bluetoothName);
|
uint8_t len = ZLEN(g_eeGeneral.bluetoothName);
|
||||||
|
@ -387,7 +433,7 @@ void bluetoothWakeup()
|
||||||
#if defined(PCBHORUS)
|
#if defined(PCBHORUS)
|
||||||
cur = strAppend(cur, "Horus");
|
cur = strAppend(cur, "Horus");
|
||||||
#else
|
#else
|
||||||
cur = strAppend(cur, "Taranis");
|
cur = strAppend(cur, "taranis");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
strAppend(cur, "\r\n");
|
strAppend(cur, "\r\n");
|
||||||
|
@ -395,10 +441,12 @@ void bluetoothWakeup()
|
||||||
bluetoothState = BLUETOOTH_STATE_NAME_SENT;
|
bluetoothState = BLUETOOTH_STATE_NAME_SENT;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_NAME_SENT && (!strncmp(line, "OK+", 3) || !strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
else if (bluetoothState == BLUETOOTH_STATE_NAME_SENT && (!strncmp(line, "OK+", 3) || !strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
||||||
|
//TRACE_NOCRLF("N");
|
||||||
bluetoothWriteString("AT+TXPW\r\n");
|
bluetoothWriteString("AT+TXPW\r\n");
|
||||||
bluetoothState = BLUETOOTH_STATE_POWER_SENT;
|
bluetoothState = BLUETOOTH_STATE_POWER_SENT;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_POWER_SENT && (!strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
else if (bluetoothState == BLUETOOTH_STATE_POWER_SENT && (!strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
||||||
|
//TRACE_NOCRLF("O");
|
||||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH)
|
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TRAINER && g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH)
|
||||||
bluetoothWriteString("AT+ROLE1\r\n");
|
bluetoothWriteString("AT+ROLE1\r\n");
|
||||||
else
|
else
|
||||||
|
@ -406,28 +454,35 @@ void bluetoothWakeup()
|
||||||
bluetoothState = BLUETOOTH_STATE_ROLE_SENT;
|
bluetoothState = BLUETOOTH_STATE_ROLE_SENT;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_ROLE_SENT && (!strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
else if (bluetoothState == BLUETOOTH_STATE_ROLE_SENT && (!strncmp(line, "Central:", 8) || !strncmp(line, "Peripheral:", 11))) {
|
||||||
|
//TRACE_NOCRLF("P");
|
||||||
bluetoothState = BLUETOOTH_STATE_IDLE;
|
bluetoothState = BLUETOOTH_STATE_IDLE;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_REQUESTED) {
|
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_REQUESTED) {
|
||||||
|
//TRACE_NOCRLF("Q");
|
||||||
bluetoothWriteString("AT+DISC?\r\n");
|
bluetoothWriteString("AT+DISC?\r\n");
|
||||||
bluetoothState = BLUETOOTH_STATE_DISCOVER_SENT;
|
bluetoothState = BLUETOOTH_STATE_DISCOVER_SENT;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_SENT && !strcmp(line, "OK+DISCS")) {
|
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_SENT && !strcmp(line, "OK+DISCS")) {
|
||||||
|
//TRACE_NOCRLF("R");
|
||||||
bluetoothState = BLUETOOTH_STATE_DISCOVER_START;
|
bluetoothState = BLUETOOTH_STATE_DISCOVER_START;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_START && !strncmp(line, "OK+DISC:", 8)) {
|
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_START && !strncmp(line, "OK+DISC:", 8)) {
|
||||||
|
//TRACE_NOCRLF("S");
|
||||||
strcpy(bluetoothDistantAddr, &line[8]); // TODO quick & dirty
|
strcpy(bluetoothDistantAddr, &line[8]); // TODO quick & dirty
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_START && !strcmp(line, "OK+DISCE")) {
|
else if (bluetoothState == BLUETOOTH_STATE_DISCOVER_START && !strcmp(line, "OK+DISCE")) {
|
||||||
|
//TRACE_NOCRLF("T");
|
||||||
bluetoothState = BLUETOOTH_STATE_DISCOVER_END;
|
bluetoothState = BLUETOOTH_STATE_DISCOVER_END;
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_BIND_REQUESTED) {
|
else if (bluetoothState == BLUETOOTH_STATE_BIND_REQUESTED) {
|
||||||
|
//TRACE_NOCRLF("U");
|
||||||
char command[32];
|
char command[32];
|
||||||
strAppend(strAppend(strAppend(command, "AT+CON"), bluetoothDistantAddr), "\r\n");
|
strAppend(strAppend(strAppend(command, "AT+CON"), bluetoothDistantAddr), "\r\n");
|
||||||
bluetoothWriteString(command);
|
bluetoothWriteString(command);
|
||||||
bluetoothState = BLUETOOTH_STATE_CONNECT_SENT;
|
bluetoothState = BLUETOOTH_STATE_CONNECT_SENT;
|
||||||
}
|
}
|
||||||
else if ((bluetoothState == BLUETOOTH_STATE_IDLE || bluetoothState == BLUETOOTH_STATE_DISCONNECTED || bluetoothState == BLUETOOTH_STATE_CONNECT_SENT) && !strncmp(line, "Connected:", 10)) {
|
else if ((bluetoothState == BLUETOOTH_STATE_IDLE || bluetoothState == BLUETOOTH_STATE_DISCONNECTED || bluetoothState == BLUETOOTH_STATE_CONNECT_SENT) && !strncmp(line, "Connected:", 10)) {
|
||||||
|
//TRACE_NOCRLF("V");
|
||||||
strcpy(bluetoothDistantAddr, &line[10]); // TODO quick & dirty
|
strcpy(bluetoothDistantAddr, &line[10]); // TODO quick & dirty
|
||||||
bluetoothState = BLUETOOTH_STATE_CONNECTED;
|
bluetoothState = BLUETOOTH_STATE_CONNECTED;
|
||||||
if (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH) {
|
if (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH) {
|
||||||
|
@ -435,6 +490,7 @@ void bluetoothWakeup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bluetoothState == BLUETOOTH_STATE_DISCONNECTED && !line) {
|
else if (bluetoothState == BLUETOOTH_STATE_DISCONNECTED && !line) {
|
||||||
|
//TRACE_NOCRLF("W");
|
||||||
char command[32];
|
char command[32];
|
||||||
strAppend(strAppend(strAppend(command, "AT+CON"), bluetoothDistantAddr), "\r\n");
|
strAppend(strAppend(strAppend(command, "AT+CON"), bluetoothDistantAddr), "\r\n");
|
||||||
bluetoothWriteString(command);
|
bluetoothWriteString(command);
|
||||||
|
|
|
@ -44,13 +44,6 @@ enum BluetoothStates {
|
||||||
|
|
||||||
#define LEN_BLUETOOTH_ADDR 16
|
#define LEN_BLUETOOTH_ADDR 16
|
||||||
|
|
||||||
#if (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
|
|
||||||
extern volatile uint8_t btChipPresent;
|
|
||||||
#define IS_BLUETOOTH_CHIP_PRESENT() (btChipPresent)
|
|
||||||
#else
|
|
||||||
#define IS_BLUETOOTH_CHIP_PRESENT() (true)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern volatile uint8_t bluetoothState;
|
extern volatile uint8_t bluetoothState;
|
||||||
extern char bluetoothLocalAddr[LEN_BLUETOOTH_ADDR+1];
|
extern char bluetoothLocalAddr[LEN_BLUETOOTH_ADDR+1];
|
||||||
extern char bluetoothDistantAddr[LEN_BLUETOOTH_ADDR+1];
|
extern char bluetoothDistantAddr[LEN_BLUETOOTH_ADDR+1];
|
||||||
|
|
|
@ -850,6 +850,8 @@ static inline void check_struct()
|
||||||
CHKSIZE(FrSkyTelemetryData, 104);
|
CHKSIZE(FrSkyTelemetryData, 104);
|
||||||
CHKSIZE(ModelHeader, 12);
|
CHKSIZE(ModelHeader, 12);
|
||||||
CHKSIZE(CurveData, 4);
|
CHKSIZE(CurveData, 4);
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
// TODO
|
||||||
#elif defined(PCBTARANIS)
|
#elif defined(PCBTARANIS)
|
||||||
CHKSIZE(MixData, 22);
|
CHKSIZE(MixData, 22);
|
||||||
CHKSIZE(ExpoData, 19);
|
CHKSIZE(ExpoData, 19);
|
||||||
|
|
|
@ -231,7 +231,7 @@ void menuModelSelect(event_t event)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
case EVT_KEY_LONG(KEY_PAGE):
|
case EVT_KEY_LONG(KEY_PAGE):
|
||||||
chainMenu(menuTabModel[DIM(menuTabModel)-1]);
|
chainMenu(menuTabModel[DIM(menuTabModel)-1]);
|
||||||
killEvents(event);
|
killEvents(event);
|
||||||
|
@ -263,7 +263,7 @@ void menuModelSelect(event_t event)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
case EVT_ROTARY_LEFT:
|
case EVT_ROTARY_LEFT:
|
||||||
case EVT_ROTARY_RIGHT:
|
case EVT_ROTARY_RIGHT:
|
||||||
#endif
|
#endif
|
||||||
|
@ -304,7 +304,7 @@ void menuModelSelect(event_t event)
|
||||||
lcdDrawNumber(17*FW, 0, reusableBuffer.modelsel.eepromfree, RIGHT);
|
lcdDrawNumber(17*FW, 0, reusableBuffer.modelsel.eepromfree, RIGHT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), 0);
|
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), 0);
|
||||||
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
||||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), (sub == g_eeGeneral.currModel) ? ((IS_ROTARY_ENCODER_NAVIGATION_ENABLE() && s_editMode < 0) ? INVERS|BLINK : INVERS) : 0);
|
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), (sub == g_eeGeneral.currModel) ? ((IS_ROTARY_ENCODER_NAVIGATION_ENABLE() && s_editMode < 0) ? INVERS|BLINK : INVERS) : 0);
|
||||||
|
|
|
@ -119,7 +119,7 @@ enum MenuModelSetupItems {
|
||||||
ITEM_MODEL_EXTRA_MODULE_CHANNELS,
|
ITEM_MODEL_EXTRA_MODULE_CHANNELS,
|
||||||
ITEM_MODEL_EXTRA_MODULE_BIND,
|
ITEM_MODEL_EXTRA_MODULE_BIND,
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
ITEM_MODEL_TRAINER_LABEL,
|
ITEM_MODEL_TRAINER_LABEL,
|
||||||
ITEM_MODEL_TRAINER_MODE,
|
ITEM_MODEL_TRAINER_MODE,
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
|
@ -205,7 +205,7 @@ enum MenuModelSetupItems {
|
||||||
#define EXTRA_MODULE_ROWS
|
#define EXTRA_MODULE_ROWS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
#define ANTENNA_ROW
|
#define ANTENNA_ROW
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
#define TRAINER_BLUETOOTH_M_ROW ((bluetoothDistantAddr[0] == '\0' || bluetoothState == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
#define TRAINER_BLUETOOTH_M_ROW ((bluetoothDistantAddr[0] == '\0' || bluetoothState == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
||||||
|
@ -1083,7 +1083,7 @@ void menuModelSetup(event_t event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
case ITEM_MODEL_TRAINER_PARAMS:
|
case ITEM_MODEL_TRAINER_PARAMS:
|
||||||
lcdDrawTextAlignedLeft(y, STR_PPMFRAME);
|
lcdDrawTextAlignedLeft(y, STR_PPMFRAME);
|
||||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
lcdDrawText(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
||||||
|
@ -1781,7 +1781,7 @@ void menuModelFailsafe(event_t event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gauge
|
// Gauge
|
||||||
#if !defined(PCBX7) // X7 LCD doesn't like too many horizontal lines
|
#if !defined(PCBX7) && !defined(PCBX3) // X7 LCD doesn't like too many horizontal lines
|
||||||
lcdDrawRect(x+LCD_W-3-wbar, y, wbar+1, 6);
|
lcdDrawRect(x+LCD_W-3-wbar, y, wbar+1, 6);
|
||||||
#endif
|
#endif
|
||||||
const uint8_t lenChannel = limit<uint8_t>(1, (abs(channelValue) * wbar/2 + lim/2) / lim, wbar/2);
|
const uint8_t lenChannel = limit<uint8_t>(1, (abs(channelValue) * wbar/2 + lim/2) / lim, wbar/2);
|
||||||
|
|
|
@ -423,7 +423,7 @@ void menuModelTelemetryFrsky(event_t event)
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case EVT_KEY_BREAK(KEY_DOWN):
|
case EVT_KEY_BREAK(KEY_DOWN):
|
||||||
case EVT_KEY_BREAK(KEY_UP):
|
case EVT_KEY_BREAK(KEY_UP):
|
||||||
#if !defined(PCBX7)
|
#if !defined(PCBX7) && !defined(PCBX3)
|
||||||
case EVT_KEY_BREAK(KEY_LEFT):
|
case EVT_KEY_BREAK(KEY_LEFT):
|
||||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -113,7 +113,9 @@ enum MenuRadioHardwareItems {
|
||||||
ITEM_RADIO_HARDWARE_SF,
|
ITEM_RADIO_HARDWARE_SF,
|
||||||
ITEM_RADIO_HARDWARE_SH,
|
ITEM_RADIO_HARDWARE_SH,
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CROSSFIRE) && SPORT_MAX_BAUDRATE < 400000
|
||||||
ITEM_RADIO_HARDWARE_SERIAL_BAUDRATE,
|
ITEM_RADIO_HARDWARE_SERIAL_BAUDRATE,
|
||||||
|
#endif
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
ITEM_RADIO_HARDWARE_BLUETOOTH_MODE,
|
ITEM_RADIO_HARDWARE_BLUETOOTH_MODE,
|
||||||
ITEM_RADIO_HARDWARE_BLUETOOTH_PAIRING_CODE,
|
ITEM_RADIO_HARDWARE_BLUETOOTH_PAIRING_CODE,
|
||||||
|
@ -138,17 +140,19 @@ enum MenuRadioHardwareItems {
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define BLUETOOTH_ROWS uint8_t(IS_BLUETOOTH_CHIP_PRESENT() ? 0 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY ? -1 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
#define BLUETOOTH_ROWS uint8_t(IS_BLUETOOTH_CHIP_PRESENT() ? 0 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY ? -1 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
||||||
#elif defined(BLUETOOTH)
|
#elif defined(BLUETOOTH)
|
||||||
#define BLUETOOTH_ROWS 0, uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
#define BLUETOOTH_ROWS 0, uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : READONLY_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : READONLY_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
||||||
#else
|
#else
|
||||||
#define BLUETOOTH_ROWS
|
#define BLUETOOTH_ROWS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBXLITES)
|
#if defined(PCBX3)
|
||||||
#define SWITCH_TYPE_MAX(sw) (sw >= MIXSRC_SE-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
#define SWITCH_TYPE_MAX(sw) (sw == MIXSRC_SD-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||||
|
#elif defined(PCBXLITES)
|
||||||
|
#define SWITCH_TYPE_MAX(sw) (sw >= MIXSRC_SE-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||||
#elif defined(PCBXLITE)
|
#elif defined(PCBXLITE)
|
||||||
#define SWITCH_TYPE_MAX(sw) (SWITCH_3POS)
|
#define SWITCH_TYPE_MAX(sw) (SWITCH_3POS)
|
||||||
#else
|
#else
|
||||||
#define SWITCH_TYPE_MAX(sw) ((MIXSRC_SF-MIXSRC_FIRST_SWITCH == sw || MIXSRC_SH-MIXSRC_FIRST_SWITCH == sw) ? SWITCH_2POS : SWITCH_3POS)
|
#define SWITCH_TYPE_MAX(sw) ((MIXSRC_SF-MIXSRC_FIRST_SWITCH == sw || MIXSRC_SH-MIXSRC_FIRST_SWITCH == sw) ? SWITCH_2POS : SWITCH_3POS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HW_SETTINGS_COLUMN1 30
|
#define HW_SETTINGS_COLUMN1 30
|
||||||
|
@ -222,7 +226,9 @@ void menuRadioHardware(event_t event)
|
||||||
POTS_ROWS,
|
POTS_ROWS,
|
||||||
LABEL(Switches),
|
LABEL(Switches),
|
||||||
SWITCHES_ROWS,
|
SWITCHES_ROWS,
|
||||||
|
#if defined(CROSSFIRE) && SPORT_MAX_BAUDRATE < 400000
|
||||||
0 /*max bauds*/,
|
0 /*max bauds*/,
|
||||||
|
#endif
|
||||||
BLUETOOTH_ROWS
|
BLUETOOTH_ROWS
|
||||||
0 /*jitter filter*/,
|
0 /*jitter filter*/,
|
||||||
0 /*owner id*/
|
0 /*owner id*/
|
||||||
|
@ -301,6 +307,7 @@ void menuRadioHardware(event_t event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CROSSFIRE) && SPORT_MAX_BAUDRATE < 400000
|
||||||
case ITEM_RADIO_HARDWARE_SERIAL_BAUDRATE:
|
case ITEM_RADIO_HARDWARE_SERIAL_BAUDRATE:
|
||||||
lcdDrawTextAlignedLeft(y, STR_MAXBAUDRATE);
|
lcdDrawTextAlignedLeft(y, STR_MAXBAUDRATE);
|
||||||
lcdDrawNumber(HW_SETTINGS_COLUMN2, y, CROSSFIRE_BAUDRATES[g_eeGeneral.telemetryBaudrate], attr|LEFT);
|
lcdDrawNumber(HW_SETTINGS_COLUMN2, y, CROSSFIRE_BAUDRATES[g_eeGeneral.telemetryBaudrate], attr|LEFT);
|
||||||
|
@ -318,6 +325,7 @@ void menuRadioHardware(event_t event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(BLUETOOTH)
|
#if defined(BLUETOOTH)
|
||||||
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
|
case ITEM_RADIO_HARDWARE_BLUETOOTH_MODE:
|
||||||
|
|
|
@ -227,7 +227,7 @@ void displayVoltageOrAlarm()
|
||||||
#define displayVoltageOrAlarm() displayBattVoltage()
|
#define displayVoltageOrAlarm() displayBattVoltage()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7) || defined(PCBX3)
|
||||||
#define EVT_KEY_CONTEXT_MENU EVT_KEY_LONG(KEY_ENTER)
|
#define EVT_KEY_CONTEXT_MENU EVT_KEY_LONG(KEY_ENTER)
|
||||||
#define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_PAGE)
|
#define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_PAGE)
|
||||||
#define EVT_KEY_NEXT_PAGE EVT_ROTARY_RIGHT
|
#define EVT_KEY_NEXT_PAGE EVT_ROTARY_RIGHT
|
||||||
|
|
|
@ -641,7 +641,7 @@ bool isTrainerModeAvailable(int mode)
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#elif defined(PCBX7) || defined(PCBXLITES)
|
#elif defined(PCBX7) || defined(PCBXLITES) || defined(PCBX3)
|
||||||
bool isTrainerModeAvailable(int mode)
|
bool isTrainerModeAvailable(int mode)
|
||||||
{
|
{
|
||||||
if (IS_EXTERNAL_MODULE_ENABLED() && (mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE))
|
if (IS_EXTERNAL_MODULE_ENABLED() && (mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE))
|
||||||
|
|
|
@ -270,7 +270,15 @@ void logsWrite()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: use hardware config to populate
|
// TODO: use hardware config to populate
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBX3)
|
||||||
|
f_printf(&g_oLogFile, "%d,%d,%d,%d,0x%08X%08X,",
|
||||||
|
GET_3POS_STATE(SA),
|
||||||
|
GET_3POS_STATE(SB),
|
||||||
|
GET_3POS_STATE(SC),
|
||||||
|
GET_3POS_STATE(SD),
|
||||||
|
getLogicalSwitchesStates(32),
|
||||||
|
getLogicalSwitchesStates(0));
|
||||||
|
#elif defined(PCBXLITE)
|
||||||
f_printf(&g_oLogFile, "%d,%d,%d,%d,0x%08X%08X,",
|
f_printf(&g_oLogFile, "%d,%d,%d,%d,0x%08X%08X,",
|
||||||
GET_3POS_STATE(SA),
|
GET_3POS_STATE(SA),
|
||||||
GET_3POS_STATE(SB),
|
GET_3POS_STATE(SB),
|
||||||
|
|
|
@ -138,6 +138,9 @@ const char * getFileExtension(const char * filename, uint8_t size=0, uint8_t ext
|
||||||
#elif defined(PCBX7)
|
#elif defined(PCBX7)
|
||||||
#define OTX_FOURCC 0x3678746F // otx for Taranis X7
|
#define OTX_FOURCC 0x3678746F // otx for Taranis X7
|
||||||
#define O9X_FOURCC 0x3378396F // o9x for Taranis X7
|
#define O9X_FOURCC 0x3378396F // o9x for Taranis X7
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define OTX_FOURCC 0x3C78746F // otx for Taranis X3
|
||||||
|
#define O9X_FOURCC 0x3C78396F // o9x for Taranis X3
|
||||||
#elif defined(PCBX9D) || defined(PCBX9DP)
|
#elif defined(PCBX9D) || defined(PCBX9DP)
|
||||||
#define OTX_FOURCC 0x3378746F // otx for Taranis X9D
|
#define OTX_FOURCC 0x3378746F // otx for Taranis X9D
|
||||||
#define O9X_FOURCC 0x3378396F // o9x for Taranis X9D
|
#define O9X_FOURCC 0x3378396F // o9x for Taranis X9D
|
||||||
|
|
|
@ -135,22 +135,22 @@ void getSwitchesPosition(bool startup)
|
||||||
CHECK_3POS(3, SW_SD);
|
CHECK_3POS(3, SW_SD);
|
||||||
#if defined(PCBXLITES)
|
#if defined(PCBXLITES)
|
||||||
CHECK_2POS(SW_SE);
|
CHECK_2POS(SW_SE);
|
||||||
#elif defined(PCBX7) || defined(PCBXLITE)
|
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||||
// No SE
|
// No SE
|
||||||
#else
|
#else
|
||||||
CHECK_3POS(4, SW_SE);
|
CHECK_3POS(4, SW_SE);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCBXLITE) && !defined(PCBXLITES)
|
#if defined(PCBXLITE) && !defined(PCBXLITES) || defined(PCBX3)
|
||||||
// No SF
|
// No SF
|
||||||
#else
|
#else
|
||||||
CHECK_2POS(SW_SF);
|
CHECK_2POS(SW_SF);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCBX7) || defined(PCBXLITE)
|
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||||
// No SG
|
// No SG
|
||||||
#else
|
#else
|
||||||
CHECK_3POS(5, SW_SG);
|
CHECK_3POS(5, SW_SG);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBXLITE) || defined(PCBX3)
|
||||||
// No SH
|
// No SH
|
||||||
#else
|
#else
|
||||||
CHECK_2POS(SW_SH);
|
CHECK_2POS(SW_SH);
|
||||||
|
|
|
@ -53,6 +53,9 @@
|
||||||
#define FIRST_ANALOG_ADC 0
|
#define FIRST_ANALOG_ADC 0
|
||||||
#define NUM_ANALOGS_ADC 10
|
#define NUM_ANALOGS_ADC 10
|
||||||
#define NUM_ANALOGS_ADC_EXT (NUM_ANALOGS - 10)
|
#define NUM_ANALOGS_ADC_EXT (NUM_ANALOGS - 10)
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define FIRST_ANALOG_ADC 0
|
||||||
|
#define NUM_ANALOGS_ADC NUM_ANALOGS
|
||||||
#else
|
#else
|
||||||
#define FIRST_ANALOG_ADC 0
|
#define FIRST_ANALOG_ADC 0
|
||||||
#define NUM_ANALOGS_ADC NUM_ANALOGS
|
#define NUM_ANALOGS_ADC NUM_ANALOGS
|
||||||
|
@ -117,6 +120,8 @@ void adcInit()
|
||||||
// TODO why do we invert POT1 and POT2 here?
|
// TODO why do we invert POT1 and POT2 here?
|
||||||
ADC_MAIN->SQR2 = (ADC_CHANNEL_BATT<<0); // conversions 7 and more
|
ADC_MAIN->SQR2 = (ADC_CHANNEL_BATT<<0); // conversions 7 and more
|
||||||
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<25) + (ADC_CHANNEL_POT2<<20); // conversions 1 to 6
|
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<25) + (ADC_CHANNEL_POT2<<20); // conversions 1 to 6
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<20) + (ADC_CHANNEL_BATT<<25); // conversions 1 to 6
|
||||||
#else
|
#else
|
||||||
ADC_MAIN->SQR2 = (ADC_CHANNEL_POT3<<0) + (ADC_CHANNEL_SLIDER1<<5) + (ADC_CHANNEL_SLIDER2<<10) + (ADC_CHANNEL_BATT<<15); // conversions 7 and more
|
ADC_MAIN->SQR2 = (ADC_CHANNEL_POT3<<0) + (ADC_CHANNEL_SLIDER1<<5) + (ADC_CHANNEL_SLIDER2<<10) + (ADC_CHANNEL_BATT<<15); // conversions 7 and more
|
||||||
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<20) + (ADC_CHANNEL_POT2<<25); // conversions 1 to 6
|
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<20) + (ADC_CHANNEL_POT2<<25); // conversions 1 to 6
|
||||||
|
|
|
@ -249,8 +249,6 @@
|
||||||
#define PWR_SWITCH_GPIO_REG PWR_GPIO->IDR
|
#define PWR_SWITCH_GPIO_REG PWR_GPIO->IDR
|
||||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_0 // PJ.00
|
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_0 // PJ.00
|
||||||
#define PWR_ON_GPIO_PIN GPIO_Pin_1 // PJ.01
|
#define PWR_ON_GPIO_PIN GPIO_Pin_1 // PJ.01
|
||||||
#define PWR_ON_GPIO_MODER GPIO_MODER_MODER1
|
|
||||||
#define PWR_ON_GPIO_MODER_OUT GPIO_MODER_MODER1_0
|
|
||||||
|
|
||||||
// S.Port update connector
|
// S.Port update connector
|
||||||
#define SPORT_MAX_BAUDRATE 250000 // < 400000
|
#define SPORT_MAX_BAUDRATE 250000 // < 400000
|
||||||
|
|
|
@ -267,7 +267,11 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||||
#endif
|
#endif
|
||||||
#if defined(SWITCHES_GPIO_REG_C_L)
|
#if defined(SWITCHES_GPIO_REG_C_L)
|
||||||
SWITCH_3_CASE(2, SWITCHES_GPIO_REG_C_L, SWITCHES_GPIO_REG_C_H, SWITCHES_GPIO_PIN_C_L, SWITCHES_GPIO_PIN_C_H)
|
SWITCH_3_CASE(2, SWITCHES_GPIO_REG_C_L, SWITCHES_GPIO_REG_C_H, SWITCHES_GPIO_PIN_C_L, SWITCHES_GPIO_PIN_C_H)
|
||||||
|
#endif
|
||||||
|
#if defined(SWITCHES_GPIO_REG_D_L)
|
||||||
SWITCH_3_CASE(3, SWITCHES_GPIO_REG_D_L, SWITCHES_GPIO_REG_D_H, SWITCHES_GPIO_PIN_D_L, SWITCHES_GPIO_PIN_D_H)
|
SWITCH_3_CASE(3, SWITCHES_GPIO_REG_D_L, SWITCHES_GPIO_REG_D_H, SWITCHES_GPIO_PIN_D_L, SWITCHES_GPIO_PIN_D_H)
|
||||||
|
#elif defined(SWITCHES_GPIO_REG_D)
|
||||||
|
SWITCH_CASE (3, SWITCHES_GPIO_REG_D, SWITCHES_GPIO_PIN_D)
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCBX7)
|
#if defined(PCBX7)
|
||||||
SWITCH_CASE (4, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
SWITCH_CASE (4, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||||
|
@ -275,7 +279,7 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||||
#elif defined(PCBXLITES)
|
#elif defined(PCBXLITES)
|
||||||
SWITCH_CASE (4, SWITCHES_GPIO_REG_E, SWITCHES_GPIO_PIN_E)
|
SWITCH_CASE (4, SWITCHES_GPIO_REG_E, SWITCHES_GPIO_PIN_E)
|
||||||
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||||
#elif !defined(PCBXLITE)
|
#elif !defined(PCBXLITE) && !defined(PCBX3)
|
||||||
SWITCH_3_CASE(4, SWITCHES_GPIO_REG_E_L, SWITCHES_GPIO_REG_E_H, SWITCHES_GPIO_PIN_E_L, SWITCHES_GPIO_PIN_E_H)
|
SWITCH_3_CASE(4, SWITCHES_GPIO_REG_E_L, SWITCHES_GPIO_REG_E_H, SWITCHES_GPIO_PIN_E_L, SWITCHES_GPIO_PIN_E_H)
|
||||||
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||||
SWITCH_3_CASE(6, SWITCHES_GPIO_REG_G_L, SWITCHES_GPIO_REG_G_H, SWITCHES_GPIO_PIN_G_L, SWITCHES_GPIO_PIN_G_H)
|
SWITCH_3_CASE(6, SWITCHES_GPIO_REG_G_L, SWITCHES_GPIO_REG_G_H, SWITCHES_GPIO_PIN_G_L, SWITCHES_GPIO_PIN_G_H)
|
||||||
|
|
|
@ -31,6 +31,7 @@ if(PCB STREQUAL X9E)
|
||||||
set(FONTS_TARGET taranis_fonts)
|
set(FONTS_TARGET taranis_fonts)
|
||||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS NO)
|
||||||
elseif(PCB STREQUAL X9D+)
|
elseif(PCB STREQUAL X9D+)
|
||||||
set(CPU_TYPE STM32F2)
|
set(CPU_TYPE STM32F2)
|
||||||
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
||||||
|
@ -47,6 +48,7 @@ elseif(PCB STREQUAL X9D+)
|
||||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
set(SERIAL2_DRIVER ../common/arm/stm32/serial2_driver.cpp)
|
set(SERIAL2_DRIVER ../common/arm/stm32/serial2_driver.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS NO)
|
||||||
elseif(PCB STREQUAL X9D)
|
elseif(PCB STREQUAL X9D)
|
||||||
set(CPU_TYPE STM32F2)
|
set(CPU_TYPE STM32F2)
|
||||||
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
||||||
|
@ -63,6 +65,7 @@ elseif(PCB STREQUAL X9D)
|
||||||
set(LCD_DRIVER lcd_driver_aspi.cpp)
|
set(LCD_DRIVER lcd_driver_aspi.cpp)
|
||||||
set(SERIAL2_DRIVER ../common/arm/stm32/serial2_driver.cpp)
|
set(SERIAL2_DRIVER ../common/arm/stm32/serial2_driver.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS NO)
|
||||||
elseif(PCB STREQUAL X7)
|
elseif(PCB STREQUAL X7)
|
||||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||||
set(CPU_TYPE STM32F2)
|
set(CPU_TYPE STM32F2)
|
||||||
|
@ -80,6 +83,25 @@ elseif(PCB STREQUAL X7)
|
||||||
set(FONTS_TARGET 9x_fonts_1bit)
|
set(FONTS_TARGET 9x_fonts_1bit)
|
||||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS YES)
|
||||||
|
elseif(PCB STREQUAL X3)
|
||||||
|
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)
|
||||||
|
set(FLAVOUR x3)
|
||||||
|
add_definitions(-DPCBX3 -DSOFTWARE_VOLUME)
|
||||||
|
add_definitions(-DEEPROM_VARIANT=0x4000)
|
||||||
|
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||||
|
set(GUI_DIR 128x64)
|
||||||
|
set(NAVIGATION_TYPE x7)
|
||||||
|
set(BITMAPS_TARGET 9x_bitmaps)
|
||||||
|
set(FONTS_TARGET 9x_fonts_1bit)
|
||||||
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS YES)
|
||||||
elseif(PCB STREQUAL XLITE)
|
elseif(PCB STREQUAL XLITE)
|
||||||
set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)")
|
set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)")
|
||||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||||
|
@ -98,6 +120,7 @@ elseif(PCB STREQUAL XLITE)
|
||||||
set(FONTS_TARGET 9x_fonts_1bit)
|
set(FONTS_TARGET 9x_fonts_1bit)
|
||||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
|
set(STATUS_LEDS YES)
|
||||||
elseif(PCB STREQUAL XLITES)
|
elseif(PCB STREQUAL XLITES)
|
||||||
set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)")
|
set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)")
|
||||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||||
|
@ -117,6 +140,7 @@ elseif(PCB STREQUAL XLITES)
|
||||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||||
set(GVAR_SCREEN model_gvars.cpp)
|
set(GVAR_SCREEN model_gvars.cpp)
|
||||||
set(RADIO_SPECTRUM YES)
|
set(RADIO_SPECTRUM YES)
|
||||||
|
set(STATUS_LEDS YES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
||||||
|
@ -192,7 +216,7 @@ if(RADIO_SPECTRUM)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
if(STATUS_LEDS)
|
||||||
set(LED_DRIVER led_driver.cpp)
|
set(LED_DRIVER led_driver.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -363,6 +363,8 @@ enum EnumSwitchesPositions
|
||||||
#define NUM_SWITCHES 4
|
#define NUM_SWITCHES 4
|
||||||
#elif defined(PCBX7)
|
#elif defined(PCBX7)
|
||||||
#define NUM_SWITCHES 6
|
#define NUM_SWITCHES 6
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define NUM_SWITCHES 4
|
||||||
#elif defined(PCBX9E)
|
#elif defined(PCBX9E)
|
||||||
#define NUM_SWITCHES 18 // yes, it's a lot!
|
#define NUM_SWITCHES 18 // yes, it's a lot!
|
||||||
#else
|
#else
|
||||||
|
@ -376,7 +378,7 @@ uint32_t readTrims(void);
|
||||||
#define TRIMS_PRESSED() (readTrims())
|
#define TRIMS_PRESSED() (readTrims())
|
||||||
#define KEYS_PRESSED() (readKeys())
|
#define KEYS_PRESSED() (readKeys())
|
||||||
|
|
||||||
#if defined(PCBX9E) || defined(PCBX7)
|
#if defined(PCBX9E) || defined(PCBX7) || defined(PCBX3)
|
||||||
// Rotary Encoder driver
|
// Rotary Encoder driver
|
||||||
#define ROTARY_ENCODER_NAVIGATION
|
#define ROTARY_ENCODER_NAVIGATION
|
||||||
void checkRotaryEncoder(void);
|
void checkRotaryEncoder(void);
|
||||||
|
@ -672,6 +674,14 @@ void bluetoothInit(uint32_t baudrate);
|
||||||
void bluetoothWriteWakeup(void);
|
void bluetoothWriteWakeup(void);
|
||||||
uint8_t bluetoothIsWriting(void);
|
uint8_t bluetoothIsWriting(void);
|
||||||
void bluetoothDone(void);
|
void bluetoothDone(void);
|
||||||
|
#if defined(PCBX3)
|
||||||
|
#define IS_BLUETOOTH_CHIP_PRESENT() (false)
|
||||||
|
#elif (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
|
||||||
|
extern volatile uint8_t btChipPresent;
|
||||||
|
#define IS_BLUETOOTH_CHIP_PRESENT() (btChipPresent)
|
||||||
|
#else
|
||||||
|
#define IS_BLUETOOTH_CHIP_PRESENT() (true)
|
||||||
|
#endif
|
||||||
|
|
||||||
// LED driver
|
// LED driver
|
||||||
void ledInit(void);
|
void ledInit(void);
|
||||||
|
|
|
@ -55,6 +55,15 @@
|
||||||
#define KEYS_GPIO_PIN_EXIT GPIO_Pin_2 // PD.02
|
#define KEYS_GPIO_PIN_EXIT GPIO_Pin_2 // PD.02
|
||||||
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
|
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
|
||||||
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_10 // PE.10
|
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_10 // PE.10
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define KEYS_GPIO_REG_PAGE GPIOE->IDR
|
||||||
|
#define KEYS_GPIO_PIN_PAGE GPIO_Pin_8 // PE.08
|
||||||
|
#define KEYS_GPIO_REG_MENU GPIOE->IDR
|
||||||
|
#define KEYS_GPIO_PIN_MENU GPIO_Pin_7 // PE.07
|
||||||
|
#define KEYS_GPIO_REG_EXIT GPIOE->IDR
|
||||||
|
#define KEYS_GPIO_PIN_EXIT GPIO_Pin_9 // PE.09
|
||||||
|
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
|
||||||
|
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_11 // PE.11
|
||||||
#else
|
#else
|
||||||
#define KEYS_GPIO_REG_MENU GPIOD->IDR
|
#define KEYS_GPIO_REG_MENU GPIOD->IDR
|
||||||
#define KEYS_GPIO_PIN_MENU GPIO_Pin_7 // PD.07
|
#define KEYS_GPIO_PIN_MENU GPIO_Pin_7 // PD.07
|
||||||
|
@ -81,10 +90,15 @@
|
||||||
#define ENC_GPIO_PIN_A GPIO_Pin_9 // PE.09
|
#define ENC_GPIO_PIN_A GPIO_Pin_9 // PE.09
|
||||||
#define ENC_GPIO_PIN_B GPIO_Pin_11 // PE.11
|
#define ENC_GPIO_PIN_B GPIO_Pin_11 // PE.11
|
||||||
#define ROTARY_ENCODER_POSITION() (((ENC_GPIO->IDR >> 10) & 0x02) + ((ENC_GPIO->IDR >> 9) & 0x01))
|
#define ROTARY_ENCODER_POSITION() (((ENC_GPIO->IDR >> 10) & 0x02) + ((ENC_GPIO->IDR >> 9) & 0x01))
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define ENC_GPIO GPIOE
|
||||||
|
#define ENC_GPIO_PIN_A GPIO_Pin_10 // PE.10
|
||||||
|
#define ENC_GPIO_PIN_B GPIO_Pin_12 // PE.12
|
||||||
|
#define ROTARY_ENCODER_POSITION() (((ENC_GPIO->IDR >> 11) & 0x02) + ((ENC_GPIO->IDR >> 10) & 0x01))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
|
// This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
|
||||||
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7))
|
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7) || defined(PCBX3))
|
||||||
#define KEYS_GPIO_REG_PLUS ENC_GPIO->IDR
|
#define KEYS_GPIO_REG_PLUS ENC_GPIO->IDR
|
||||||
#define KEYS_GPIO_PIN_PLUS ENC_GPIO_PIN_A
|
#define KEYS_GPIO_PIN_PLUS ENC_GPIO_PIN_A
|
||||||
#define KEYS_GPIO_REG_MINUS ENC_GPIO->IDR
|
#define KEYS_GPIO_REG_MINUS ENC_GPIO->IDR
|
||||||
|
@ -135,6 +149,23 @@
|
||||||
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_2 // PC.02
|
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_2 // PC.02
|
||||||
#define TRIMS_GPIO_REG_RHR GPIOE->IDR
|
#define TRIMS_GPIO_REG_RHR GPIOE->IDR
|
||||||
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_4 // PE.04
|
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_4 // PE.04
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define TRIMS_GPIO_REG_LHL GPIOC->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_4 // PC.04
|
||||||
|
#define TRIMS_GPIO_REG_LHR GPIOC->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_LHR GPIO_Pin_5 // PC.05
|
||||||
|
#define TRIMS_GPIO_REG_LVD GPIOB->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_LVD GPIO_Pin_0 // PB.00
|
||||||
|
#define TRIMS_GPIO_REG_LVU GPIOB->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_LVU GPIO_Pin_1 // PB.01
|
||||||
|
#define TRIMS_GPIO_REG_RVD GPIOE->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_RVD GPIO_Pin_13 // PE.13
|
||||||
|
#define TRIMS_GPIO_REG_RHL GPIOE->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_RHL GPIO_Pin_14 // PE.14
|
||||||
|
#define TRIMS_GPIO_REG_RVU GPIOD->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_8 // PD.08
|
||||||
|
#define TRIMS_GPIO_REG_RHR GPIOD->IDR
|
||||||
|
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_9 // PD.09
|
||||||
#else
|
#else
|
||||||
#define TRIMS_GPIO_REG_LHL GPIOE->IDR
|
#define TRIMS_GPIO_REG_LHL GPIOE->IDR
|
||||||
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_4 // PE.04
|
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_4 // PE.04
|
||||||
|
@ -170,11 +201,16 @@
|
||||||
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_7 // PE.07
|
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_7 // PE.07
|
||||||
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_13 // PE.13
|
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_13 // PE.13
|
||||||
#else
|
#elif defined(PCBX3)
|
||||||
#define SWITCHES_GPIO_REG_A_H GPIOB->IDR
|
|
||||||
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_5 // PB.05
|
|
||||||
#define SWITCHES_GPIO_REG_A_L GPIOE->IDR
|
#define SWITCHES_GPIO_REG_A_L GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_0 // PE.00
|
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_7 // PE.07
|
||||||
|
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_13 // PE.13
|
||||||
|
#else
|
||||||
|
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_0 // PE.00
|
||||||
|
#define SWITCHES_GPIO_REG_A_L GPIOE->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_1 // PE.01
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBX9E)
|
#if defined(PCBX9E)
|
||||||
|
@ -192,6 +228,11 @@
|
||||||
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_15 // PE.15
|
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_15 // PE.15
|
||||||
#define SWITCHES_GPIO_REG_B_H GPIOA->IDR
|
#define SWITCHES_GPIO_REG_B_H GPIOA->IDR
|
||||||
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_5 // PA.05
|
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_5 // PA.05
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define SWITCHES_GPIO_REG_B_L GPIOB->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_4 // PB.04
|
||||||
|
#define SWITCHES_GPIO_REG_B_H GPIOB->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_5 // PB.05
|
||||||
#else
|
#else
|
||||||
#define SWITCHES_GPIO_REG_B_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_B_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_1 // PE.01
|
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_1 // PE.01
|
||||||
|
@ -214,6 +255,11 @@
|
||||||
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_11 // PD.11
|
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_11 // PD.11
|
||||||
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_0 // PE.00
|
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_0 // PE.00
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define SWITCHES_GPIO_REG_C_L GPIOE->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_2 // PE.02
|
||||||
|
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_3 // PE.03
|
||||||
#else
|
#else
|
||||||
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_15 // PE.15
|
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_15 // PE.15
|
||||||
|
@ -241,6 +287,9 @@
|
||||||
#define SWITCHES_GPIO_PIN_D_L GPIO_Pin_1 // PE.01
|
#define SWITCHES_GPIO_PIN_D_L GPIO_Pin_1 // PE.01
|
||||||
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_2 // PE.02
|
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_2 // PE.02
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define SWITCHES_GPIO_REG_D GPIOC->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_D GPIO_Pin_13 // PC.13
|
||||||
#else
|
#else
|
||||||
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_7 // PE.07
|
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_7 // PE.07
|
||||||
|
@ -256,7 +305,7 @@
|
||||||
#elif defined(PCBXLITES)
|
#elif defined(PCBXLITES)
|
||||||
#define SWITCHES_GPIO_REG_E GPIOE->IDR
|
#define SWITCHES_GPIO_REG_E GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_E GPIO_Pin_5 // PE.05
|
#define SWITCHES_GPIO_PIN_E GPIO_Pin_5 // PE.05
|
||||||
#elif defined(PCBX7) || defined(PCBXLITE)
|
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||||
// no SWE
|
// no SWE
|
||||||
#else
|
#else
|
||||||
#define SWITCHES_GPIO_REG_E_H GPIOB->IDR
|
#define SWITCHES_GPIO_REG_E_H GPIOB->IDR
|
||||||
|
@ -276,6 +325,9 @@
|
||||||
#elif defined(PCBX7)
|
#elif defined(PCBX7)
|
||||||
#define SWITCHES_GPIO_REG_F GPIOE->IDR
|
#define SWITCHES_GPIO_REG_F GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
|
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define SWITCHES_GPIO_REG_F GPIOA->IDR
|
||||||
|
#define SWITCHES_GPIO_PIN_F GPIO_Pin_5 // PA.05
|
||||||
#else
|
#else
|
||||||
#define SWITCHES_GPIO_REG_F GPIOE->IDR
|
#define SWITCHES_GPIO_REG_F GPIOE->IDR
|
||||||
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
|
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
|
||||||
|
@ -383,11 +435,18 @@
|
||||||
#define KEYS_GPIOC_PINS (GPIO_Pin_4 | GPIO_Pin_5)
|
#define KEYS_GPIOC_PINS (GPIO_Pin_4 | GPIO_Pin_5)
|
||||||
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14)
|
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14)
|
||||||
#elif defined(PCBX7)
|
#elif defined(PCBX7)
|
||||||
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB|RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE)
|
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
||||||
#define KEYS_GPIOA_PINS SWITCHES_GPIO_PIN_B_H
|
#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)
|
#define KEYS_GPIOC_PINS (TRIMS_GPIO_PIN_LHR | TRIMS_GPIO_PIN_RVD | TRIMS_GPIO_PIN_RVU)
|
||||||
#define KEYS_GPIOD_PINS (TRIMS_GPIO_PIN_LHL | KEYS_GPIO_PIN_MENU | KEYS_GPIO_PIN_EXIT | KEYS_GPIO_PIN_PAGE | SWITCHES_GPIO_PIN_C_L | SWITCHES_GPIO_PIN_H)
|
#define KEYS_GPIOD_PINS (TRIMS_GPIO_PIN_LHL | KEYS_GPIO_PIN_MENU | KEYS_GPIO_PIN_EXIT | KEYS_GPIO_PIN_PAGE | SWITCHES_GPIO_PIN_C_L | SWITCHES_GPIO_PIN_H)
|
||||||
#define KEYS_GPIOE_PINS (ENC_GPIO_PIN_A | ENC_GPIO_PIN_B | KEYS_GPIO_PIN_ENTER | TRIMS_GPIO_PIN_RHR | TRIMS_GPIO_PIN_RHL | TRIMS_GPIO_PIN_LVD | TRIMS_GPIO_PIN_LVU | SWITCHES_GPIO_PIN_C_H | SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_D_H | SWITCHES_GPIO_PIN_B_L | SWITCHES_GPIO_PIN_A_L | SWITCHES_GPIO_PIN_A_H | SWITCHES_GPIO_PIN_F)
|
#define KEYS_GPIOE_PINS (ENC_GPIO_PIN_A | ENC_GPIO_PIN_B | KEYS_GPIO_PIN_ENTER | TRIMS_GPIO_PIN_RHR | TRIMS_GPIO_PIN_RHL | TRIMS_GPIO_PIN_LVD | TRIMS_GPIO_PIN_LVU | SWITCHES_GPIO_PIN_C_H | SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_D_H | SWITCHES_GPIO_PIN_B_L | SWITCHES_GPIO_PIN_A_L | SWITCHES_GPIO_PIN_A_H | SWITCHES_GPIO_PIN_F)
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
||||||
|
#define KEYS_GPIOA_PINS (GPIO_Pin_5)
|
||||||
|
#define KEYS_GPIOB_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5)
|
||||||
|
#define KEYS_GPIOC_PINS (GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_13)
|
||||||
|
#define KEYS_GPIOD_PINS (GPIO_Pin_8 | GPIO_Pin_9)
|
||||||
|
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_11 | GPIO_Pin_13 | GPIO_Pin_14)
|
||||||
#else
|
#else
|
||||||
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOB|RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE)
|
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOB|RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE)
|
||||||
#define KEYS_GPIOA_PINS (SWITCHES_GPIO_PIN_C_L)
|
#define KEYS_GPIOA_PINS (SWITCHES_GPIO_PIN_C_L)
|
||||||
|
@ -519,6 +578,26 @@
|
||||||
#define ADC_CHANNEL_POT1 ADC_Channel_6
|
#define ADC_CHANNEL_POT1 ADC_Channel_6
|
||||||
#define ADC_CHANNEL_POT2 ADC_Channel_8
|
#define ADC_CHANNEL_POT2 ADC_Channel_8
|
||||||
#define ADC_CHANNEL_BATT ADC_Channel_10
|
#define ADC_CHANNEL_BATT ADC_Channel_10
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define ADC_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
||||||
|
#define ADC_RCC_APB1Periph 0
|
||||||
|
#define ADC_RCC_APB2Periph RCC_APB2Periph_ADC1
|
||||||
|
#define ADC_GPIO_PIN_STICK_RV GPIO_Pin_0 // PA.00
|
||||||
|
#define ADC_GPIO_PIN_STICK_RH GPIO_Pin_1 // PA.01
|
||||||
|
#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_RV ADC_Channel_0 // ADC1_IN0
|
||||||
|
#define ADC_CHANNEL_STICK_RH ADC_Channel_1 // ADC1_IN1
|
||||||
|
#define ADC_CHANNEL_STICK_LV ADC_Channel_2 // ADC1_IN2
|
||||||
|
#define ADC_CHANNEL_STICK_LH ADC_Channel_3 // ADC1_IN3
|
||||||
|
#define ADC_GPIO_PIN_POT1 GPIO_Pin_1 // PC.01 OK
|
||||||
|
#define ADC_GPIO_PIN_POT2 GPIO_Pin_0 // PB.00
|
||||||
|
#define ADC_GPIO_PIN_BATT GPIO_Pin_0 // PC.00 OK
|
||||||
|
#define ADC_GPIOA_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3)
|
||||||
|
#define ADC_GPIOC_PINS (GPIO_Pin_0 | GPIO_Pin_1)
|
||||||
|
#define ADC_CHANNEL_POT1 ADC_Channel_6
|
||||||
|
#define ADC_CHANNEL_POT2 ADC_Channel_8
|
||||||
|
#define ADC_CHANNEL_BATT ADC_Channel_10
|
||||||
#else
|
#else
|
||||||
#define ADC_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
#define ADC_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
||||||
#define ADC_RCC_APB1Periph 0
|
#define ADC_RCC_APB1Periph 0
|
||||||
|
@ -548,9 +627,14 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// PWR and LED driver
|
// PWR and LED driver
|
||||||
#define PWR_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
#define PWR_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
||||||
|
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBX3)
|
||||||
|
#define PWR_SWITCH_GPIO GPIOA
|
||||||
|
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_7 // PA.07
|
||||||
|
#define PWR_ON_GPIO GPIOA
|
||||||
|
#define PWR_ON_GPIO_PIN GPIO_Pin_6 // PA.06
|
||||||
|
#elif defined(PCBXLITE)
|
||||||
#define PWR_SWITCH_GPIO GPIOA
|
#define PWR_SWITCH_GPIO GPIOA
|
||||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_7 // PA.07
|
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_7 // PA.07
|
||||||
#define PWR_ON_GPIO GPIOE
|
#define PWR_ON_GPIO GPIOE
|
||||||
|
@ -561,8 +645,6 @@
|
||||||
#define PWR_ON_GPIO GPIOD
|
#define PWR_ON_GPIO GPIOD
|
||||||
#define PWR_ON_GPIO_PIN GPIO_Pin_0 // PD.00
|
#define PWR_ON_GPIO_PIN GPIO_Pin_0 // PD.00
|
||||||
#endif
|
#endif
|
||||||
#define PWR_ON_GPIO_MODER GPIO_MODER_MODER0
|
|
||||||
#define PWR_ON_GPIO_MODER_OUT GPIO_MODER_MODER0_0
|
|
||||||
|
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBXLITE)
|
||||||
#define STATUS_LEDS
|
#define STATUS_LEDS
|
||||||
|
@ -584,6 +666,16 @@
|
||||||
#define LED_RED_GPIO_PIN GPIO_Pin_5 // PC.05
|
#define LED_RED_GPIO_PIN GPIO_Pin_5 // PC.05
|
||||||
#define LED_BLUE_GPIO GPIOB
|
#define LED_BLUE_GPIO GPIOB
|
||||||
#define LED_BLUE_GPIO_PIN GPIO_Pin_1 // PB.01
|
#define LED_BLUE_GPIO_PIN GPIO_Pin_1 // PB.01
|
||||||
|
#elif defined(PCBX3)
|
||||||
|
#define STATUS_LEDS
|
||||||
|
#define GPIO_LED_GPIO_ON GPIO_SetBits
|
||||||
|
#define GPIO_LED_GPIO_OFF GPIO_ResetBits
|
||||||
|
#define LED_GREEN_GPIO GPIOE
|
||||||
|
#define LED_GREEN_GPIO_PIN GPIO_Pin_5 // PE.05
|
||||||
|
#define LED_RED_GPIO GPIOE
|
||||||
|
#define LED_RED_GPIO_PIN GPIO_Pin_4 // PE.04
|
||||||
|
#define LED_BLUE_GPIO GPIOE
|
||||||
|
#define LED_BLUE_GPIO_PIN GPIO_Pin_6 // PE.06
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Internal Module
|
// Internal Module
|
||||||
|
@ -740,7 +832,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Serial Port
|
// Serial Port
|
||||||
#if defined(PCBX7) || defined(PCBXLITE)
|
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||||
#define SERIAL_RCC_AHB1Periph 0
|
#define SERIAL_RCC_AHB1Periph 0
|
||||||
#define SERIAL_RCC_APB1Periph 0
|
#define SERIAL_RCC_APB1Periph 0
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -207,13 +207,17 @@ uint32_t switchState(uint8_t index)
|
||||||
ADD_3POS_CASE(A, 0);
|
ADD_3POS_CASE(A, 0);
|
||||||
ADD_3POS_CASE(B, 1);
|
ADD_3POS_CASE(B, 1);
|
||||||
ADD_3POS_CASE(C, 2);
|
ADD_3POS_CASE(C, 2);
|
||||||
|
#if defined(PCBX3)
|
||||||
|
ADD_2POS_CASE(D);
|
||||||
|
#else
|
||||||
ADD_3POS_CASE(D, 3);
|
ADD_3POS_CASE(D, 3);
|
||||||
|
#endif
|
||||||
#if defined(PCBXLITES)
|
#if defined(PCBXLITES)
|
||||||
ADD_2POS_CASE(E);
|
ADD_2POS_CASE(E);
|
||||||
ADD_2POS_CASE(F);
|
ADD_2POS_CASE(F);
|
||||||
// no SWF, SWG and SWH on XLITE
|
// no SWF, SWG and SWH on XLITE
|
||||||
#elif defined(PCBXLITE)
|
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||||
// no SWF, SWG and SWH on XLITE
|
// no SWE, SWF, SWG and SWH on X3 and XLITE
|
||||||
#elif defined(PCBX7)
|
#elif defined(PCBX7)
|
||||||
ADD_2POS_CASE(F);
|
ADD_2POS_CASE(F);
|
||||||
ADD_2POS_CASE(H);
|
ADD_2POS_CASE(H);
|
||||||
|
|
|
@ -264,7 +264,7 @@ int sbusGetByte(uint8_t * byte)
|
||||||
switch (currentTrainerMode) {
|
switch (currentTrainerMode) {
|
||||||
case TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE:
|
case TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE:
|
||||||
return heartbeatFifo.pop(*byte);
|
return heartbeatFifo.pop(*byte);
|
||||||
#if !defined(PCBX7) && !defined(PCBX9E)
|
#if !defined(PCBX7) && !defined(PCBX9E) && !defined(PCBX3)
|
||||||
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
|
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
|
||||||
return serial2RxFifo.pop(*byte);
|
return serial2RxFifo.pop(*byte);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
#ifndef _CROSSFIRE_H_
|
#ifndef _CROSSFIRE_H_
|
||||||
#define _CROSSFIRE_H_
|
#define _CROSSFIRE_H_
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include "dataconstants.h"
|
||||||
|
|
||||||
// Device address
|
// Device address
|
||||||
#define BROADCAST_ADDRESS 0x00
|
#define BROADCAST_ADDRESS 0x00
|
||||||
#define RADIO_ADDRESS 0xEA
|
#define RADIO_ADDRESS 0xEA
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue