Skip to content

Commit

Permalink
convert to static variable
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Feb 15, 2024
1 parent 51ba493 commit 3136357
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion avlos/templates/fw_endpoints.c.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

{% set comma = joiner(", ") %}
uint8_t (*avlos_endpoints[{{ instance | endpoints | length }}])(uint8_t * buffer, uint8_t * buffer_len, Avlos_Command cmd) = { {%- for attr in instance | endpoints %}{{ comma() }}&avlos_{{attr.full_name | replace(".", "_") }}{%- endfor %} };
uint32_t avlos_proto_hash = {{ instance.hash_uint32 }};

uint32_t _avlos_get_proto_hash(void)
{
Expand Down
2 changes: 1 addition & 1 deletion avlos/templates/fw_endpoints.h.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include {{ include | as_include }}
{%- endfor %}

extern uint32_t avlos_proto_hash;
staic const uint32_t avlos_proto_hash = {{ instance.hash_uint32 }};
extern uint8_t (*avlos_endpoints[{{ instance | endpoints | length }}])(uint8_t * buffer, uint8_t * buffer_len, Avlos_Command cmd);
extern uint32_t _avlos_get_proto_hash(void);

Expand Down

0 comments on commit 3136357

Please sign in to comment.