Checkpoint commit renaming some functions for clarity.
[apps/agl-service-can-low-level.git] / src / bitfield / 8byte.c
index d316093..76dccc7 100644 (file)
@@ -6,13 +6,9 @@
 
 #define EIGHTBYTE_BIT (8 * sizeof(uint64_t))
 
-uint64_t bitmask(const uint8_t bit_count) {
-    return (((uint64_t)0x1) << bit_count) - 1;
-}
-
 uint8_t eightbyte_get_nibble(const uint64_t source, const uint8_t nibble_index,
         const bool data_is_big_endian) {
-    return get_bit_field(source, NIBBLE_SIZE * nibble_index, NIBBLE_SIZE,
+    return eightbyte_get_bit_field(source, NIBBLE_SIZE * nibble_index, NIBBLE_SIZE,
             data_is_big_endian);
 }
 
@@ -24,7 +20,7 @@ uint8_t eightbyte_get_byte(uint64_t source, const uint8_t byte_index,
     return (source >> (EIGHTBYTE_BIT - ((byte_index + 1) * CHAR_BIT))) & 0xFF;
 }
 
-uint64_t get_bit_field(uint64_t source, const uint16_t offset,
+uint64_t eightbyte_get_bit_field(uint64_t source, const uint16_t offset,
         const uint16_t bit_count, const bool data_is_big_endian) {
     int startByte = offset / CHAR_BIT;
     int endByte = (offset + bit_count - 1) / CHAR_BIT;