1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +03:00

X-Lite bootloader

This commit is contained in:
Bertrand Songis 2018-04-04 16:01:15 +02:00
parent 1b005c83eb
commit fabee0e675

View file

@ -18,11 +18,14 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "stamp.h"
#include "boot.h"
#include "bin_files.h"
#if defined(PCBXLITE)
#define BOOTLOADER_KEYS 0x0f
#else
#define BOOTLOADER_KEYS 0x42
#endif
#define APP_START_ADDRESS (uint32_t)(FIRMWARE_ADDRESS + BOOTLOADER_SIZE)
#if defined(EEPROM)
@ -63,9 +66,6 @@ uint32_t eepromAddress = 0;
uint32_t eepromWritten = 0;
#endif
//TCHAR backupFilename[_MAX_LFN+1];
//uint32_t Master_frequency;
volatile uint8_t Tenms = 1;
FlashCheckRes Valid;
@ -171,8 +171,6 @@ int menuFlashFile(uint32_t index, event_t event)
return -1;
}
extern Key keys[];
static uint32_t PowerUpDelay;
void flashWriteBlock()
@ -228,7 +226,7 @@ int main()
}
// LHR & RHL trims not pressed simultanously
if (readTrims() != 0x42) {
if (readTrims() != BOOTLOADER_KEYS) {
// Start main application
jumpTo(APP_START_ADDRESS);
}