From 30a69000562fda260f742c134501f006c0ec8ca8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 10 Jul 2012 17:12:43 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4453 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../processors/hal/stm32f4xx/templates/hal_cfg.c.ftl | 3 ++- .../processors/hal/stm32f4xx/templates/hal_cfg.h.ftl | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl index 922e614d8..3f70e952d 100644 --- a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl +++ b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl @@ -21,7 +21,8 @@ [@pp.dropOutputFile /] [#import "/@lib/libutils.ftl" as utils /] [#import "/@lib/liblicense.ftl" as license /] -[@pp.changeOutputFile name=doc1.configuration.@name[0] + ".c" /] +[#assign fname = doc1.configuration.@name[0] /] +[@pp.changeOutputFile name = fname + ".c" /] /* [@license.EmitLicenseAsText /] */ diff --git a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl index d4c05c1cf..cfdf73b45 100644 --- a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl +++ b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl @@ -21,20 +21,21 @@ [@pp.dropOutputFile /] [#import "/@lib/libutils.ftl" as utils /] [#import "/@lib/liblicense.ftl" as license /] -[@pp.changeOutputFile name=doc1.configuration.@name[0] + ".h" /] +[#assign fname = doc1.configuration.@name[0] /] +[@pp.changeOutputFile name = fname + ".h" /] /* [@license.EmitLicenseAsText /] */ -#ifndef _x_H_ -#define _x_H_ +#ifndef _${fname?upper_case}_H_ +#define _${fname?upper_case}_H_ #ifdef __cplusplus extern "C" { #endif - void boardInit(void); + #ifdef __cplusplus } #endif -#endif /* _x_H_ */ +#endif /* _${fname?upper_case}_H_ */