RadioLib
Universal wireless communication library for Arduino
Loading...
Searching...
No Matches
ReedSolomon.h
1
#if !defined(RADIOLIB_REED_SOLOMON_H)
2
#define RADIOLIB_REED_SOLOMON_H
3
4
#include <stdint.h>
5
#include <stddef.h>
6
7
// Reed-Solomon parameters
8
#define RADIOLIB_RS_SYM_BITS (8)
9
#define RADIOLIB_RS_SYMB (1 << RADIOLIB_RS_SYM_BITS)
10
#define RADIOLIB_RS_NROOTS (32)
11
#define RADIOLIB_RS_NDATA (RADIOLIB_RS_SYMB - RADIOLIB_RS_NROOTS - 1)
12
#define RADIOLIB_RS_BLOCK RADIOLIB_RS_SYMB
13
14
/* Reed-Solomon encoder
15
* Copyright 2004, Phil Karn, KA9Q
16
* May be used under the terms of the GNU Lesser General Public License (LGPL)
17
*
18
* This version tweaked by Philip Heron <phil@sanslogic.co.uk>
19
*/
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
#include <stdint.h>
26
27
extern
void
rlb_encode_rs_8(
const
uint8_t *data, uint8_t *parity,
int
pad);
28
extern
int
rlb_decode_rs_8(uint8_t *data,
int
*eras_pos,
int
no_eras,
int
pad);
29
30
#ifdef __cplusplus
31
}
32
#endif
33
34
#endif
src
utils
ReedSolomon.h
Generated by
1.15.0