Files
@ 23ecc15c694d
Branch filter:
Location: FeatherHAB/wsprhab/lib/jtencode/rs_common.h - annotation
23ecc15c694d
1004 B
text/plain
Tons of changes, got my first wspr transmission through! Manually powered up at even minute + 1 second
0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 0d9900312165 | /* Stuff common to all the general-purpose Reed-Solomon codecs
* Copyright 2004 Phil Karn, KA9Q
* May be used under the terms of the GNU Lesser General Public License (LGPL)
*/
#ifndef RS_COMMON_H_
#define RS_COMMON_H_
#include "int.h"
/* Reed-Solomon codec control block */
struct rs {
int mm; /* Bits per symbol */
int nn; /* Symbols per block (= (1<<mm)-1) */
data_t *alpha_to; /* log lookup table */
data_t *index_of; /* Antilog lookup table */
data_t *genpoly; /* Generator polynomial */
int nroots; /* Number of generator roots = number of parity symbols */
int fcr; /* First consecutive root, index form */
int prim; /* Primitive element, index form */
int iprim; /* prim-th root of 1, index form */
int pad; /* Padding bytes in shortened block */
};
static inline int modnn(struct rs *rs,int x){
while (x >= rs->nn) {
x -= rs->nn;
x = (x >> rs->mm) + (x & rs->nn);
}
return x;
}
#endif
|