Skip to content

Commit

Permalink
dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
StarQTius committed Aug 16, 2024
1 parent 17cdc76 commit 6f71e85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!.git/
!.github/
!doc/
!example/
!include/
!py/
!test/
Expand Down
12 changes: 12 additions & 0 deletions example/dynamixel-protocol-2.0.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


constexpr auto description = [] {
using namespace upd::descriptor;

return sequence<"header"_h>(0xff, 0xff, 0xfd, 0x0) | field "id"_h > (unsigned_int, width<8>) |
field<"length"_h>(unsigned_int, width<16>) | field<"instruction"_h>(unsigned_int, width<8>) |
one_of<"parameters"_h>(ref<"instruction"_h>, when(0x1) = > empty_description) |
checksum(unsigned_int, width<16>, all_field, crc16);
}();

int main() {}

0 comments on commit 6f71e85

Please sign in to comment.