refactoring

This commit is contained in:
rusefi 2020-06-21 15:40:59 -04:00
parent 7178491200
commit 048e910957
2 changed files with 7 additions and 7 deletions

View File

@ -20,13 +20,6 @@ typedef void (*CommandHandler)(char *);
#include "efifeatures.h"
#include "datalogging.h"
#ifdef CONFIG_RESET_SWITCH_PORT
// this pin is not configurable at runtime so that we have a reliable way to reset configuration
#define SHOULD_INGORE_FLASH() (palReadPad(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN) == 0)
#else
#define SHOULD_INGORE_FLASH() (false)
#endif
BaseChannel * getConsoleChannel(void);
void consolePutChar(int x);

View File

@ -440,6 +440,13 @@ void initHardware(Logging *l) {
#if EFI_INTERNAL_FLASH
#ifdef CONFIG_RESET_SWITCH_PORT
// this pin is not configurable at runtime so that we have a reliable way to reset configuration
#define SHOULD_INGORE_FLASH() (palReadPad(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN) == 0)
#else
#define SHOULD_INGORE_FLASH() (false)
#endif // CONFIG_RESET_SWITCH_PORT
#ifdef CONFIG_RESET_SWITCH_PORT
palSetPadMode(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
#endif /* CONFIG_RESET_SWITCH_PORT */