NV14 implementation partially merged with actual Flysky version.

This commit is contained in:
Jakub
2020-01-05 15:48:13 +01:00
parent b12e55b2b7
commit fef09a5f74
55 changed files with 2945 additions and 1613 deletions
@@ -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;
}