void Receive_Sequence(void) { Mute_HP(); Mute_LO(); Tx_Flag = 0; GPIO_WriteBit(GPIOD, GPIO_Pin_3, Bit_SET); //Make PTT_Out High, Remember FET Inversion Disconnect_PGA(); Connect_IQ_Inputs(); Set_DAC_DVC(Options_GetValue(OPTION_RX_AUDIO)); Set_PGA_Gain(Options_GetValue(OPTION_RX_RF)); Set_ADC_DVC(0); //was -20 using Milt's AGC scheme Set_HP_Gain(6); }
void Xmit_SSB_Sequence(void) { Mute_HP(); Mute_LO(); Tx_Flag = 1; Disconnect_PGA(); Set_DAC_DVC(0); Set_ADC_DVC(0); Connect_Microphone_Input(); Set_PGA_Gain(Options_GetValue(OPTION_SSB_LEVEL)); GPIO_WriteBit(GPIOD, GPIO_Pin_3, Bit_RESET); //Make PTT_Out Low,Remember FET Inversion Delay(1000); Set_LO_Gain(24); }
void Options_SetValue(int optionIdx, int16_t newValue) { assert(optionIdx >= 0 && optionIdx < NUM_OPTIONS); s_optionsData[optionIdx].CurrentValue = newValue; /* * Process each option individually as needed. */ switch (optionIdx) { case OPTION_RX_AUDIO: if (RxTx_InRxMode()) { dac_gain = newValue; Old_dac_gain = -200; //Set to an outrageous value for change testing in AGC_Processsing.c } break; case OPTION_RX_RF: if (RxTx_InRxMode()) { PGAGAIN0 = newValue; Old_PGAGAIN0 = -200; //Set to an outrageous value for change testing in AGC_Processsing.c } break; case OPTION_Mic_Gain: if (RxTx_InTxMode() && (Mode_GetCurrentMode() == MODE_SSB)) Set_PGA_Gain(newValue); break; case OPTION_Tx_LEVEL: if (RxTx_InTxMode()) Set_LO_Gain(newValue); break; case OPTION_ST_LEVEL: //Side Tone Level if (RxTx_InTxMode()) Set_HP_Gain(newValue); break; case OPTION_RX_AMP: R_lgain = ((float) newValue) / 10000.0; break; case OPTION_RX_PHASE: R_xgain = ((float) newValue) / 10000.0; break; case OPTION_TX_AMP: T_lgain = ((float) newValue) / 10000.0; break; case OPTION_TX_PHASE: T_xgain = ((float) newValue) / 10000.0; break; case OPTION_MIC_BIAS: if (newValue == 0) { Turn_Off_Bias(); } else { Turn_On_Bias(); } break; case OPTION_AGC_Mode: if (RxTx_InRxMode()) { AGC_Mode = newValue; Init_AGC(); } break; case OPTION_AGC_THRSH: if (RxTx_InRxMode()) Init_AGC(); break; case OPTION__RSL_CAL: if (RxTx_InRxMode()) Init_AGC(); break; case OPTION_SI570_MULT: FrequencyManager_SetFreqMultiplier(newValue); break; default: // Handle any programming errors where we forget to update this switch statement. assert(0); } }