mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
The beginnings of simple System Fusion support.
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "Golay24128.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
|
||||
const unsigned int ENCODING_TABLE_23127[] = {
|
||||
0x000000U, 0x0018EAU, 0x00293EU, 0x0031D4U, 0x004A96U, 0x00527CU, 0x0063A8U, 0x007B42U, 0x008DC6U, 0x00952CU,
|
||||
0x00A4F8U, 0x00BC12U, 0x00C750U, 0x00DFBAU, 0x00EE6EU, 0x00F684U, 0x010366U, 0x011B8CU, 0x012A58U, 0x0132B2U,
|
||||
@@ -1090,3 +1093,16 @@ unsigned int CGolay24128::decode24128(unsigned int code)
|
||||
{
|
||||
return decode23127(code >> 1);
|
||||
}
|
||||
|
||||
unsigned int CGolay24128::decode24128(unsigned char* bytes)
|
||||
{
|
||||
assert(bytes != NULL);
|
||||
|
||||
unsigned int code = bytes[0U];
|
||||
code <<= 8;
|
||||
code |= bytes[1U];
|
||||
code <<= 8;
|
||||
code |= bytes[2U];
|
||||
|
||||
return decode23127(code >> 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user