-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UR] Allow for extending enums #626
Conversation
87c1f10
to
a008467
Compare
Once the design is done it should be documented in |
d326466
to
125b996
Compare
49eeef5
to
a5a4a18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - minor comments
6c82629
to
dd59867
Compare
Another idea I had. Instead of requiring every extended enum to provide a unique value - we could just specify a starting range. type: 'enum'
name: $x_device_info_t
desc: "a desc"
extended: true
offset: "0x1000"
etors:
- name: "ETOR_1"
desc: "desc"
- name: "ETOR_2"
desc: "desc 2" So enums will automatically be allocated sequentially |
Do the specific values matter? If not, would it be possible to, for example, automatically allocate ranges for new extensions from the top of the enum's range? e.g.,
|
I don't think so, but I think that assigning values could be problematic. Possibly adding a new experimental feature might change the order in which they are allocated and modify the range. |
dd59867
to
0aed938
Compare
I've decided not to introduce |
Method to extend existing enums:
enum
can now include andextend
field to indicate that this extends an existing enumCloses #606