From 0444659ac5df154d73cfbdbf413f4b6ff26b8ce7 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 31 Oct 2015 21:01:32 -0400 Subject: [PATCH] auto-sync --- firmware/hw_layer/io_pins.cpp | 3 +++ firmware/hw_layer/stm32f4/mpu_util.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/hw_layer/io_pins.cpp b/firmware/hw_layer/io_pins.cpp index f87d443a1c..10854923f2 100644 --- a/firmware/hw_layer/io_pins.cpp +++ b/firmware/hw_layer/io_pins.cpp @@ -38,6 +38,9 @@ static GPIO_TypeDef *PORTS[] = { GPIOA, GPIOB, GPIOC, GPIOD, GPIOF}; pin_output_mode_e DEFAULT_OUTPUT = OM_DEFAULT; pin_output_mode_e OPENDRAIN_OUTPUT = OM_OPENDRAIN; +/** + * This method is used for digital GPIO pins only, for peripheral pins see mySetPadMode + */ static void outputPinRegisterExt(const char *msg, OutputPin *output, GPIO_TypeDef *port, uint32_t pin, pin_output_mode_e *outputMode) { #if EFI_GPIO diff --git a/firmware/hw_layer/stm32f4/mpu_util.cpp b/firmware/hw_layer/stm32f4/mpu_util.cpp index 85eb4a27c3..db93e0b0e9 100644 --- a/firmware/hw_layer/stm32f4/mpu_util.cpp +++ b/firmware/hw_layer/stm32f4/mpu_util.cpp @@ -323,7 +323,7 @@ void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin) { ioportmask_t pin = getHwPin(csPin); spiConfig->ssport = port; spiConfig->sspad = pin; - mySetPadMode("chip select", port, pin, PAL_STM32_MODE_OUTPUT); + mySetPadMode2("chip select", csPin, PAL_STM32_MODE_OUTPUT); } #endif