mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
The beginnings of simple System Fusion support.
This commit is contained in:
parent
87322b631b
commit
f2f2866d15
14 changed files with 391 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue