diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index ee87bae8e0..534ee7fc5a 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -412,7 +412,7 @@ static void printTPSInfo(void) { return; } - stm32_gpio_t* port = getAdcChannelPort(engineConfiguration->tpsAdcChannel); + ioportid_t port = getAdcChannelPort(engineConfiguration->tpsAdcChannel); int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel); scheduleMsg(&logger, "tps min %d/max %d v=%f @%s%d", engineConfiguration->tpsMin, engineConfiguration->tpsMax, diff --git a/firmware/global.h b/firmware/global.h index ffb915f530..0e0c0a635a 100644 --- a/firmware/global.h +++ b/firmware/global.h @@ -57,13 +57,10 @@ typedef unsigned int time_t; typedef VirtualTimer virtual_timer_t; typedef EventListener event_listener_t; typedef Thread thread_t; -typedef GPIO_TypeDef stm32_gpio_t; - #define THD_WORKING_AREA WORKING_AREA #define THD_FUNCTION(tname, arg) void tname(void *arg) - #if EFI_PROD_CODE /** diff --git a/firmware/hw_layer/adc_inputs.cpp b/firmware/hw_layer/adc_inputs.cpp index 2818c869f9..2c1282de8a 100644 --- a/firmware/hw_layer/adc_inputs.cpp +++ b/firmware/hw_layer/adc_inputs.cpp @@ -439,7 +439,7 @@ static void printFullAdcReport(void) { appendMsgPrefix(&logger); adc_channel_e hwIndex = slowAdc.getAdcHardwareIndexByInternalIndex(index); - stm32_gpio_t* port = getAdcChannelPort(hwIndex); + ioportid_t port = getAdcChannelPort(hwIndex); int pin = getAdcChannelPin(hwIndex); int adcValue = slowAdc.getAdcValueByIndex(index); diff --git a/firmware/hw_layer/pin_repository.cpp b/firmware/hw_layer/pin_repository.cpp index de906d8170..f5d01aae3b 100644 --- a/firmware/hw_layer/pin_repository.cpp +++ b/firmware/hw_layer/pin_repository.cpp @@ -23,7 +23,7 @@ static int initialized = FALSE; static LoggingWithStorage logger("pin repos"); static int totalPinsUsed = 0; -static stm32_gpio_t* ports[7] = {GPIOA, +static ioportid_t ports[7] = {GPIOA, GPIOB, GPIOC, GPIOD, @@ -35,7 +35,7 @@ static stm32_gpio_t* ports[7] = {GPIOA, /** * @deprecated - use hwPortname() instead */ -const char *portname(stm32_gpio_t* GPIOx) { +const char *portname(ioportid_t GPIOx) { if (GPIOx == GPIOA) return "PA"; if (GPIOx == GPIOB) @@ -55,7 +55,7 @@ const char *portname(stm32_gpio_t* GPIOx) { return "unknown"; } -static int getPortIndex(stm32_gpio_t* port) { +static int getPortIndex(ioportid_t port) { if (port == GPIOA) return 0; if (port == GPIOB) @@ -83,7 +83,7 @@ static void reportPins(void) { const char *name = PIN_USED[i]; int portIndex = i / PORT_SIZE; int pin = i % PORT_SIZE; - stm32_gpio_t* port = ports[portIndex]; + ioportid_t port = ports[portIndex]; if (name != NULL) { scheduleMsg(&logger, "pin %s%d: %s", portname(port), pin, name); } @@ -125,7 +125,7 @@ const char *hwPortname(brain_pin_e brainPin) { if (brainPin == GPIO_INVALID) { return "INVALID"; } - stm32_gpio_t *hwPort = getHwPort(brainPin); + ioportid_t hwPort = getHwPort(brainPin); if (hwPort == GPIO_NULL) { return "NONE"; } diff --git a/firmware/hw_layer/pin_repository.h b/firmware/hw_layer/pin_repository.h index b24b2ff157..c5e697f58c 100644 --- a/firmware/hw_layer/pin_repository.h +++ b/firmware/hw_layer/pin_repository.h @@ -18,7 +18,7 @@ #ifdef __cplusplus #include "efiGpio.h" // does not exactly belong here, but that works better for tests -void outputPinRegister(const char *msg, OutputPin *output, stm32_gpio_t *port, uint32_t pin); +void outputPinRegister(const char *msg, OutputPin *output, ioportid_t port, uint32_t pin); #endif /* __cplusplus */ #define PORT_SIZE 16 @@ -29,12 +29,12 @@ void mySetPadMode(const char *msg, ioportid_t port, ioportmask_t pin, iomode_t m const char *hwPortname(brain_pin_e brainPin); const char * getPinFunction(brain_input_pin_e brainPin); void mySetPadMode2(const char *msg, brain_pin_e pin, iomode_t mode); -const char *portname(stm32_gpio_t* GPIOx); +const char *portname(ioportid_t GPIOx); void unmarkPin(brain_pin_e brainPin); iomode_t getInputMode(pin_input_mode_e mode); void efiIcuStart(ICUDriver *icup, const ICUConfig *config); ioportmask_t getHwPin(brain_pin_e brainPin); -stm32_gpio_t * getHwPort(brain_pin_e brainPin); +ioportid_t getHwPort(brain_pin_e brainPin); #endif /* PIN_REPOSITORY_H_ */ diff --git a/firmware/svnversion.h b/firmware/svnversion.h index c0b63328c5..0b24607d62 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Sun Jan 31 22:35:40 EST 2016 +// Wed Feb 03 18:38:35 EST 2016 #ifndef VCS_VERSION -#define VCS_VERSION "9445" +#define VCS_VERSION "9469" #endif