From 5d69a524f81f234b3fbc41d49ba18d6f6886baba Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 3 Aug 2006 04:51:51 +0000 Subject: Houston, we have a trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3122 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/lib/reed-solomon/fixed.h | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 gnuradio-core/src/lib/reed-solomon/fixed.h (limited to 'gnuradio-core/src/lib/reed-solomon/fixed.h') diff --git a/gnuradio-core/src/lib/reed-solomon/fixed.h b/gnuradio-core/src/lib/reed-solomon/fixed.h new file mode 100644 index 000000000..9f0ddd9a4 --- /dev/null +++ b/gnuradio-core/src/lib/reed-solomon/fixed.h @@ -0,0 +1,38 @@ +/* Configure the RS codec with fixed parameters for CCSDS standard + * (255,223) code over GF(256). Note: the conventional basis is still + * used; the dual-basis mappings are performed in [en|de]code_rs_ccsds.c + * + * Copyright 2002 Phil Karn, KA9Q + * May be used under the terms of the GNU General Public License (GPL) + */ +#define DTYPE unsigned char + +static inline int mod255(int x){ + while (x >= 255) { + x -= 255; + x = (x >> 8) + (x & 255); + } + return x; +} +#define MODNN(x) mod255(x) + +extern unsigned char CCSDS_alpha_to[]; +extern unsigned char CCSDS_index_of[]; +extern unsigned char CCSDS_poly[]; + +#define MM 8 +#define NN 255 +#define ALPHA_TO CCSDS_alpha_to +#define INDEX_OF CCSDS_index_of +#define GENPOLY CCSDS_poly +#define NROOTS 32 +#define FCR 112 +#define PRIM 11 +#define IPRIM 116 +#define A0 (NN) + +#define ENCODE_RS encode_rs_8 +#define DECODE_RS decode_rs_8 + +void ENCODE_RS(DTYPE *data,DTYPE *parity); +int DECODE_RS(DTYPE *data, int *eras_pos, int no_eras); -- cgit From f914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 20 Jul 2011 18:38:36 -0700 Subject: core: API declaration macros for core class and function symbols --- gnuradio-core/src/lib/reed-solomon/fixed.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src/lib/reed-solomon/fixed.h') diff --git a/gnuradio-core/src/lib/reed-solomon/fixed.h b/gnuradio-core/src/lib/reed-solomon/fixed.h index 9f0ddd9a4..30091e7bf 100644 --- a/gnuradio-core/src/lib/reed-solomon/fixed.h +++ b/gnuradio-core/src/lib/reed-solomon/fixed.h @@ -7,6 +7,8 @@ */ #define DTYPE unsigned char +#include + static inline int mod255(int x){ while (x >= 255) { x -= 255; @@ -34,5 +36,5 @@ extern unsigned char CCSDS_poly[]; #define ENCODE_RS encode_rs_8 #define DECODE_RS decode_rs_8 -void ENCODE_RS(DTYPE *data,DTYPE *parity); -int DECODE_RS(DTYPE *data, int *eras_pos, int no_eras); +GR_CORE_API void ENCODE_RS(DTYPE *data,DTYPE *parity); +GR_CORE_API int DECODE_RS(DTYPE *data, int *eras_pos, int no_eras); \ No newline at end of file -- cgit