diff options
-rw-r--r-- | tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl | 3 | ||||
-rw-r--r-- | tools/gencfg/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_ */
|