aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorIan McIntyre <ianpmcintyre@gmail.com>2022-09-22 13:49:23 -0400
committerIan McIntyre <ianpmcintyre@gmail.com>2022-12-07 09:42:54 -0500
commita5850ab6d6c508fc3351fd86646bcf3fb1b69103 (patch)
tree9e7aad64be5ac096b45096ffbf5cb0f3cb371346 /Cargo.toml
parent96bfa91e3bf81bc215524e8c5c02ee951339f702 (diff)
Add macro support for register arrays
I'm experimenting with a RAL code generator that collapses contiguous register arrays. The generated code would resemble pub struct RegisterBlock { pub MY_ARRAY: [RWRegister<u32>; 3], } and an individual register would be addressed like ral::read_reg!(ral::my_mod, my_inst, MY_ARRAY[1]); This commit extends the four macros so that we can specify an array offset. We simply need to match zero or more `[N]` patterns, where `N` is some expression that produces an array offset. The included test case shows that the approach should support multi-dimensional arrays.
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions