diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-04 10:51:16 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-04 10:52:42 -0500 |
commit | 08db5c9eb826f7aa0dba36cbef8011d7bc6b55a5 (patch) | |
tree | b2875552387f00191c772bc6da08dcaa7e6d2e87 /README.mkd | |
parent | 6f3a81ed8287357b54aad16bff27495c6eaca6df (diff) |
Add a get_bitfield function for byte arrays.
Diffstat (limited to 'README.mkd')
-rw-r--r-- | README.mkd | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -30,11 +30,11 @@ useful. ### 8 Byte Decoding uint64_t data = 0x8000000000000000; - uint64_t result = get_bit_field(data, 0, 1, false); + uint64_t result = get_bitfield(data, 0, 1, false); // result == 0x1 data = 0x0402574d555a0401; - result = get_bit_field(data, 16, 32, false); + result = get_bitfield(data, 16, 32, false); // result = 0x574d555a; data = 0x00000000F34DFCFF; @@ -51,7 +51,7 @@ useful. uint64_t data = 0; fail_unless(set_bit_field(&data, 1, 0, 1)); - uint64_t result = get_bit_field(data, 0, 1, false); + uint64_t result = get_bitfield(data, 0, 1, false); ck_assert_int_eq(result, 0x1); ### CAN Signal Encoding |