00001 00005 #include <bpm/bpm_interface.h> 00006 #include <bpm/bpm_rf.h> 00007 #include <bpm/bpm_wf.h> 00008 00017 int rf_mixer( doublewf_t *RF, doublewf_t *LO, doublewf_t *IF ) { 00018 00019 00020 if ( ! RF || ! LO || ! IF ) { 00021 bpm_error( "Invalid pointer arguments in rf_mixer(...)", 00022 __FILE__, __LINE__ ); 00023 return BPM_FAILURE; 00024 } 00025 00026 // make copy of RF into the IF waveform, RF gets preserved 00027 doublewf_copy( IF, RF ); 00028 00029 // mix down 00030 doublewf_multiply( IF, LO ); 00031 00032 return BPM_SUCCESS; 00033 } 00034 // end of file