kopia lustrzana https://github.com/OpenRTX/OpenRTX
MD3x0 bugfixes: fixed wrong ADC conversion sequence preventing squelch opening and corrected control of W/N switch in radio driver
rodzic
9fb7ace303
commit
0ca7258f03
|
@ -81,9 +81,9 @@ void adc1_init()
|
|||
#if defined(PLATFORM_MD3x0)
|
||||
ADC1->SQR1 = 3 << 20; /* Four channels to be converted */
|
||||
ADC1->SQR3 |= (1 << 0) /* CH1, battery voltage on PA1 */
|
||||
| (8 << 5) /* CH8, RSSI value on PB0 */
|
||||
| (3 << 10) /* CH3, vox level on PA3 */
|
||||
| (0 << 15); /* CH0, volume potentiometer level on PA0 */
|
||||
| (0 << 5) /* CH0, volume potentiometer level on PA0 */
|
||||
| (8 << 10) /* CH8, RSSI value on PB0 */
|
||||
| (3 << 15); /* CH3, vox level on PA3 */
|
||||
#else
|
||||
ADC1->SQR1 = 1 << 20; /* Convert two channel */
|
||||
ADC1->SQR3 |= (1 << 0) /* CH1, battery voltage on PA1 */
|
||||
|
|
|
@ -73,7 +73,7 @@ void radio_init()
|
|||
|
||||
gpio_clearPin(PLL_PWR); /* PLL off */
|
||||
gpio_setPin(VCOVCC_SW); /* VCOVCC high enables RX VCO, TX VCO if low */
|
||||
gpio_clearPin(WN_SW); /* 25kHz bandwidth */
|
||||
gpio_setPin(WN_SW); /* 25kHz bandwidth */
|
||||
gpio_clearPin(DMR_SW); /* Disconnect HR_C5000 input IF signal and audio out */
|
||||
gpio_clearPin(FM_SW); /* Disconnect analog FM audio path */
|
||||
gpio_clearPin(RF_APC_SW); /* Disable RF power control */
|
||||
|
@ -130,17 +130,17 @@ void radio_setBandwidth(const enum bandwidth bw)
|
|||
switch(bw)
|
||||
{
|
||||
case BW_12_5:
|
||||
gpio_setPin(WN_SW);
|
||||
gpio_clearPin(WN_SW);
|
||||
C5000_setModFactor(0x1E);
|
||||
break;
|
||||
|
||||
case BW_20:
|
||||
gpio_clearPin(WN_SW);
|
||||
gpio_setPin(WN_SW);
|
||||
C5000_setModFactor(0x30);
|
||||
break;
|
||||
|
||||
case BW_25:
|
||||
gpio_clearPin(WN_SW);
|
||||
gpio_setPin(WN_SW);
|
||||
C5000_setModFactor(0x3C);
|
||||
break;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue