From 7f96cf83f5bc9e2f4fcd1b9f060cffe8f4f326e8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 8 Jul 2012 13:32:14 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4438 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../boards/stm32f4xx/templates/board.h.ftl | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tools/gencfg') diff --git a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl index 9127e0a10..59790e41e 100644 --- a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl +++ b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl @@ -163,7 +163,7 @@ [/#if] [#assign mode = pin.@Mode[0] /] [#if mode == "Input"] - [#assign out = "PIN_MODE_INPUT(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_MODE_INPUT(" + port_name + "_" + name + ")" /] [#elseif mode == "Output"] [#assign out = "PIN_MODE_OUTPUT(" + port_name + "_" + pin_name + ")" /] [#elseif mode == "Alternate"] @@ -195,9 +195,9 @@ ${line + ")"} [/#if] [#assign type = pin.@Type[0] /] [#if type == "PushPull"] - [#assign out = "PIN_OTYPE_PUSHPULL(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OTYPE_PUSHPULL(" + port_name + "_" + name + ")" /] [#else] - [#assign out = "PIN_OTYPE_OPENDRAIN(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OTYPE_OPENDRAIN(" + port_name + "_" + name + ")" /] [/#if] [#if pinidx == 0] [#assign line = "#define VAL_" + port_name + "_OTYPER (" + out /] @@ -223,13 +223,13 @@ ${line + ")"} [/#if] [#assign speed = pin.@Speed[0] /] [#if speed == "Minimum"] - [#assign out = "PIN_OSPEED_2M(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OSPEED_2M(" + port_name + "_" + name + ")" /] [#elseif speed == "Low"] - [#assign out = "PIN_OSPEED_25M(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OSPEED_25M(" + port_name + "_" + name + ")" /] [#elseif speed == "High"] - [#assign out = "PIN_OSPEED_50M(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OSPEED_50M(" + port_name + "_" + name + ")" /] [#else] - [#assign out = "PIN_OSPEED_100M(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_OSPEED_100M(" + port_name + "_" + name + ")" /] [/#if] [#if pinidx == 0] [#assign line = "#define VAL_" + port_name + "_OSPEEDR (" + out /] @@ -255,11 +255,11 @@ ${line + ")"} [/#if] [#assign resistor = pin.@Resistor[0] /] [#if resistor == "Floating"] - [#assign out = "PIN_PUDR_FLOATING(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_PUDR_FLOATING(" + port_name + "_" + name + ")" /] [#elseif resistor == "PullUp"] - [#assign out = "PIN_PUDR_PULLUP(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_PUDR_PULLUP(" + port_name + "_" + name + ")" /] [#else] - [#assign out = "PIN_PUDR_PULLDOWN(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_PUDR_PULLDOWN(" + port_name + "_" + name + ")" /] [/#if] [#if pinidx == 0] [#assign line = "#define VAL_" + port_name + "_PUDR (" + out /] @@ -285,9 +285,9 @@ ${line + ")"} [/#if] [#assign level = pin.@Level[0] /] [#if level == "Low"] - [#assign out = "PIN_ODR_LOW(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_ODR_LOW(" + port_name + "_" + name + ")" /] [#else] - [#assign out = "PIN_ODR_HIGH(" + port_name + "_" + pin_name + ")" /] + [#assign out = "PIN_ODR_HIGH(" + port_name + "_" + name + ")" /] [/#if] [#if pinidx == 0] [#assign line = "#define VAL_" + port_name + "_ODR (" + out /] @@ -312,7 +312,7 @@ ${line + ")"} [#assign name = pin_name /] [/#if] [#assign alternate = pin.@Alternate[0]?trim /] - [#assign out = "PIN_AFIO_AF(" + port_name + "_" + pin_name + ", " + alternate + ")" /] + [#assign out = "PIN_AFIO_AF(" + port_name + "_" + name + ", " + alternate + ")" /] [#if pinidx == 0] [#assign line = "#define VAL_" + port_name + "_AFRL (" + out /] [#elseif pinidx == 8] -- cgit v1.2.3