diff --git a/corsair/templates/c_header.j2 b/corsair/templates/c_header.j2 index bf493a5..ac35f80 100755 --- a/corsair/templates/c_header.j2 +++ b/corsair/templates/c_header.j2 @@ -62,8 +62,8 @@ typedef struct { {% for bf in reg %} {% if tmp.lsb != bf.lsb %} {{ data_t() }} :{{ bf.lsb }}; // reserved - {% set tmp.lsb = bf.lsb %} {% endif %} + {% set tmp.lsb = bf.lsb + bf.width %} {{ data_t() }} {{ bf.name.upper() }} : {{ bf.width }}; // {{ bf.description }} {% endfor %} } {{ module_prefix()|lower }}{{ reg.name.lower() }}_t; @@ -109,4 +109,4 @@ typedef struct { } #endif -#endif /* __{{ file_name.upper() }}_H */ \ No newline at end of file +#endif /* __{{ file_name.upper() }}_H */