Skip to content
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

[svd_rs, svd_parser] Differentiation between Arrays and Lists #269

Open
Jatsekku opened this issue Aug 2, 2024 · 0 comments
Open

[svd_rs, svd_parser] Differentiation between Arrays and Lists #269

Jatsekku opened this issue Aug 2, 2024 · 0 comments

Comments

@Jatsekku
Copy link

Jatsekku commented Aug 2, 2024

According to documentation, there are actually two sequential types for some of child elements, which can be created by using placeholder:
[%s] - for arrays, in such case <dimIndex></dimIndex> should not be used.
%s - for lists, in that case <dimIndex></dimIndex> can be used.

Peripherals - for some reason they advise to not create peripheral list, only arrays:

dimIndex Do not define on peripheral level. By default, is an integer value starting at 0.

name The string identifies the peripheral. Peripheral names are required to be unique for a device. The name needs to be an ANSI C identifier to generate the header file. You can use the placeholder [%s] to create arrays.

Registers and Clusters - both can be used:

dimIndex Specify the substrings that replaces the %s placeholder within name and displayName. By default, the index is a decimal value starting with 0 for the first register. dimIndex should not be used together with the placeholder [%s], but rather with %s.

name String to identify the register. Register names are required to be unique within the scope of a peripheral. You can use the placeholder %s, which is replaced by the dimIndex substring. Use the placeholder [%s] only at the end of the identifier to generate arrays in the header file. The placeholder [%s] cannot be used together with dimIndex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant