Commit f81b6704 authored by FredericLeroy's avatar FredericLeroy

lmsSDR: remove static from struct SamplesPacket.

Th struct SamplesPacket is a type declaration. It is not defined
in memory and thus samplesCount can't be declared static.
Transform it to true cpp static variable class as this is c++ source.
parent 2349b37e
...@@ -14,14 +14,15 @@ typedef struct ...@@ -14,14 +14,15 @@ typedef struct
int16_t q; int16_t q;
} complex16_t; } complex16_t;
typedef struct class SamplesPacket
{ {
public:
uint64_t timestamp; //timestamp of the packet uint64_t timestamp; //timestamp of the packet
uint16_t first; //index of first unused sample in samples[] uint16_t first; //index of first unused sample in samples[]
uint16_t last; //end index of samples uint16_t last; //end index of samples
static const uint16_t samplesCount = 1024; //maximum number of samples in packet static const uint16_t samplesCount = 1024; //maximum number of samples in packet
complex16_t samples[samplesCount]; //must be power of two complex16_t samples[samplesCount]; //must be power of two
} SamplesPacket; };
complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy assignment complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy assignment
{ {
...@@ -30,4 +31,4 @@ complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy ...@@ -30,4 +31,4 @@ complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy
return other1; return other1;
} }
#endif #endif
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment