-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
factor out enums in a separate header
- Loading branch information
Showing
6 changed files
with
69 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
typedef enum | ||
{ | ||
AVLOS_RET_NOACTION, | ||
AVLOS_RET_READ = 1, | ||
AVLOS_RET_WRITE = 2, | ||
AVLOS_RET_CALL = 3 | ||
} Avlos_Return; | ||
|
||
typedef enum | ||
{ | ||
AVLOS_CMD_WRITE, | ||
AVLOS_CMD_READ = 1 | ||
} Avlos_Command; | ||
|
||
{%- for ep in instance | bitmask_eps %} | ||
|
||
typedef enum | ||
{ | ||
{%- set comma = joiner(", ") %} | ||
{{ ep.full_name | replace(".", "_") | upper }}_NONE = 0, | ||
{%- for flag in ep.bitmask %}{{ comma() }} | ||
{{ ep.full_name | replace(".", "_") | upper }}_{{ flag.name }} = (1 << {{ loop.index0 }}) | ||
{%- endfor %} | ||
} {{ ep.full_name | replace(".", "_") }}_flags; | ||
{%- endfor %} | ||
|
||
{%- for ep in instance | enum_eps %} | ||
|
||
typedef enum | ||
{ | ||
{%- set comma = joiner(", ") %} | ||
{%- for option in ep.options %}{{ comma() }} | ||
{{ ep.full_name | replace(".", "_") | upper }}_{{ option.name }} = {{ loop.index0 }} | ||
{%- endfor %} | ||
} {{ ep.full_name | replace(".", "_") }}_options; | ||
{%- endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters