NV14 implementation partially merged with actual Flysky version.
This commit is contained in:
@@ -13,6 +13,8 @@ option(PPM "PPM TX Module" ON)
|
||||
option(DSM2 "DSM2 TX Module" ON)
|
||||
option(SBUS "SBUS TX Module" ON)
|
||||
option(CROSSFIRE "Crossfire TX Module" ON)
|
||||
option(AFHDS2 "Support for AFHDS2" OFF)
|
||||
option(AFHDS3 "Support for AFHDS3" OFF)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
|
||||
option(DEBUG_INTERRUPTS "Count interrupts" OFF)
|
||||
option(DEBUG_LATENCY "Debug latency" OFF)
|
||||
@@ -147,7 +149,18 @@ endif()
|
||||
|
||||
if(MULTIMODULE)
|
||||
add_definitions(-DMULTIMODULE)
|
||||
set(SRC ${SRC} pulses/multi.cpp telemetry/spektrum.cpp telemetry/flysky_ibus.cpp telemetry/hitec.cpp telemetry/hott.cpp telemetry/multi.cpp io/multi_firmware_update.cpp)
|
||||
set(SRC ${SRC} pulses/multi.cpp telemetry/spektrum.cpp telemetry/hitec.cpp telemetry/hott.cpp telemetry/multi.cpp io/multi_firmware_update.cpp)
|
||||
endif()
|
||||
if(MULTIMODULE OR AFHDS3)
|
||||
set(SRC ${SRC} telemetry/flysky_ibus.cpp)
|
||||
endif()
|
||||
if(AFHDS2)
|
||||
add_definitions(-DAFHDS2)
|
||||
set(SRC ${SRC} telemetry/flysky_nv14.cpp)
|
||||
endif()
|
||||
|
||||
if(AFHDS3)
|
||||
add_definitions(-DAFHDS3)
|
||||
endif()
|
||||
|
||||
if(CROSSFIRE)
|
||||
@@ -236,3 +249,17 @@ if(SBUS)
|
||||
sbus.cpp
|
||||
)
|
||||
endif()
|
||||
if(AFHDS2)
|
||||
set(PULSES_SRC
|
||||
${PULSES_SRC}
|
||||
afhds2.cpp
|
||||
flysky.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(AFHDS3)
|
||||
set(PULSES_SRC
|
||||
${PULSES_SRC}
|
||||
afhds3.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -102,7 +102,7 @@ if(PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT (PCB STREQUAL X10 OR PCB STREQUAL X12S))
|
||||
if(NOT (PCB STREQUAL X10 OR PCB STREQUAL X12S OR PCB STREQUAL NV14))
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../../../targets/${TARGET_DIR}/i2c_driver.cpp
|
||||
|
||||
@@ -516,6 +516,6 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
void *__dso_handle = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -167,11 +167,11 @@ uint32_t isFirmwareStart(const uint8_t * buffer)
|
||||
return 0;
|
||||
}
|
||||
// First ISR pointer in FLASH
|
||||
if ((block[1] & 0xFFF00000) != 0x08000000) {
|
||||
if ((block[1] & 0xFFC00000) != 0x08000000) {//for nv14 firmware may start up to 0x81F ....
|
||||
return 0;
|
||||
}
|
||||
// Second ISR pointer in FLASH
|
||||
if ((block[2] & 0xFFF00000) != 0x08000000) {
|
||||
if ((block[2] & 0xFFC00000) != 0x08000000) {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#define USBD_VID 0x0483
|
||||
|
||||
#define USBD_LANGID_STRING 0x409
|
||||
#define USBD_MANUFACTURER_STRING "FrSky"
|
||||
#define USBD_SERIALNUMBER_FS_STRING "00000000001B"
|
||||
|
||||
|
||||
@@ -216,8 +215,10 @@ uint8_t * USBD_USR_ProductStrDescriptor( uint8_t speed , uint16_t *length)
|
||||
* @param length : pointer to data length variable
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
static const char USBD_MANUFACTURER_STRING[] = { USB_MANUFACTURER };
|
||||
uint8_t * USBD_USR_ManufacturerStrDescriptor( uint8_t speed , uint16_t *length)
|
||||
{
|
||||
|
||||
USBD_GetString ((uint8_t*)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
|
||||
return USBD_StrDesc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user