_CCodeGenerator.generate_bitfield_header(): use a Jinja 2 template
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Aug 2020 15:35:47 +0000 (11:35 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Aug 2020 15:44:15 +0000 (11:44 -0400)
commit75bae33c09eea7124ec1275ed47787299d907539
tree3c26925ce4ade482d70fc7168f0a7d665812ef80
parent8c7c6ed2a19e78b448a346fe5e4d41169310617b
_CCodeGenerator.generate_bitfield_header(): use a Jinja 2 template

Benefits:

* `\` instead of `\\` in the template.

* Jinja 2 variables instead of `$PREFIX`, `$prefix$`, etc. which makes
  it possible to have template syntax highlighting for example.

* `LITTLE_ENDIAN` or `BIG_ENDIAN` generated by the template using the
  barectf configuration.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/gen.py
barectf/templates.py
barectf/templates/bitfield.h.j2 [new file with mode: 0644]
This page took 0.023236 seconds and 4 git commands to generate.