diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index b63c04b8b5..d949586ab1 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -7,7 +7,6 @@ #include "global.h" #include "rusefi_enums.h" -#include "drivers/gpio/gpio_ext.h" const char *getEngine_type_e(engine_type_e value){ switch(value) { case ACURA_RSX: @@ -806,11 +805,6 @@ case GPIOH_8: return "GPIOH_8"; case GPIOH_9: return "GPIOH_9"; -#if (BOARD_EXT_GPIOCHIPS > 0) - default: - /* gpichips */ - return gpiochips_getPinName(value); -#endif } return NULL; } diff --git a/firmware/controllers/algo/auto_generated_enums.h b/firmware/controllers/algo/auto_generated_enums.h index 973cc40c8b..d7890b39fe 100644 --- a/firmware/controllers/algo/auto_generated_enums.h +++ b/firmware/controllers/algo/auto_generated_enums.h @@ -1,6 +1,6 @@ // auto-generated from.\controllers/algo/rusefi_enums.h // by enum2string.jar tool -// on Thu Nov 22 18:48:26 EST 2018 +// on Wed Apr 10 18:05:03 EDT 2019 // see also gen_config_and_enums.bat @@ -20,12 +20,14 @@ const char *getDisplay_mode_e(display_mode_e value); const char *getLog_format_e(log_format_e value); const char *getIdle_mode_e(idle_mode_e value); const char *getPin_output_mode_e(pin_output_mode_e value); +const char *getPin_mode_e(pin_mode_e value); const char *getPin_input_mode_e(pin_input_mode_e value); const char *getOperation_mode_e(operation_mode_e value); const char *getIgnition_mode_e(ignition_mode_e value); const char *getInjection_mode_e(injection_mode_e value); const char *getCranking_ignition_mode_e(cranking_ignition_mode_e value); const char *getUart_device_e(uart_device_e value); +const char *getSpi_speed_e(spi_speed_e value); const char *getSpi_device_e(spi_device_e value); const char *getAdc_channel_e(adc_channel_e value); const char *getMass_storage_e(mass_storage_e value); diff --git a/firmware/hw_layer/io_pins.cpp b/firmware/hw_layer/io_pins.cpp index 2d1e4d1420..a817d8f432 100644 --- a/firmware/hw_layer/io_pins.cpp +++ b/firmware/hw_layer/io_pins.cpp @@ -52,6 +52,18 @@ bool efiReadPin(brain_pin_e pin) { return false; } +static const char *getBrain_pin_eExt(brain_pin_e value){ + const char * result = getBrain_pin_e(value); + if (result != NULL) + return result; +#if (BOARD_EXT_GPIOCHIPS > 0) + /* gpichips */ + return gpiochips_getPinName(value); +#else + return NULL; +#endif +} + /** * This method would set an error condition if pin is already used */ @@ -62,7 +74,7 @@ void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode) //efiAssertVoid(OBD_PCM_Processor_Fault, pin != EFI_ERROR_CODE, "pin_error"); #if ! EFI_BOOTLOADER - scheduleMsg(&logger, "%s on %s", msg, getBrain_pin_e(brainPin)); + scheduleMsg(&logger, "%s on %s", msg, getBrain_pin_eExt(brainPin)); #endif wasUsed = brain_pin_markUsed(brainPin, msg);