We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e503b3 commit a76777fCopy full SHA for a76777f
src/edc.rs
@@ -1,5 +1,16 @@
1
+//! Error detection code
2
+
3
use crate::c_bindings;
4
5
+/// Calculate Qualcomm 24-bit Cyclical Redundancy Check (CRC-24Q).
6
+///
7
+/// This CRC is used with the RTCM protocol
8
9
+/// The CRC polynomial used is:
10
+/// x^{24} + x^{23} + x^{18} + x^{17} + x^{14} + x^{11} + x^{10} +
11
+/// x^7 + x^6 + x^5 + x^4 + x^3 + x+1
12
13
+/// Mask 0x1864CFB, not reversed, not XOR'd
14
pub fn compute_crc24q(buf: &[u8], initial_value: u32) -> u32 {
15
unsafe { c_bindings::crc24q(buf.as_ptr(), buf.len() as u32, initial_value) }
16
}
0 commit comments