Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/radio@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
// --------------------------------------------------------------
|
||||
#ifndef NCO_H
|
||||
#define NCO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "radio_types.h"
|
||||
#include "real.h"
|
||||
#include "cpx.h"
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Types
|
||||
// --------------------------------------------------------------
|
||||
typedef struct _nco_t
|
||||
{
|
||||
radio_float_t phi, omega;
|
||||
cpx_t state;
|
||||
} nco_t;
|
||||
|
||||
// --------------------------------------------------------------
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
// --------------------------------------------------------------
|
||||
// NCO
|
||||
// --------------------------------------------------------------
|
||||
// Scalar version
|
||||
void NCO_Init(nco_t *pObj, radio_float_t omega, radio_float_t phi);
|
||||
void NCO_Free(nco_t *pObj);
|
||||
void NCO_Reinit(nco_t *pObj, radio_float_t omega, radio_float_t phi);
|
||||
void NCO_SetOmega(nco_t *pObj, radio_float_t omega);
|
||||
void NCO_SetPhi(nco_t *pObj, radio_float_t phi);
|
||||
radio_float_t NCO_GetOmega(nco_t *pObj);
|
||||
radio_float_t NCO_GetPhi(nco_t *pObj);
|
||||
void NCO_Process(nco_t *pObj, radio_float_t dOmega, radio_float_t dPhi);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Mixer
|
||||
// Scalar version
|
||||
// --------------------------------------------------------------
|
||||
cpx_t NCO_MixRealComplexS(nco_t *pObj, radio_float_t src, radio_float_t gain);
|
||||
cpx_t NCO_MixComplexS(nco_t *pObj, cpx_t src, cpx_t gain);
|
||||
radio_float_t NCO_MixComplexRealS(nco_t *pObj, cpx_t src, cpx_t gain);
|
||||
// --------------------------------------------------------------
|
||||
// Mixer
|
||||
// Vector version
|
||||
// --------------------------------------------------------------
|
||||
void NCO_MixRealComplexV(nco_t *pObj, cpx_t *pDst, radio_float_t *pSrc, radio_float_t gain, uint32_t len);
|
||||
void NCO_MixComplexV(nco_t *pObj, cpx_t *pSrcDst, cpx_t gain, uint32_t len);
|
||||
void NCO_MixComplexRealV(nco_t *pObj, radio_float_t *pDst, cpx_t *pSrc, cpx_t gain, uint32_t len);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
// --------------------------------------------------------------
|
||||
#endif // NCO_H
|
||||
Reference in New Issue
Block a user