refactoring
This commit is contained in:
parent
7178491200
commit
048e910957
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue