Add FORCE_BUSPAL

This commit is contained in:
László Monda
2017-08-06 17:37:49 +02:00
parent 68e2dab576
commit 48429f1efe
2 changed files with 7 additions and 0 deletions

View File

@@ -5,5 +5,6 @@
// #define LED_DRIVER_STRESS_TEST
#define FIXED_BUSPAL_BOOTLOADER 1 // Used to mark the fixed BusPal bootloader. Macro usage can be removed in the future.
// #define FORCE_BUSPAL 1
#endif

View File

@@ -1,3 +1,4 @@
#include "config.h"
#include "main.h"
#include "init_clock.h"
#include "init_peripherals.h"
@@ -65,6 +66,11 @@ void main() {
InitClock();
InitPeripherals();
#ifdef FORCE_BUSPAL
Wormhole.magicNumber = WORMHOLE_MAGIC_NUMBER;
Wormhole.enumerationMode = EnumerationMode_BusPal;
#endif
if (Wormhole.magicNumber == WORMHOLE_MAGIC_NUMBER && Wormhole.enumerationMode == EnumerationMode_BusPal) {
Wormhole.magicNumber = 0;
init_hardware();