cleaned up unused functions
Some checks failed
Makefile CI / Release - Linux-x86_64 (push) Failing after 1m13s
Makefile CI / Release - Windows-x86_64 (push) Has been cancelled

This commit is contained in:
2025-03-30 13:21:05 -04:00
parent c313131a88
commit 75230a5cc7
5 changed files with 8 additions and 69 deletions

View File

@@ -203,25 +203,6 @@ pub(crate) fn read_bit(value: u16, position: u8) -> bool {
(value & (1 << position)) != 0
}
/// Sets or clears a specific bit in a u8 value.
/// `bit_position` is 0-indexed (0-7).
/// Returns the modified u8 value.
pub(crate) fn set_bit(value: u8, bit_position: u8, bit_value: bool) -> u8 {
if bit_position > 7 {
warn!("set_bit called with invalid position: {}", bit_position);
return value; // Return original value on error
}
if bit_value {
value | (1 << bit_position) // Set the bit to 1
} else {
value & !(1 << bit_position) // Set the bit to 0
}
}
/// Combines high and low bytes into a u16 value.
pub(crate) fn merge_u8_into_u16(high_byte: u8, low_byte: u8) -> u16 {
(high_byte as u16) << 8 | (low_byte as u16)
}
/// Checks if a device firmware string is supported.
/// TODO: Implement actual firmware checking logic if needed.