Split LED_DRIVER_STRESS_TEST as I2C_WATCHDOG and LED_DRIVER_FORCE_UPDATE

This commit is contained in:
László Monda
2017-08-19 12:31:49 +02:00
parent 58f36cf6c3
commit 992fea28ad
3 changed files with 4 additions and 3 deletions

View File

@@ -3,7 +3,8 @@
// Macros:
// #define LED_DRIVER_STRESS_TEST
#define I2C_WATCHDOG 1
#define LED_DRIVER_STRESS_TEST 1
#define FIXED_BUSPAL_BOOTLOADER 1 // Used to mark the fixed BusPal bootloader. Macro usage can be removed in the future.
// #define FORCE_BUSPAL 1

View File

@@ -60,7 +60,7 @@ void InitPeripherals(void)
InitI2c();
InitTestLed();
LedPwm_Init();
#ifndef LED_DRIVER_STRESS_TEST
#ifdef I2C_WATCHDOG
InitI2cWatchdog();
#endif
EEPROM_Init();

View File

@@ -102,7 +102,7 @@ void LedSlaveDriver_Update(uint8_t ledDriverId) {
*ledIndex += chunkSize;
if (*ledIndex >= LED_DRIVER_LED_COUNT) {
*ledIndex = 0;
#ifndef LED_DRIVER_STRESS_TEST
#ifndef LED_DRIVER_FORCE_UPDATE
memcpy(currentLedDriverState->targetLedValues, currentLedDriverState->sourceLedValues, LED_DRIVER_LED_COUNT);
*ledDriverPhase = LedDriverPhase_Initialized;
#endif