Logo
MSP DSP Library
DSPLib_utility.h
1 #ifndef __DSPLIB_UTILITY_H__
2 #define __DSPLIB_UTILITY_H__
3 
4 //******************************************************************************
5 //
13 //
14 //******************************************************************************
15 
16 //******************************************************************************
17 //
18 // If building with a C++ compiler, make all of the definitions in this header
19 // have a C binding.
20 //
21 //******************************************************************************
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26 
27 //******************************************************************************
28 //
32 //
33 //******************************************************************************
34 typedef struct msp_copy_q15_params {
36  uint16_t length;
38 
39 //******************************************************************************
40 //
44 //
45 //******************************************************************************
46 typedef struct msp_copy_iq31_params {
48  uint16_t length;
50 
51 //******************************************************************************
52 //
56 //
57 //******************************************************************************
58 typedef struct msp_fill_q15_params {
60  uint16_t length;
64 
65 //******************************************************************************
66 //
70 //
71 //******************************************************************************
72 typedef struct msp_fill_iq31_params {
74  uint16_t length;
78 
79 //******************************************************************************
80 //
84 //
85 //******************************************************************************
86 typedef struct msp_cmplx_fill_q15_params {
88  uint16_t length;
94 
95 //******************************************************************************
96 //
100 //
101 //******************************************************************************
104  uint16_t length;
110 
111 //******************************************************************************
112 //
116 //
117 //******************************************************************************
120  uint16_t length;
122  uint16_t channel;
124  uint16_t numChannels;
126 
127 //******************************************************************************
128 //
132 //
133 //******************************************************************************
136  uint16_t length;
138  uint16_t channel;
140  uint16_t numChannels;
142 
143 //******************************************************************************
144 //
156 //
157 //******************************************************************************
158 extern msp_status msp_copy_q15(const msp_copy_q15_params *params,
159  const _q15 *src,
160  _q15 *dst);
161 
162 //******************************************************************************
163 //
175 //
176 //******************************************************************************
177 extern msp_status msp_copy_iq31(const msp_copy_iq31_params *params,
178  const _iq31 *src,
179  _iq31 *dst);
180 
181 //******************************************************************************
182 //
193 //
194 //******************************************************************************
195 extern msp_status msp_fill_q15(const msp_fill_q15_params *params, _q15 *dst);
196 
197 //******************************************************************************
198 //
209 //
210 //******************************************************************************
211 extern msp_status msp_fill_iq31(const msp_fill_iq31_params *params, _iq31 *dst);
212 
213 //******************************************************************************
214 //
226 //
227 //******************************************************************************
229  _q15 *dst);
230 
231 //******************************************************************************
232 //
244 //
245 //******************************************************************************
247  _iq31 *dst);
248 
249 //******************************************************************************
250 //
265 //
266 //******************************************************************************
268  const msp_deinterleave_q15_params *params,
269  _q15 *src,
270  _q15 *dst);
271 
272 //******************************************************************************
273 //
288 //
289 //******************************************************************************
291  const msp_deinterleave_iq31_params *params,
292  _iq31 *src,
293  _iq31 *dst);
294 
295 //*****************************************************************************
296 //
297 // Mark the end of the C bindings section for C++ compilers.
298 //
299 //*****************************************************************************
300 #ifdef __cplusplus
301 }
302 #endif
303 
304 #endif //__DSPLIB_UTILITY_H__
uint16_t numChannels
Number of channels being separated.
Definition: DSPLib_utility.h:140
Parameters for IQ31 real vector fill.
Definition: DSPLib_utility.h:72
uint16_t length
Length of each channel, must be a multiple of two.
Definition: DSPLib_utility.h:136
Parameters for Q15 real vector fill.
Definition: DSPLib_utility.h:58
uint16_t numChannels
Number of channels being separated.
Definition: DSPLib_utility.h:124
int32_t _iq31
Signed fixed point data type with 1 integer bit and 31 fractional bits.
Definition: DSPLib_types.h:59
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:60
Parameters for Q15 vector deinterleave.
Definition: DSPLib_utility.h:118
msp_status msp_copy_iq31(const msp_copy_iq31_params *params, const _iq31 *src, _iq31 *dst)
Real IQ31 vector copy.
msp_status
Enumerated type to return the status of an operation.
Definition: DSPLib_types.h:78
_q15 imagValue
Imaginary constant value to fill imaginary indices with.
Definition: DSPLib_utility.h:92
_iq31 realValue
Real constant value to fill real indices with.
Definition: DSPLib_utility.h:106
msp_status msp_copy_q15(const msp_copy_q15_params *params, const _q15 *src, _q15 *dst)
Real Q15 vector copy.
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:48
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:74
msp_status msp_deinterleave_q15(const msp_deinterleave_q15_params *params, _q15 *src, _q15 *dst)
Extract a single channel from multiple-channel source.
msp_status msp_fill_iq31(const msp_fill_iq31_params *params, _iq31 *dst)
Real IQ31 vector fill with constant.
_q15 value
Scalar constant to fill the destination vector with.
Definition: DSPLib_utility.h:62
msp_status msp_cmplx_fill_iq31(const msp_cmplx_fill_iq31_params *params, _iq31 *dst)
Complex IQ31 vector fill with constant.
_iq31 imagValue
Imaginary constant value to fill imaginary indices with.
Definition: DSPLib_utility.h:108
uint16_t channel
Specific zero-indexed channel to pull from source.
Definition: DSPLib_utility.h:122
int16_t _q15
Signed fixed point data type with 1 integer bit and 15 fractional bits.
Definition: DSPLib_types.h:38
Parameters for IQ31 vector copy function.
Definition: DSPLib_utility.h:46
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:88
Parameters for Q15 complex vector fill.
Definition: DSPLib_utility.h:86
_iq31 value
Scalar constant to fill the destination vector with.
Definition: DSPLib_utility.h:76
Parameters for IQ31 complex vector fill.
Definition: DSPLib_utility.h:102
uint16_t length
Length of each channel, must be a multiple of two.
Definition: DSPLib_utility.h:120
msp_status msp_cmplx_fill_q15(const msp_cmplx_fill_q15_params *params, _q15 *dst)
Complex Q15 vector fill with constant.
_q15 realValue
Real constant value to fill real indices with.
Definition: DSPLib_utility.h:90
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:104
Parameters for Q15 vector copy function.
Definition: DSPLib_utility.h:34
uint16_t length
Length of the source data, must be a multiple of two.
Definition: DSPLib_utility.h:36
msp_status msp_fill_q15(const msp_fill_q15_params *params, _q15 *dst)
Real Q15 vector fill with constant.
Parameters for IQ31 vector deinterleave.
Definition: DSPLib_utility.h:134
msp_status msp_deinterleave_iq31(const msp_deinterleave_iq31_params *params, _iq31 *src, _iq31 *dst)
Extract a single channel from multiple-channel source.
uint16_t channel
Specific zero-indexed channel to pull from source.
Definition: DSPLib_utility.h:138