fw simulator: WIP
This commit is contained in:
parent
e505627ada
commit
87ae7dfcb3
24 changed files with 465 additions and 192 deletions
|
|
@ -10,8 +10,12 @@
|
|||
|
||||
/* FIXME: move to makefile */
|
||||
#define DSSS_MATCHER_CACHE_SIZE 8
|
||||
/* FIXME: move to more appropriate header */
|
||||
#define PAYLOAD_DATA_BYTE ((PAYLOAD_DATA_BIT+7)/8)
|
||||
|
||||
#if DSSS_GOLD_CODE_NBITS < 8
|
||||
typedef uint8_t symbol_t;
|
||||
#else
|
||||
typedef uint16_t symbol_t;
|
||||
#endif
|
||||
|
||||
struct iir_biquad {
|
||||
float a[2];
|
||||
|
|
@ -43,12 +47,9 @@ struct matcher_state {
|
|||
int last_skips;
|
||||
int candidate_skips;
|
||||
|
||||
#if DSSS_GOLD_CODE_NBITS > 7
|
||||
#error DSSS_GOLD_CODE_NBITS is too large for matcher_state.data data type (uint8_t)
|
||||
#endif
|
||||
uint8_t data[TRANSMISSION_SYMBOLS];
|
||||
symbol_t data[TRANSMISSION_SYMBOLS];
|
||||
int data_pos;
|
||||
uint8_t candidate_data;
|
||||
symbol_t candidate_data;
|
||||
};
|
||||
|
||||
struct dsss_demod_state {
|
||||
|
|
@ -66,7 +67,7 @@ struct dsss_demod_state {
|
|||
};
|
||||
|
||||
|
||||
extern void handle_dsss_received(uint8_t data[static TRANSMISSION_SYMBOLS]);
|
||||
extern void handle_dsss_received(symbol_t data[static TRANSMISSION_SYMBOLS]);
|
||||
|
||||
void dsss_demod_init(struct dsss_demod_state *st);
|
||||
void dsss_demod_step(struct dsss_demod_state *st, float new_value, uint64_t ts);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue