summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-06-25 05:03:34 -0700
committerKeith Packard <keithp@keithp.com>2012-06-25 05:03:34 -0700
commit70cf32e89df19bde5185339fc703532c8a5b8be6 (patch)
tree1e6bbe7fcc4152d93fb454eb9b06374f02258999 /src/core
parent246174b32bb6cf827d240c32d6a51c3513a08c37 (diff)
altos: Get cc1120 packet reception working
Interrupt-per-bit, but it seems to work Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ao_viterbi.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/ao_viterbi.c b/src/core/ao_viterbi.c
index bb93bc83..594c0d91 100644
--- a/src/core/ao_viterbi.c
+++ b/src/core/ao_viterbi.c
@@ -55,16 +55,19 @@ struct ao_soft_sym {
#define NUM_HIST 8
#define MOD_HIST(b) ((b) & 7)
+#define V_0 0xc0
+#define V_1 0x40
+
static const struct ao_soft_sym ao_fec_decode_table[NUM_STATE][2] = {
/* next 0 1 state */
- { { 0x00, 0x00 }, { 0xff, 0xff } } , /* 000 */
- { { 0x00, 0xff }, { 0xff, 0x00 } }, /* 001 */
- { { 0xff, 0xff }, { 0x00, 0x00 } }, /* 010 */
- { { 0xff, 0x00 }, { 0x00, 0xff } }, /* 011 */
- { { 0xff, 0xff }, { 0x00, 0x00 } }, /* 100 */
- { { 0xff, 0x00 }, { 0x00, 0xff } }, /* 101 */
- { { 0x00, 0x00 }, { 0xff, 0xff } }, /* 110 */
- { { 0x00, 0xff }, { 0xff, 0x00 } } /* 111 */
+ { { V_0, V_0 }, { V_1, V_1 } } , /* 000 */
+ { { V_0, V_1 }, { V_1, V_0 } }, /* 001 */
+ { { V_1, V_1 }, { V_0, V_0 } }, /* 010 */
+ { { V_1, V_0 }, { V_0, V_1 } }, /* 011 */
+ { { V_1, V_1 }, { V_0, V_0 } }, /* 100 */
+ { { V_1, V_0 }, { V_0, V_1 } }, /* 101 */
+ { { V_0, V_0 }, { V_1, V_1 } }, /* 110 */
+ { { V_0, V_1 }, { V_1, V_0 } } /* 111 */
};
static inline uint8_t