diff options
Diffstat (limited to 'src/bitfield/bitfield.c')
-rw-r--r-- | src/bitfield/bitfield.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitfield/bitfield.c b/src/bitfield/bitfield.c index 3bf00ac0..7dfa7cd4 100644 --- a/src/bitfield/bitfield.c +++ b/src/bitfield/bitfield.c @@ -5,10 +5,10 @@ #define NIBBLE_SIZE (CHAR_BIT / 2) -uint8_t getNibble(const uint8_t source[], const uint8_t source_length, +uint8_t get_nibble(const uint8_t source[], const uint8_t source_length, const uint8_t nibble_index) { uint8_t byte_index = nibble_index / 2; - uint8_t result = getByte(source, source_length, byte_index); + uint8_t result = get_byte(source, source_length, byte_index); if(nibble_index % 2 == 0) { result >>= NIBBLE_SIZE; } @@ -16,7 +16,7 @@ uint8_t getNibble(const uint8_t source[], const uint8_t source_length, return result; } -uint8_t getByte(const uint8_t source[], const uint8_t source_length, +uint8_t get_byte(const uint8_t source[], const uint8_t source_length, const uint8_t byte_index) { if(byte_index < source_length) { return source[byte_index]; |