test_sequence.h.ftl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [#ftl]
  2. [#--
  3. ChibiOS/RT - Copyright (C) 2006..2018 Giovanni Di Sirio
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. --]
  14. [#import "/@ftllibs/libutils.ftl" as utils /]
  15. [@pp.dropOutputFile /]
  16. [#list xml.*.application.instances.instance as inst]
  17. [#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
  18. [#assign instance = inst /]
  19. [#break]
  20. [/#if]
  21. [/#list]
  22. [#assign conf = {"instance":instance} /]
  23. [#assign prefix_lower = conf.instance.global_data_and_code.code_prefix.value[0]?trim?lower_case /]
  24. [#assign prefix_upper =conf. instance.global_data_and_code.code_prefix.value[0]?trim?upper_case /]
  25. [#list conf.instance.sequences.sequence as sequence]
  26. [@pp.changeOutputFile name=prefix_lower+"test_sequence_" + (sequence_index + 1)?string("000") + ".h" /]
  27. [@utils.EmitIndentedCCode "" 2 conf.instance.description.copyright.value[0] /]
  28. /**
  29. * @file ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")}.h
  30. * @brief Test Sequence ${(sequence_index + 1)?string("000")} header.
  31. */
  32. #ifndef ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H
  33. #define ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H
  34. extern const testsequence_t ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")};
  35. #endif /* ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H */
  36. [/#list]