Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pico-sdk
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microcontroller
pico-sdk
Commits
439ef61b
Commit
439ef61b
authored
11 months ago
by
William Vinnicombe
Browse files
Options
Downloads
Patches
Plain Diff
Fix #878 - assert ordering of bi_pins_with_names is correct
parent
efe2103f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/pico_binary_info/include/pico/binary_info/code.h
+4
-3
4 additions, 3 deletions
src/common/pico_binary_info/include/pico/binary_info/code.h
with
4 additions
and
3 deletions
src/common/pico_binary_info/include/pico/binary_info/code.h
+
4
−
3
View file @
439ef61b
...
...
@@ -207,9 +207,10 @@ static const struct _binary_info_named_group __bi_lineno_var_name = { \
#define bi_6pins_with_func(p0, p1, p2, p3, p4, p5, func) __bi_encoded_pins_64_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 8) | ((p1) << 16) | ((p2) << 24) | ((uint64_t)(p3) << 32) | ((uint64_t)(p4) << 40) | ((uint64_t)(p5) << 48) | ((uint64_t)(p5) << 56))
#define bi_7pins_with_func(p0, p1, p2, p3, p4, p5, p6,func) __bi_encoded_pins_64_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 8) | ((p1) << 16) | ((p2) << 24) | ((uint64_t)(p3) << 32) | ((uint64_t)(p4) << 40) | ((uint64_t)(p5) << 48) | ((uint64_t)(p6) << 56))
#define order_assert(ps) static_assert(ps, "bi_pins_with_names numbers must be in order")
#define bi_1pin_with_name(p0, name) bi_pin_mask_with_name(1ull << (p0), name)
#define bi_2pins_with_names(p0, name0, p1, name1) bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)), name0 "|" name1)
#define bi_3pins_with_names(p0, name0, p1, name1, p2, name2) bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)) | (1ull << (p2)), name0 "|" name1 "|" name2)
#define bi_4pins_with_names(p0, name0, p1, name1, p2, name2, p3, name3) bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)) | (1ull << (p2)) | (1ull << (p3)), name0 "|" name1 "|" name2 "|" name3)
#define bi_2pins_with_names(p0, name0, p1, name1)
order_assert(p0 < p1);
bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)), name0 "|" name1)
#define bi_3pins_with_names(p0, name0, p1, name1, p2, name2)
order_assert(p0 < p1 && p1 < p2);
bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)) | (1ull << (p2)), name0 "|" name1 "|" name2)
#define bi_4pins_with_names(p0, name0, p1, name1, p2, name2, p3, name3)
order_assert(p0 < p1 && p1 < p2 && p2 < p3);
bi_pin_mask_with_names((1ull << (p0)) | (1ull << (p1)) | (1ull << (p2)) | (1ull << (p3)), name0 "|" name1 "|" name2 "|" name3)
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment