Split LED_DRIVER_STRESS_TEST as I2C_WATCHDOG and LED_DRIVER_FORCE_UPDATE
This commit is contained in:
+2
-1
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
// Macros:
|
// 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 FIXED_BUSPAL_BOOTLOADER 1 // Used to mark the fixed BusPal bootloader. Macro usage can be removed in the future.
|
||||||
// #define FORCE_BUSPAL 1
|
// #define FORCE_BUSPAL 1
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ void InitPeripherals(void)
|
|||||||
InitI2c();
|
InitI2c();
|
||||||
InitTestLed();
|
InitTestLed();
|
||||||
LedPwm_Init();
|
LedPwm_Init();
|
||||||
#ifndef LED_DRIVER_STRESS_TEST
|
#ifdef I2C_WATCHDOG
|
||||||
InitI2cWatchdog();
|
InitI2cWatchdog();
|
||||||
#endif
|
#endif
|
||||||
EEPROM_Init();
|
EEPROM_Init();
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ void LedSlaveDriver_Update(uint8_t ledDriverId) {
|
|||||||
*ledIndex += chunkSize;
|
*ledIndex += chunkSize;
|
||||||
if (*ledIndex >= LED_DRIVER_LED_COUNT) {
|
if (*ledIndex >= LED_DRIVER_LED_COUNT) {
|
||||||
*ledIndex = 0;
|
*ledIndex = 0;
|
||||||
#ifndef LED_DRIVER_STRESS_TEST
|
#ifndef LED_DRIVER_FORCE_UPDATE
|
||||||
memcpy(currentLedDriverState->targetLedValues, currentLedDriverState->sourceLedValues, LED_DRIVER_LED_COUNT);
|
memcpy(currentLedDriverState->targetLedValues, currentLedDriverState->sourceLedValues, LED_DRIVER_LED_COUNT);
|
||||||
*ledDriverPhase = LedDriverPhase_Initialized;
|
*ledDriverPhase = LedDriverPhase_Initialized;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user