From 08db5c9eb826f7aa0dba36cbef8011d7bc6b55a5 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 4 Jan 2014 10:51:16 -0500 Subject: Add a get_bitfield function for byte arrays. --- README.mkd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.mkd') diff --git a/README.mkd b/README.mkd index d16a8931..0cad3d21 100644 --- a/README.mkd +++ b/README.mkd @@ -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 -- cgit 1.2.3-korg