#ifndef __DSSS_DEMOD_H__ #define __DSSS_DEMOD_H__ #define DSSS_GOLD_CODE_LENGTH ((1< 7 #error DSSS_GOLD_CODE_NBITS is too large for matcher_state.data data type (uint8_t) #endif uint8_t data[TRANSMISSION_SYMBOLS]; int data_pos; uint8_t candidate_data; }; struct dsss_demod_state { float signal[DSSS_CORRELATION_LENGTH]; size_t signal_wpos; float correlation[DSSS_GOLD_CODE_COUNT][DSSS_WAVELET_LUT_SIZE]; size_t correlation_wpos; struct cwt_iir_filter_state cwt_filter[DSSS_GOLD_CODE_COUNT]; struct group group; struct matcher_state matcher_cache[DSSS_MATCHER_CACHE_SIZE]; }; extern void handle_dsss_received(uint8_t data[TRANSMISSION_SYMBOLS]); void dsss_demod_init(struct dsss_demod_state *st); #ifdef SIMULATION void dsss_demod_step(struct dsss_demod_state *st, float new_value, uint64_t ts, int record_channel); #else /* SIMULATION */ void dsss_demod_step(struct dsss_demod_state *st, float new_value, uint64_t ts); #endif /* SIMULATION */ #endif /* __DSSS_DEMOD_H__ */