mirror of https://github.com/ArduPilot/ardupilot
AP_Math: move use of __builtin_parity to crc
This commit is contained in:
parent
440d00e8c8
commit
43ecdc64b6
|
@ -539,3 +539,8 @@ uint64_t crc_crc64(const uint32_t *data, uint16_t num_words)
|
|||
|
||||
return crc;
|
||||
}
|
||||
|
||||
uint8_t parity(uint8_t byte)
|
||||
{
|
||||
return __builtin_parity(byte);
|
||||
}
|
||||
|
|
|
@ -55,3 +55,7 @@ void hash_fnv_1a(uint32_t len, const uint8_t* buf, uint64_t* hash);
|
|||
|
||||
// CRC-64-WE using the polynomial of 0x42F0E1EBA9EA3693
|
||||
uint64_t crc_crc64(const uint32_t *data, uint16_t num_words);
|
||||
|
||||
// return the parity of byte - "1" if there is an odd number of bits
|
||||
// set, "0" if there is an even number of bits set
|
||||
uint8_t parity(uint8_t byte);
|
||||
|
|
Loading…
Reference in New Issue