mirror of
https://github.com/juribeparada/MMDVM_HS.git
synced 2026-04-06 14:53:39 +00:00
Compare commits
No commits in common. "master" and "v1.4.14" have entirely different histories.
75 changed files with 687 additions and 3808 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,4 +5,3 @@ bin/
|
||||||
|
|
||||||
GitVersion\.h
|
GitVersion\.h
|
||||||
|
|
||||||
.vscode/
|
|
||||||
|
|
|
||||||
178
ADF7021.cpp
178
ADF7021.cpp
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||||
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
*
|
*
|
||||||
* Some of the code is based on work of Guus Van Dooren PE1PLM:
|
* Some of the code is based on work of Guus Van Dooren PE1PLM:
|
||||||
|
|
@ -49,13 +48,14 @@ uint16_t m_dmrDev;
|
||||||
uint16_t m_ysfDev;
|
uint16_t m_ysfDev;
|
||||||
uint16_t m_p25Dev;
|
uint16_t m_p25Dev;
|
||||||
uint16_t m_nxdnDev;
|
uint16_t m_nxdnDev;
|
||||||
uint16_t m_m17Dev;
|
|
||||||
uint16_t m_pocsagDev;
|
uint16_t m_pocsagDev;
|
||||||
|
|
||||||
static void Send_AD7021_control_shift()
|
static void Send_AD7021_control_shift()
|
||||||
{
|
{
|
||||||
for (int AD7021_counter = 31; AD7021_counter >= 0; AD7021_counter--) {
|
int AD7021_counter;
|
||||||
if (bitRead(AD7021_control_word, AD7021_counter) == HIGH)
|
|
||||||
|
for(AD7021_counter = 31; AD7021_counter >= 0; AD7021_counter--) {
|
||||||
|
if(bitRead(AD7021_control_word, AD7021_counter) == HIGH)
|
||||||
io.SDATA_pin(HIGH);
|
io.SDATA_pin(HIGH);
|
||||||
else
|
else
|
||||||
io.SDATA_pin(LOW);
|
io.SDATA_pin(LOW);
|
||||||
|
|
@ -65,7 +65,6 @@ static void Send_AD7021_control_shift()
|
||||||
io.dlybit();
|
io.dlybit();
|
||||||
io.SCLK_pin(LOW);
|
io.SCLK_pin(LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to keep SDATA signal at defined level when idle (not required)
|
// to keep SDATA signal at defined level when idle (not required)
|
||||||
io.SDATA_pin(LOW);
|
io.SDATA_pin(LOW);
|
||||||
}
|
}
|
||||||
|
|
@ -81,8 +80,9 @@ void Send_AD7021_control(bool doSle)
|
||||||
{
|
{
|
||||||
Send_AD7021_control_shift();
|
Send_AD7021_control_shift();
|
||||||
|
|
||||||
if (doSle)
|
if (doSle) {
|
||||||
Send_AD7021_control_slePulse();
|
Send_AD7021_control_slePulse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DUPLEX)
|
#if defined(DUPLEX)
|
||||||
|
|
@ -97,8 +97,9 @@ void Send_AD7021_control2(bool doSle)
|
||||||
{
|
{
|
||||||
Send_AD7021_control_shift();
|
Send_AD7021_control_shift();
|
||||||
|
|
||||||
if (doSle)
|
if (doSle) {
|
||||||
Send_AD7021_control_sle2Pulse();
|
Send_AD7021_control_sle2Pulse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -107,14 +108,15 @@ uint16_t CIO::readRSSI()
|
||||||
{
|
{
|
||||||
uint32_t AD7021_RB;
|
uint32_t AD7021_RB;
|
||||||
uint16_t RB_word = 0U;
|
uint16_t RB_word = 0U;
|
||||||
|
int AD7021_counter;
|
||||||
uint8_t RB_code, gain_code, gain_corr;
|
uint8_t RB_code, gain_code, gain_corr;
|
||||||
|
|
||||||
// Register 7, readback enable, ADC RSSI mode
|
// Register 7, readback enable, ADC RSSI mode
|
||||||
AD7021_RB = 0x0147;
|
AD7021_RB = 0x0147;
|
||||||
|
|
||||||
// Send control register
|
// Send control register
|
||||||
for (int AD7021_counter = 8; AD7021_counter >= 0; AD7021_counter--) {
|
for(AD7021_counter = 8; AD7021_counter >= 0; AD7021_counter--) {
|
||||||
if (bitRead(AD7021_RB, AD7021_counter) == HIGH)
|
if(bitRead(AD7021_RB, AD7021_counter) == HIGH)
|
||||||
SDATA_pin(HIGH);
|
SDATA_pin(HIGH);
|
||||||
else
|
else
|
||||||
SDATA_pin(LOW);
|
SDATA_pin(LOW);
|
||||||
|
|
@ -139,15 +141,16 @@ uint16_t CIO::readRSSI()
|
||||||
dlybit();
|
dlybit();
|
||||||
|
|
||||||
// Read SREAD pin
|
// Read SREAD pin
|
||||||
for (int AD7021_counter = 17; AD7021_counter >= 0; AD7021_counter--) {
|
for(AD7021_counter = 17; AD7021_counter >= 0; AD7021_counter--) {
|
||||||
SCLK_pin(HIGH);
|
SCLK_pin(HIGH);
|
||||||
dlybit();
|
dlybit();
|
||||||
|
|
||||||
if ((AD7021_counter != 17) && (AD7021_counter != 0))
|
if( (AD7021_counter != 17) && (AD7021_counter != 0) )
|
||||||
RB_word |= ((SREAD_pin() & 0x01) << (AD7021_counter - 1));
|
RB_word |= ( (SREAD_pin() & 0x01) << (AD7021_counter-1) );
|
||||||
|
|
||||||
SCLK_pin(LOW);
|
SCLK_pin(LOW);
|
||||||
dlybit();
|
dlybit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DUPLEX)
|
#if defined(DUPLEX)
|
||||||
|
|
@ -213,12 +216,8 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
m_frequency_rx = m_pocsag_freq_tx;
|
m_frequency_rx = m_pocsag_freq_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
|
|
||||||
io.checkBand(m_frequency_rx, m_frequency_tx);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Toggle CE pin for ADF7021 reset
|
// Toggle CE pin for ADF7021 reset
|
||||||
if (reset) {
|
if(reset) {
|
||||||
CE_pin(LOW);
|
CE_pin(LOW);
|
||||||
delay_reset();
|
delay_reset();
|
||||||
CE_pin(HIGH);
|
CE_pin(HIGH);
|
||||||
|
|
@ -226,24 +225,28 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check frequency band
|
// Check frequency band
|
||||||
if ((m_frequency_tx >= VHF1_MIN) && (m_frequency_tx < VHF1_MAX)) {
|
if( (m_frequency_tx >= VHF1_MIN) && (m_frequency_tx < VHF1_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_VHF1; // VHF1, external VCO
|
ADF7021_REG1 = ADF7021_REG1_VHF1; // VHF1, external VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= VHF2_MIN) && (m_frequency_tx < VHF2_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= VHF2_MIN) && (m_frequency_tx < VHF2_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_VHF2; // VHF1, external VCO
|
ADF7021_REG1 = ADF7021_REG1_VHF2; // VHF1, external VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= UHF1_MIN)&&(m_frequency_tx < UHF1_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= UHF1_MIN)&&(m_frequency_tx < UHF1_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= UHF2_MIN)&&(m_frequency_tx < UHF2_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= UHF2_MIN)&&(m_frequency_tx < UHF2_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF2; // UHF2, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF2; // UHF2, internal VCO
|
||||||
div2 = 2U;
|
div2 = 2U;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (div2 == 1U)
|
if(div2 == 1U)
|
||||||
f_div = 2U;
|
f_div = 2U;
|
||||||
else
|
else
|
||||||
f_div = 1U;
|
f_div = 1U;
|
||||||
|
|
@ -266,17 +269,14 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
case STATE_NXDN:
|
case STATE_NXDN:
|
||||||
AFC_OFFSET = AFC_OFFSET_NXDN;
|
AFC_OFFSET = AFC_OFFSET_NXDN;
|
||||||
break;
|
break;
|
||||||
case STATE_M17:
|
|
||||||
AFC_OFFSET = AFC_OFFSET_M17;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (div2 == 1U)
|
if( div2 == 1U )
|
||||||
divider = (m_frequency_rx - 100000 + AFC_OFFSET) / (ADF7021_PFD / 2U);
|
divider = (m_frequency_rx - 100000 + AFC_OFFSET) / (ADF7021_PFD / 2U);
|
||||||
else
|
else
|
||||||
divider = (m_frequency_rx - 100000 + (2 * AFC_OFFSET)) / ADF7021_PFD;
|
divider = (m_frequency_rx - 100000 + (2*AFC_OFFSET)) / ADF7021_PFD;
|
||||||
|
|
||||||
m_RX_N_divider = floor(divider);
|
m_RX_N_divider = floor(divider);
|
||||||
divider = (divider - m_RX_N_divider) * 32768;
|
divider = (divider - m_RX_N_divider) * 32768;
|
||||||
|
|
@ -293,7 +293,7 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
ADF7021_RX_REG0 |= (uint32_t) m_RX_N_divider << 19; // frequency;
|
ADF7021_RX_REG0 |= (uint32_t) m_RX_N_divider << 19; // frequency;
|
||||||
ADF7021_RX_REG0 |= (uint32_t) m_RX_F_divider << 4; // frequency;
|
ADF7021_RX_REG0 |= (uint32_t) m_RX_F_divider << 4; // frequency;
|
||||||
|
|
||||||
if (div2 == 1U)
|
if( div2 == 1U )
|
||||||
divider = m_frequency_tx / (ADF7021_PFD / 2U);
|
divider = m_frequency_tx / (ADF7021_PFD / 2U);
|
||||||
else
|
else
|
||||||
divider = m_frequency_tx / ADF7021_PFD;
|
divider = m_frequency_tx / ADF7021_PFD;
|
||||||
|
|
@ -415,7 +415,7 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_YSF:
|
case STATE_YSF:
|
||||||
// Dev: +1 symb 900/450 Hz, symb rate = 4800
|
// Dev: +1 symb 900 Hz, symb rate = 4800
|
||||||
|
|
||||||
ADF7021_REG3 = (m_LoDevYSF ? ADF7021_REG3_YSF_L : ADF7021_REG3_YSF_H);
|
ADF7021_REG3 = (m_LoDevYSF ? ADF7021_REG3_YSF_L : ADF7021_REG3_YSF_H);
|
||||||
ADF7021_REG10 = ADF7021_REG10_YSF;
|
ADF7021_REG10 = ADF7021_REG10_YSF;
|
||||||
|
|
@ -495,33 +495,6 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_M17:
|
|
||||||
// Dev: +1 symb 800 Hz, symb rate = 4800
|
|
||||||
|
|
||||||
ADF7021_REG3 = ADF7021_REG3_M17;
|
|
||||||
ADF7021_REG10 = ADF7021_REG10_M17;
|
|
||||||
|
|
||||||
// K=32
|
|
||||||
ADF7021_REG4 = (uint32_t) 0b0100 << 0; // register 4
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b011 << 4; // mode, 4FSK
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b0 << 7;
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b11 << 8;
|
|
||||||
ADF7021_REG4 |= (uint32_t) ADF7021_DISC_BW_M17 << 10; // Disc BW
|
|
||||||
ADF7021_REG4 |= (uint32_t) ADF7021_POST_BW_M17 << 20; // Post dem BW
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b10 << 30; // IF filter (25 kHz)
|
|
||||||
|
|
||||||
ADF7021_REG13 = (uint32_t) 0b1101 << 0; // register 13
|
|
||||||
ADF7021_REG13 |= (uint32_t) ADF7021_SLICER_TH_M17 << 4; // slicer threshold
|
|
||||||
|
|
||||||
ADF7021_REG2 = (uint32_t) 0b10 << 28; // invert data (and RC alpha = 0.5)
|
|
||||||
ADF7021_REG2 |= (uint32_t) (m_m17Dev / div2) << 19; // deviation
|
|
||||||
#if defined(ADF7021_DISABLE_RC_4FSK)
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b011 << 4; // modulation (4FSK)
|
|
||||||
#else
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -614,7 +587,7 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DUPLEX)
|
#if defined(DUPLEX)
|
||||||
if (m_duplex && (modemState != STATE_CWID && modemState != STATE_POCSAG))
|
if(m_duplex && (modemState != STATE_CWID && modemState != STATE_POCSAG))
|
||||||
ifConf2(modemState);
|
ifConf2(modemState);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -676,7 +649,7 @@ void CIO::ifConf2(MMDVM_STATE modemState)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_YSF:
|
case STATE_YSF:
|
||||||
// Dev: +1 symb 900/450 Hz, symb rate = 4800
|
// Dev: +1 symb 900 Hz, symb rate = 4800
|
||||||
|
|
||||||
ADF7021_REG3 = (m_LoDevYSF ? ADF7021_REG3_YSF_L : ADF7021_REG3_YSF_H);
|
ADF7021_REG3 = (m_LoDevYSF ? ADF7021_REG3_YSF_L : ADF7021_REG3_YSF_H);
|
||||||
ADF7021_REG10 = ADF7021_REG10_YSF;
|
ADF7021_REG10 = ADF7021_REG10_YSF;
|
||||||
|
|
@ -744,29 +717,6 @@ void CIO::ifConf2(MMDVM_STATE modemState)
|
||||||
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_M17:
|
|
||||||
// Dev: +1 symb 800 Hz, symb rate = 4800
|
|
||||||
|
|
||||||
ADF7021_REG3 = ADF7021_REG3_M17;
|
|
||||||
ADF7021_REG10 = ADF7021_REG10_M17;
|
|
||||||
|
|
||||||
// K=32
|
|
||||||
ADF7021_REG4 = (uint32_t) 0b0100 << 0; // register 4
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b011 << 4; // mode, 4FSK
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b0 << 7;
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b11 << 8;
|
|
||||||
ADF7021_REG4 |= (uint32_t) ADF7021_DISC_BW_M17 << 10; // Disc BW
|
|
||||||
ADF7021_REG4 |= (uint32_t) ADF7021_POST_BW_M17 << 20; // Post dem BW
|
|
||||||
ADF7021_REG4 |= (uint32_t) 0b10 << 30; // IF filter (25 kHz)
|
|
||||||
|
|
||||||
ADF7021_REG13 = (uint32_t) 0b1101 << 0; // register 13
|
|
||||||
ADF7021_REG13 |= (uint32_t) ADF7021_SLICER_TH_M17 << 4; // slicer threshold
|
|
||||||
|
|
||||||
ADF7021_REG2 = (uint32_t) 0b10 << 28; // invert data (and RC alpha = 0.5)
|
|
||||||
ADF7021_REG2 |= (uint32_t) (m_m17Dev / div2) << 19; // deviation
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -853,23 +803,25 @@ void CIO::interrupt()
|
||||||
// possibly this is a design problem of the RF7021 board or too long wires
|
// possibly this is a design problem of the RF7021 board or too long wires
|
||||||
// on the breadboard build
|
// on the breadboard build
|
||||||
// but normally this will not hurt too much
|
// but normally this will not hurt too much
|
||||||
if (clk == last_clk)
|
if (clk == last_clk) {
|
||||||
return;
|
return;
|
||||||
else
|
} else {
|
||||||
last_clk = clk;
|
last_clk = clk;
|
||||||
|
}
|
||||||
|
|
||||||
// we set the TX bit at TXD low, sampling of ADF7021 happens at rising clock
|
// we set the TX bit at TXD low, sampling of ADF7021 happens at rising clock
|
||||||
if (m_tx && clk == 0U) {
|
if (m_tx && clk == 0U) {
|
||||||
|
|
||||||
m_txBuffer.get(bit, m_control);
|
m_txBuffer.get(bit, m_control);
|
||||||
even = !even;
|
even = !even;
|
||||||
|
|
||||||
#if defined(BIDIR_DATA_PIN)
|
#if defined(BIDIR_DATA_PIN)
|
||||||
if (bit)
|
if(bit)
|
||||||
RXD_pin_write(HIGH);
|
RXD_pin_write(HIGH);
|
||||||
else
|
else
|
||||||
RXD_pin_write(LOW);
|
RXD_pin_write(LOW);
|
||||||
#else
|
#else
|
||||||
if (bit)
|
if(bit)
|
||||||
TXD_pin(HIGH);
|
TXD_pin(HIGH);
|
||||||
else
|
else
|
||||||
TXD_pin(LOW);
|
TXD_pin(LOW);
|
||||||
|
|
@ -901,7 +853,7 @@ void CIO::interrupt()
|
||||||
|
|
||||||
// we sample the RX bit at rising TXD clock edge, so TXD must be 1 and we are not in tx mode
|
// we sample the RX bit at rising TXD clock edge, so TXD must be 1 and we are not in tx mode
|
||||||
if (!m_tx && clk == 1U && !m_duplex) {
|
if (!m_tx && clk == 1U && !m_duplex) {
|
||||||
if (RXD_pin())
|
if(RXD_pin())
|
||||||
bit = 1U;
|
bit = 1U;
|
||||||
else
|
else
|
||||||
bit = 0U;
|
bit = 0U;
|
||||||
|
|
@ -909,7 +861,7 @@ void CIO::interrupt()
|
||||||
m_rxBuffer.put(bit, m_control);
|
m_rxBuffer.put(bit, m_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (torx_request && even == ADF7021_EVEN_BIT && m_tx && clk == 0U) {
|
if (torx_request == true && even == ADF7021_EVEN_BIT && m_tx && clk == 0U) {
|
||||||
// that is absolutely crucial in 4FSK, see datasheet:
|
// that is absolutely crucial in 4FSK, see datasheet:
|
||||||
// enable sle after 1/4 tBit == 26uS when sending MSB (even == false) and clock is low
|
// enable sle after 1/4 tBit == 26uS when sending MSB (even == false) and clock is low
|
||||||
delay_us(26U);
|
delay_us(26U);
|
||||||
|
|
@ -935,10 +887,10 @@ void CIO::interrupt()
|
||||||
m_modeTimerCnt++;
|
m_modeTimerCnt++;
|
||||||
m_int1counter++;
|
m_int1counter++;
|
||||||
|
|
||||||
if (m_scanPauseCnt >= SCAN_PAUSE)
|
if(m_scanPauseCnt >= SCAN_PAUSE)
|
||||||
m_scanPauseCnt = 0U;
|
m_scanPauseCnt = 0U;
|
||||||
|
|
||||||
if (m_scanPauseCnt != 0U)
|
if(m_scanPauseCnt != 0U)
|
||||||
m_scanPauseCnt++;
|
m_scanPauseCnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -947,8 +899,8 @@ void CIO::interrupt2()
|
||||||
{
|
{
|
||||||
uint8_t bit = 0U;
|
uint8_t bit = 0U;
|
||||||
|
|
||||||
if (m_duplex) {
|
if(m_duplex) {
|
||||||
if (RXD2_pin())
|
if(RXD2_pin())
|
||||||
bit = 1U;
|
bit = 1U;
|
||||||
else
|
else
|
||||||
bit = 0U;
|
bit = 0U;
|
||||||
|
|
@ -992,7 +944,7 @@ void CIO::setRX(bool doSle)
|
||||||
Data_dir_out(false); // Data pin input mode
|
Data_dir_out(false); // Data pin input mode
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!doSle) {
|
if(!doSle) {
|
||||||
torx_request = true;
|
torx_request = true;
|
||||||
while(torx_request) { asm volatile ("nop"); }
|
while(torx_request) { asm volatile ("nop"); }
|
||||||
}
|
}
|
||||||
|
|
@ -1003,7 +955,7 @@ void CIO::setPower(uint8_t power)
|
||||||
m_power = power >> 2;
|
m_power = power >> 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CIO::setDeviations(uint8_t dstarTXLevel, uint8_t dmrTXLevel, uint8_t ysfTXLevel, uint8_t p25TXLevel, uint8_t nxdnTXLevel, uint8_t m17TXLevel, uint8_t pocsagTXLevel, bool ysfLoDev)
|
void CIO::setDeviations(uint8_t dstarTXLevel, uint8_t dmrTXLevel, uint8_t ysfTXLevel, uint8_t p25TXLevel, uint8_t nxdnTXLevel, uint8_t pocsagTXLevel, bool ysfLoDev)
|
||||||
{
|
{
|
||||||
m_dstarDev = uint16_t((ADF7021_DEV_DSTAR * uint16_t(dstarTXLevel)) / 128U);
|
m_dstarDev = uint16_t((ADF7021_DEV_DSTAR * uint16_t(dstarTXLevel)) / 128U);
|
||||||
m_dmrDev = uint16_t((ADF7021_DEV_DMR * uint16_t(dmrTXLevel)) / 128U);
|
m_dmrDev = uint16_t((ADF7021_DEV_DMR * uint16_t(dmrTXLevel)) / 128U);
|
||||||
|
|
@ -1015,7 +967,6 @@ void CIO::setDeviations(uint8_t dstarTXLevel, uint8_t dmrTXLevel, uint8_t ysfTXL
|
||||||
|
|
||||||
m_p25Dev = uint16_t((ADF7021_DEV_P25 * uint16_t(p25TXLevel)) / 128U);
|
m_p25Dev = uint16_t((ADF7021_DEV_P25 * uint16_t(p25TXLevel)) / 128U);
|
||||||
m_nxdnDev = uint16_t((ADF7021_DEV_NXDN * uint16_t(nxdnTXLevel)) / 128U);
|
m_nxdnDev = uint16_t((ADF7021_DEV_NXDN * uint16_t(nxdnTXLevel)) / 128U);
|
||||||
m_m17Dev = uint16_t((ADF7021_DEV_M17 * uint16_t(m17TXLevel)) / 128U);
|
|
||||||
m_pocsagDev = uint16_t((ADF7021_DEV_POCSAG * uint16_t(pocsagTXLevel)) / 128U);
|
m_pocsagDev = uint16_t((ADF7021_DEV_POCSAG * uint16_t(pocsagTXLevel)) / 128U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1025,24 +976,28 @@ void CIO::updateCal()
|
||||||
float divider;
|
float divider;
|
||||||
|
|
||||||
// Check frequency band
|
// Check frequency band
|
||||||
if ((m_frequency_tx >= VHF1_MIN) && (m_frequency_tx < VHF1_MAX)) {
|
if( (m_frequency_tx >= VHF1_MIN) && (m_frequency_tx < VHF1_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_VHF1; // VHF1, external VCO
|
ADF7021_REG1 = ADF7021_REG1_VHF1; // VHF1, external VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= VHF2_MIN) && (m_frequency_tx < VHF2_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= VHF2_MIN) && (m_frequency_tx < VHF2_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_VHF2; // VHF1, external VCO
|
ADF7021_REG1 = ADF7021_REG1_VHF2; // VHF1, external VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= UHF1_MIN)&&(m_frequency_tx < UHF1_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= UHF1_MIN)&&(m_frequency_tx < UHF1_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
} else if ((m_frequency_tx >= UHF2_MIN)&&(m_frequency_tx < UHF2_MAX)) {
|
}
|
||||||
|
else if( (m_frequency_tx >= UHF2_MIN)&&(m_frequency_tx < UHF2_MAX) ) {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF2; // UHF2, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF2; // UHF2, internal VCO
|
||||||
div2 = 2U;
|
div2 = 2U;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
ADF7021_REG1 = ADF7021_REG1_UHF1; // UHF1, internal VCO
|
||||||
div2 = 1U;
|
div2 = 1U;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (div2 == 1U)
|
if(div2 == 1U)
|
||||||
f_div = 2U;
|
f_div = 2U;
|
||||||
else
|
else
|
||||||
f_div = 1U;
|
f_div = 1U;
|
||||||
|
|
@ -1052,15 +1007,8 @@ void CIO::updateCal()
|
||||||
Send_AD7021_control();
|
Send_AD7021_control();
|
||||||
|
|
||||||
ADF7021_REG2 = (uint32_t) 0b10 << 28; // invert data (and RC alpha = 0.5)
|
ADF7021_REG2 = (uint32_t) 0b10 << 28; // invert data (and RC alpha = 0.5)
|
||||||
|
ADF7021_REG2 |= (uint32_t) (m_dmrDev / div2) << 19; // deviation
|
||||||
if (m_modemState == STATE_DMR) {
|
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
||||||
ADF7021_REG2 |= (uint32_t) (m_dmrDev / div2) << 19; // DMR deviation
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK)
|
|
||||||
} else if (m_modemState == STATE_POCSAG) {
|
|
||||||
ADF7021_REG2 |= (uint32_t) (m_pocsagDev / div2) << 19; // POCSAG deviation
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b000 << 4; // modulation (2FSK)
|
|
||||||
}
|
|
||||||
|
|
||||||
ADF7021_REG2 |= (uint32_t) 0b0010; // register 2
|
ADF7021_REG2 |= (uint32_t) 0b0010; // register 2
|
||||||
ADF7021_REG2 |= (uint32_t) m_power << 13; // power level
|
ADF7021_REG2 |= (uint32_t) m_power << 13; // power level
|
||||||
ADF7021_REG2 |= (uint32_t) 0b110001 << 7; // PA
|
ADF7021_REG2 |= (uint32_t) 0b110001 << 7; // PA
|
||||||
|
|
@ -1068,7 +1016,7 @@ void CIO::updateCal()
|
||||||
AD7021_control_word = ADF7021_REG2;
|
AD7021_control_word = ADF7021_REG2;
|
||||||
Send_AD7021_control();
|
Send_AD7021_control();
|
||||||
|
|
||||||
if (div2 == 1U)
|
if( div2 == 1U )
|
||||||
divider = m_frequency_tx / (ADF7021_PFD / 2U);
|
divider = m_frequency_tx / (ADF7021_PFD / 2U);
|
||||||
else
|
else
|
||||||
divider = m_frequency_tx / ADF7021_PFD;
|
divider = m_frequency_tx / ADF7021_PFD;
|
||||||
|
|
@ -1131,11 +1079,6 @@ uint16_t CIO::devNXDN()
|
||||||
return (uint16_t)((ADF7021_PFD * m_nxdnDev) / (f_div * 65536));
|
return (uint16_t)((ADF7021_PFD * m_nxdnDev) / (f_div * 65536));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t CIO::devM17()
|
|
||||||
{
|
|
||||||
return (uint16_t)((ADF7021_PFD * m_m17Dev) / (f_div * 65536));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t CIO::devPOCSAG()
|
uint16_t CIO::devPOCSAG()
|
||||||
{
|
{
|
||||||
return (uint16_t)((ADF7021_PFD * m_pocsagDev) / (f_div * 65536));
|
return (uint16_t)((ADF7021_PFD * m_pocsagDev) / (f_div * 65536));
|
||||||
|
|
@ -1152,7 +1095,6 @@ void CIO::printConf()
|
||||||
DEBUG2("YSF +1 sym dev (Hz):", devYSF());
|
DEBUG2("YSF +1 sym dev (Hz):", devYSF());
|
||||||
DEBUG2("P25 +1 sym dev (Hz):", devP25());
|
DEBUG2("P25 +1 sym dev (Hz):", devP25());
|
||||||
DEBUG2("NXDN +1 sym dev (Hz):", devNXDN());
|
DEBUG2("NXDN +1 sym dev (Hz):", devNXDN());
|
||||||
DEBUG2("M17 +1 sym dev (Hz):", devM17());
|
|
||||||
DEBUG2("POCSAG dev (Hz):", devPOCSAG());
|
DEBUG2("POCSAG dev (Hz):", devPOCSAG());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
29
ADF7021.h
29
ADF7021.h
|
|
@ -1,5 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||||
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
|
|
@ -53,7 +52,7 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
// Support for ADF7021-N version:
|
// Support for ADF7021-N version:
|
||||||
// #define ADF7021_N_VER
|
// #define ADF7021_N_VER
|
||||||
|
|
||||||
// Enable AFC support for DMR, YSF, P25, and M17 (experimental):
|
// Enable AFC support for DMR, YSF and P25 (experimental):
|
||||||
// (AFC is already enabled by default in D-Star)
|
// (AFC is already enabled by default in D-Star)
|
||||||
// #define ADF7021_ENABLE_4FSK_AFC
|
// #define ADF7021_ENABLE_4FSK_AFC
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
// R = 4
|
// R = 4
|
||||||
// DEMOD_CLK = 2.4576 MHz (DSTAR)
|
// DEMOD_CLK = 2.4576 MHz (DSTAR)
|
||||||
// DEMOD_CLK = 4.9152 MHz (DMR, YSF_L, P25)
|
// DEMOD_CLK = 4.9152 MHz (DMR, YSF_L, P25)
|
||||||
// DEMOD_CLK = 7.3728 MHz (YSF_H, M17)
|
// DEMOD_CLK = 7.3728 MHz (YSF_H)
|
||||||
// DEMOD CLK = 3.6864 MHz (NXDN)
|
// DEMOD CLK = 3.6864 MHz (NXDN)
|
||||||
// DEMOD_CLK = 7.3728 MHz (POCSAG)
|
// DEMOD_CLK = 7.3728 MHz (POCSAG)
|
||||||
#define ADF7021_PFD 3686400.0
|
#define ADF7021_PFD 3686400.0
|
||||||
|
|
@ -88,7 +87,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_DEV_P25 22U
|
#define ADF7021_DEV_P25 22U
|
||||||
#endif
|
#endif
|
||||||
#define ADF7021_DEV_NXDN 13U
|
#define ADF7021_DEV_NXDN 13U
|
||||||
#define ADF7021_DEV_M17 28U
|
|
||||||
#define ADF7021_DEV_POCSAG 160U
|
#define ADF7021_DEV_POCSAG 160U
|
||||||
|
|
||||||
// TX/RX CLOCK register (REG 03)
|
// TX/RX CLOCK register (REG 03)
|
||||||
|
|
@ -99,14 +97,12 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_REG3_YSF_H 0x2A4C0493
|
#define ADF7021_REG3_YSF_H 0x2A4C0493
|
||||||
#define ADF7021_REG3_P25 0x2A4C04D3
|
#define ADF7021_REG3_P25 0x2A4C04D3
|
||||||
#define ADF7021_REG3_NXDN 0x2A4C04D3
|
#define ADF7021_REG3_NXDN 0x2A4C04D3
|
||||||
#define ADF7021_REG3_M17 0x2A4C04D3
|
|
||||||
#else
|
#else
|
||||||
#define ADF7021_REG3_DMR 0x2A4C80D3
|
#define ADF7021_REG3_DMR 0x2A4C80D3
|
||||||
#define ADF7021_REG3_YSF_L 0x2A4C80D3
|
#define ADF7021_REG3_YSF_L 0x2A4C80D3
|
||||||
#define ADF7021_REG3_YSF_H 0x2A4CC093
|
#define ADF7021_REG3_YSF_H 0x2A4CC093
|
||||||
#define ADF7021_REG3_P25 0x2A4C80D3
|
#define ADF7021_REG3_P25 0x2A4C80D3
|
||||||
#define ADF7021_REG3_NXDN 0x2A4CC113
|
#define ADF7021_REG3_NXDN 0x2A4CC113
|
||||||
#define ADF7021_REG3_M17 0x2A4CC093
|
|
||||||
#endif
|
#endif
|
||||||
#define ADF7021_REG3_POCSAG 0x2A4F0093
|
#define ADF7021_REG3_POCSAG 0x2A4F0093
|
||||||
|
|
||||||
|
|
@ -118,7 +114,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_DISC_BW_YSF_H 516U // K=28
|
#define ADF7021_DISC_BW_YSF_H 516U // K=28
|
||||||
#define ADF7021_DISC_BW_P25 394U // K=32
|
#define ADF7021_DISC_BW_P25 394U // K=32
|
||||||
#define ADF7021_DISC_BW_NXDN 295U // K=32
|
#define ADF7021_DISC_BW_NXDN 295U // K=32
|
||||||
#define ADF7021_DISC_BW_M17 590U // K=32
|
|
||||||
#define ADF7021_DISC_BW_POCSAG 406U // K=22
|
#define ADF7021_DISC_BW_POCSAG 406U // K=22
|
||||||
|
|
||||||
// Post demodulator bandwith (REG 04)
|
// Post demodulator bandwith (REG 04)
|
||||||
|
|
@ -127,7 +122,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_POST_BW_YSF 20U
|
#define ADF7021_POST_BW_YSF 20U
|
||||||
#define ADF7021_POST_BW_P25 6U
|
#define ADF7021_POST_BW_P25 6U
|
||||||
#define ADF7021_POST_BW_NXDN 7U
|
#define ADF7021_POST_BW_NXDN 7U
|
||||||
#define ADF7021_POST_BW_M17 7U // Test
|
|
||||||
#define ADF7021_POST_BW_POCSAG 1U
|
#define ADF7021_POST_BW_POCSAG 1U
|
||||||
|
|
||||||
// IF filter (REG 05)
|
// IF filter (REG 05)
|
||||||
|
|
@ -145,31 +139,26 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_REG10_YSF 0x01FE473A
|
#define ADF7021_REG10_YSF 0x01FE473A
|
||||||
#define ADF7021_REG10_P25 0x01FE473A
|
#define ADF7021_REG10_P25 0x01FE473A
|
||||||
#define ADF7021_REG10_NXDN 0x01FE473A
|
#define ADF7021_REG10_NXDN 0x01FE473A
|
||||||
#define ADF7021_REG10_M17 0x01FE473A
|
|
||||||
#if defined(ADF7021_AFC_POS)
|
#if defined(ADF7021_AFC_POS)
|
||||||
#define AFC_OFFSET_DMR -250
|
#define AFC_OFFSET_DMR -250
|
||||||
#define AFC_OFFSET_YSF -250
|
#define AFC_OFFSET_YSF -250
|
||||||
#define AFC_OFFSET_P25 -250
|
#define AFC_OFFSET_P25 -250
|
||||||
#define AFC_OFFSET_NXDN -250
|
#define AFC_OFFSET_NXDN -250
|
||||||
#define AFC_OFFSET_M17 -250
|
|
||||||
#else
|
#else
|
||||||
#define AFC_OFFSET_DMR 250
|
#define AFC_OFFSET_DMR 250
|
||||||
#define AFC_OFFSET_YSF 250
|
#define AFC_OFFSET_YSF 250
|
||||||
#define AFC_OFFSET_P25 250
|
#define AFC_OFFSET_P25 250
|
||||||
#define AFC_OFFSET_NXDN 250
|
#define AFC_OFFSET_NXDN 250
|
||||||
#define AFC_OFFSET_M17 250
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define ADF7021_REG10_DMR 0x049E472A
|
#define ADF7021_REG10_DMR 0x049E472A
|
||||||
#define ADF7021_REG10_YSF 0x049E472A
|
#define ADF7021_REG10_YSF 0x049E472A
|
||||||
#define ADF7021_REG10_P25 0x049E472A
|
#define ADF7021_REG10_P25 0x049E472A
|
||||||
#define ADF7021_REG10_NXDN 0x049E472A
|
#define ADF7021_REG10_NXDN 0x049E472A
|
||||||
#define ADF7021_REG10_M17 0x049E472A
|
|
||||||
#define AFC_OFFSET_DMR 0
|
#define AFC_OFFSET_DMR 0
|
||||||
#define AFC_OFFSET_YSF 0
|
#define AFC_OFFSET_YSF 0
|
||||||
#define AFC_OFFSET_P25 0
|
#define AFC_OFFSET_P25 0
|
||||||
#define AFC_OFFSET_NXDN 0
|
#define AFC_OFFSET_NXDN 0
|
||||||
#define AFC_OFFSET_M17 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****** Support for 12.2880 MHz TCXO ******/
|
/****** Support for 12.2880 MHz TCXO ******/
|
||||||
|
|
@ -177,7 +166,7 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
|
|
||||||
// R = 2
|
// R = 2
|
||||||
// DEMOD_CLK = 2.4576 MHz (DSTAR)
|
// DEMOD_CLK = 2.4576 MHz (DSTAR)
|
||||||
// DEMOD_CLK = 6.1440 MHz (DMR, YSF_H, YSF_L, P25, M17)
|
// DEMOD_CLK = 6.1440 MHz (DMR, YSF_H, YSF_L, P25)
|
||||||
// DEMOD_CLK = 3.0720 MHz (NXDN)
|
// DEMOD_CLK = 3.0720 MHz (NXDN)
|
||||||
// DEMOD_CLK = 6.1440 MHz (POCSAG)
|
// DEMOD_CLK = 6.1440 MHz (POCSAG)
|
||||||
#define ADF7021_PFD 6144000.0
|
#define ADF7021_PFD 6144000.0
|
||||||
|
|
@ -199,7 +188,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_DEV_P25 13U
|
#define ADF7021_DEV_P25 13U
|
||||||
#endif
|
#endif
|
||||||
#define ADF7021_DEV_NXDN 8U
|
#define ADF7021_DEV_NXDN 8U
|
||||||
#define ADF7021_DEV_M17 17U
|
|
||||||
#define ADF7021_DEV_POCSAG 96U
|
#define ADF7021_DEV_POCSAG 96U
|
||||||
|
|
||||||
// TX/RX CLOCK register (REG 03)
|
// TX/RX CLOCK register (REG 03)
|
||||||
|
|
@ -210,14 +198,12 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_REG3_YSF_H 0x29EC0493
|
#define ADF7021_REG3_YSF_H 0x29EC0493
|
||||||
#define ADF7021_REG3_P25 0x29EC0493
|
#define ADF7021_REG3_P25 0x29EC0493
|
||||||
#define ADF7021_REG3_NXDN 0x29EC0493
|
#define ADF7021_REG3_NXDN 0x29EC0493
|
||||||
#define ADF7021_REG3_M17 0x29EC0493
|
|
||||||
#else
|
#else
|
||||||
#define ADF7021_REG3_DMR 0x29ECA093
|
#define ADF7021_REG3_DMR 0x29ECA093
|
||||||
#define ADF7021_REG3_YSF_L 0x29ECA093
|
#define ADF7021_REG3_YSF_L 0x29ECA093
|
||||||
#define ADF7021_REG3_YSF_H 0x29ECA093
|
#define ADF7021_REG3_YSF_H 0x29ECA093
|
||||||
#define ADF7021_REG3_P25 0x29ECA093
|
#define ADF7021_REG3_P25 0x29ECA093
|
||||||
#define ADF7021_REG3_NXDN 0x29ECA113
|
#define ADF7021_REG3_NXDN 0x29ECA113
|
||||||
#define ADF7021_REG3_M17 0x29ECA093
|
|
||||||
#endif
|
#endif
|
||||||
#define ADF7021_REG3_POCSAG 0x29EE8093
|
#define ADF7021_REG3_POCSAG 0x29EE8093
|
||||||
|
|
||||||
|
|
@ -229,7 +215,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_DISC_BW_YSF_H 430U // K=28
|
#define ADF7021_DISC_BW_YSF_H 430U // K=28
|
||||||
#define ADF7021_DISC_BW_P25 493U // K=32
|
#define ADF7021_DISC_BW_P25 493U // K=32
|
||||||
#define ADF7021_DISC_BW_NXDN 246U // K=32
|
#define ADF7021_DISC_BW_NXDN 246U // K=32
|
||||||
#define ADF7021_DISC_BW_M17 492U // K=32
|
|
||||||
#define ADF7021_DISC_BW_POCSAG 338U // K=22
|
#define ADF7021_DISC_BW_POCSAG 338U // K=22
|
||||||
|
|
||||||
// Post demodulator bandwith (REG 04)
|
// Post demodulator bandwith (REG 04)
|
||||||
|
|
@ -238,7 +223,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_POST_BW_YSF 20U
|
#define ADF7021_POST_BW_YSF 20U
|
||||||
#define ADF7021_POST_BW_P25 6U
|
#define ADF7021_POST_BW_P25 6U
|
||||||
#define ADF7021_POST_BW_NXDN 8U
|
#define ADF7021_POST_BW_NXDN 8U
|
||||||
#define ADF7021_POST_BW_M17 8U // Test
|
|
||||||
#define ADF7021_POST_BW_POCSAG 1U
|
#define ADF7021_POST_BW_POCSAG 1U
|
||||||
|
|
||||||
// IF filter (REG 05)
|
// IF filter (REG 05)
|
||||||
|
|
@ -256,31 +240,26 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_REG10_YSF 0x01FE557A
|
#define ADF7021_REG10_YSF 0x01FE557A
|
||||||
#define ADF7021_REG10_P25 0x01FE557A
|
#define ADF7021_REG10_P25 0x01FE557A
|
||||||
#define ADF7021_REG10_NXDN 0x01FE557A
|
#define ADF7021_REG10_NXDN 0x01FE557A
|
||||||
#define ADF7021_REG10_M17 0x01FE557A
|
|
||||||
#if defined(ADF7021_AFC_POS)
|
#if defined(ADF7021_AFC_POS)
|
||||||
#define AFC_OFFSET_DMR -250
|
#define AFC_OFFSET_DMR -250
|
||||||
#define AFC_OFFSET_YSF -250
|
#define AFC_OFFSET_YSF -250
|
||||||
#define AFC_OFFSET_P25 -250
|
#define AFC_OFFSET_P25 -250
|
||||||
#define AFC_OFFSET_NXDN -250
|
#define AFC_OFFSET_NXDN -250
|
||||||
#define AFC_OFFSET_M17 -250
|
|
||||||
#else
|
#else
|
||||||
#define AFC_OFFSET_DMR 250
|
#define AFC_OFFSET_DMR 250
|
||||||
#define AFC_OFFSET_YSF 250
|
#define AFC_OFFSET_YSF 250
|
||||||
#define AFC_OFFSET_P25 250
|
#define AFC_OFFSET_P25 250
|
||||||
#define AFC_OFFSET_NXDN 250
|
#define AFC_OFFSET_NXDN 250
|
||||||
#define AFC_OFFSET_M17 250
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define ADF7021_REG10_DMR 0x049E556A
|
#define ADF7021_REG10_DMR 0x049E556A
|
||||||
#define ADF7021_REG10_YSF 0x049E556A
|
#define ADF7021_REG10_YSF 0x049E556A
|
||||||
#define ADF7021_REG10_P25 0x049E556A
|
#define ADF7021_REG10_P25 0x049E556A
|
||||||
#define ADF7021_REG10_NXDN 0x049E556A
|
#define ADF7021_REG10_NXDN 0x049E556A
|
||||||
#define ADF7021_REG10_M17 0x049E556A
|
|
||||||
#define AFC_OFFSET_DMR 0
|
#define AFC_OFFSET_DMR 0
|
||||||
#define AFC_OFFSET_YSF 0
|
#define AFC_OFFSET_YSF 0
|
||||||
#define AFC_OFFSET_P25 0
|
#define AFC_OFFSET_P25 0
|
||||||
#define AFC_OFFSET_NXDN 0
|
#define AFC_OFFSET_NXDN 0
|
||||||
#define AFC_OFFSET_M17 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -294,7 +273,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_SLICER_TH_YSF_H 69U
|
#define ADF7021_SLICER_TH_YSF_H 69U
|
||||||
#define ADF7021_SLICER_TH_P25 43U
|
#define ADF7021_SLICER_TH_P25 43U
|
||||||
#define ADF7021_SLICER_TH_NXDN 26U
|
#define ADF7021_SLICER_TH_NXDN 26U
|
||||||
#define ADF7021_SLICER_TH_M17 59U // Test
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
@ -304,7 +282,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf
|
||||||
#define ADF7021_SLICER_TH_YSF_H 75U
|
#define ADF7021_SLICER_TH_YSF_H 75U
|
||||||
#define ADF7021_SLICER_TH_P25 47U
|
#define ADF7021_SLICER_TH_P25 47U
|
||||||
#define ADF7021_SLICER_TH_NXDN 26U
|
#define ADF7021_SLICER_TH_NXDN 26U
|
||||||
#define ADF7021_SLICER_TH_M17 59U // Test
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
8
BUILD.md
8
BUILD.md
|
|
@ -483,14 +483,6 @@ Please check here for detailed instructions:
|
||||||
|
|
||||||
- make mmdvm_hs_hat: upload the firmware to MMDVM_HS_Hat board (using internal RPi serial port)
|
- make mmdvm_hs_hat: upload the firmware to MMDVM_HS_Hat board (using internal RPi serial port)
|
||||||
|
|
||||||
- make nano-hotspot: upload the firmware to Nano hotSPOT board (using internal serial port)
|
|
||||||
|
|
||||||
- make nano-dv: upload the firmware to NanoDV board (using internal serial port)
|
|
||||||
|
|
||||||
- make d2rg_mmdvm_hs: upload the firmware to D2RG MMDVM_HS board (using internal serial port)
|
|
||||||
|
|
||||||
- make skybridge: upload the firmware to SkyBridge HotSpot board (using internal serial port)
|
|
||||||
|
|
||||||
- make dfu [devser=/dev/ttyXXX]: upload firmware using USB bootloader. "devser" is optional, and it corresponds to the USB serial port device name. This option permits to perform a reset to enter to booloader mode (DFU). If you don't use "devser", you have to press the reset button of the ZUMspot just before using this command.
|
- make dfu [devser=/dev/ttyXXX]: upload firmware using USB bootloader. "devser" is optional, and it corresponds to the USB serial port device name. This option permits to perform a reset to enter to booloader mode (DFU). If you don't use "devser", you have to press the reset button of the ZUMspot just before using this command.
|
||||||
|
|
||||||
- make serial devser=/dev/ttyXXX: upload standard firmware using serial port bootloader method.
|
- make serial devser=/dev/ttyXXX: upload standard firmware using serial port bootloader method.
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ const struct {
|
||||||
{',', 0xEEAEE000U, 22U},
|
{',', 0xEEAEE000U, 22U},
|
||||||
{'-', 0xEAAE0000U, 18U},
|
{'-', 0xEAAE0000U, 18U},
|
||||||
{'=', 0xEAB80000U, 16U},
|
{'=', 0xEAB80000U, 16U},
|
||||||
{'.', 0xBAEB8000U, 20U},
|
|
||||||
{' ', 0x00000000U, 4U},
|
{' ', 0x00000000U, 4U},
|
||||||
{0U, 0x00000000U, 0U}
|
{0U, 0x00000000U, 0U}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
|
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016 by Colin Durbridge G4EML
|
* Copyright (C) 2016 by Colin Durbridge G4EML
|
||||||
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -144,7 +144,7 @@ uint8_t CCalDMR::write(const uint8_t* data, uint8_t length)
|
||||||
if (m_transmit && m_state == DMRCAL1K_IDLE && m_calState == STATE_DMRDMO1K)
|
if (m_transmit && m_state == DMRCAL1K_IDLE && m_calState == STATE_DMRDMO1K)
|
||||||
m_state = DMRCAL1K_VH;
|
m_state = DMRCAL1K_VH;
|
||||||
|
|
||||||
if (m_transmit)
|
if (!m_transmit)
|
||||||
io.ifConf(STATE_DMR, true);
|
io.ifConf(STATE_DMR, true);
|
||||||
|
|
||||||
return 0U;
|
return 0U;
|
||||||
|
|
|
||||||
19
Config.h
19
Config.h
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,12 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
// 9) LoneStar USB Stick ADF7071
|
|
||||||
// #define LONESTAR_USB
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -64,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
// #define STM32_USART1_HOST
|
// #define STM32_USART1_HOST
|
||||||
#define STM32_USB_HOST
|
#define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -77,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -97,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -115,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
34
DStarRX.cpp
34
DStarRX.cpp
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2009-2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2009-2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -25,23 +25,23 @@
|
||||||
const unsigned int MAX_SYNC_BITS = 100U * DSTAR_DATA_LENGTH_BITS;
|
const unsigned int MAX_SYNC_BITS = 100U * DSTAR_DATA_LENGTH_BITS;
|
||||||
|
|
||||||
// D-Star preamble sequence (only 32 bits of 101010...)
|
// D-Star preamble sequence (only 32 bits of 101010...)
|
||||||
const uint64_t PREAMBLE_MASK = 0x00000000FFFFFFFFU;
|
const uint32_t PREAMBLE_MASK = 0xFFFFFFFFU;
|
||||||
const uint64_t PREAMBLE_DATA = 0x00000000AAAAAAAAU;
|
const uint32_t PREAMBLE_DATA = 0xAAAAAAAAU;
|
||||||
const uint8_t PREAMBLE_ERRS = 2U;
|
const uint8_t PREAMBLE_ERRS = 2U;
|
||||||
|
|
||||||
// D-Star bit order version of 0x55 0x55 0x6E 0x0A
|
// D-Star bit order version of 0x55 0x55 0x6E 0x0A
|
||||||
const uint64_t FRAME_SYNC_DATA = 0x0000000000557650U;
|
const uint32_t FRAME_SYNC_DATA = 0x00557650U;
|
||||||
const uint64_t FRAME_SYNC_MASK = 0x0000000000FFFFFFU;
|
const uint32_t FRAME_SYNC_MASK = 0x00FFFFFFU;
|
||||||
const uint8_t FRAME_SYNC_ERRS = 2U;
|
const uint8_t FRAME_SYNC_ERRS = 2U;
|
||||||
|
|
||||||
// D-Star bit order version of 0x55 0x2D 0x16
|
// D-Star bit order version of 0x55 0x2D 0x16
|
||||||
const uint64_t DATA_SYNC_DATA = 0x0000000000AAB468U;
|
const uint32_t DATA_SYNC_DATA = 0x00AAB468U;
|
||||||
const uint64_t DATA_SYNC_MASK = 0x0000000000FFFFFFU;
|
const uint32_t DATA_SYNC_MASK = 0x00FFFFFFU;
|
||||||
const uint8_t DATA_SYNC_ERRS = 3U;
|
const uint8_t DATA_SYNC_ERRS = 3U;
|
||||||
|
|
||||||
// D-Star bit order version of 0x55 0x55 0xC8 0x7A
|
// D-Star bit order version of 0x55 0x55 0xC8 0x7A
|
||||||
const uint64_t END_SYNC_DATA = 0x0000AAAAAAAA135EU;
|
const uint32_t END_SYNC_DATA = 0xAAAA135EU;
|
||||||
const uint64_t END_SYNC_MASK = 0x0000FFFFFFFFFFFFU;
|
const uint32_t END_SYNC_MASK = 0xFFFFFFFFU;
|
||||||
const uint8_t END_SYNC_ERRS = 1U;
|
const uint8_t END_SYNC_ERRS = 1U;
|
||||||
|
|
||||||
const uint8_t BIT_MASK_TABLE0[] = {0x7FU, 0xBFU, 0xDFU, 0xEFU, 0xF7U, 0xFBU, 0xFDU, 0xFEU};
|
const uint8_t BIT_MASK_TABLE0[] = {0x7FU, 0xBFU, 0xDFU, 0xEFU, 0xF7U, 0xFBU, 0xFDU, 0xFEU};
|
||||||
|
|
@ -284,7 +284,7 @@ void CDStarRX::processNone(bool bit)
|
||||||
m_patternBuffer |= 0x01U;
|
m_patternBuffer |= 0x01U;
|
||||||
|
|
||||||
// Fuzzy matching of the preamble sync sequence
|
// Fuzzy matching of the preamble sync sequence
|
||||||
if (countBits64((m_patternBuffer & PREAMBLE_MASK) ^ PREAMBLE_DATA) <= PREAMBLE_ERRS) {
|
if (countBits32((m_patternBuffer & PREAMBLE_MASK) ^ PREAMBLE_DATA) <= PREAMBLE_ERRS) {
|
||||||
|
|
||||||
// Extend scan period in D-Star, once preamble is detected
|
// Extend scan period in D-Star, once preamble is detected
|
||||||
m_modeTimerCnt = 0;
|
m_modeTimerCnt = 0;
|
||||||
|
|
@ -295,7 +295,7 @@ void CDStarRX::processNone(bool bit)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fuzzy matching of the frame sync sequence
|
// Fuzzy matching of the frame sync sequence
|
||||||
if (countBits64((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) <= FRAME_SYNC_ERRS) {
|
if (countBits32((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) <= FRAME_SYNC_ERRS) {
|
||||||
DEBUG1("DStarRX: found frame sync in None, fuzzy");
|
DEBUG1("DStarRX: found frame sync in None, fuzzy");
|
||||||
|
|
||||||
::memset(m_rxBuffer, 0x00U, DSTAR_FEC_SECTION_LENGTH_BYTES);
|
::memset(m_rxBuffer, 0x00U, DSTAR_FEC_SECTION_LENGTH_BYTES);
|
||||||
|
|
@ -306,7 +306,7 @@ void CDStarRX::processNone(bool bit)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exact matching of the data sync bit sequence
|
// Exact matching of the data sync bit sequence
|
||||||
if (countBits64((m_patternBuffer & DATA_SYNC_MASK) ^ DATA_SYNC_DATA) == 0U) {
|
if (countBits32((m_patternBuffer & DATA_SYNC_MASK) ^ DATA_SYNC_DATA) == 0U) {
|
||||||
DEBUG1("DStarRX: found data sync in None, exact");
|
DEBUG1("DStarRX: found data sync in None, exact");
|
||||||
|
|
||||||
io.setDecode(true);
|
io.setDecode(true);
|
||||||
|
|
@ -370,7 +370,7 @@ void CDStarRX::processData(bool bit)
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
// Fuzzy matching of the end frame sequences
|
// Fuzzy matching of the end frame sequences
|
||||||
if (countBits64((m_patternBuffer & END_SYNC_MASK) ^ END_SYNC_DATA) <= END_SYNC_ERRS) {
|
if (countBits32((m_patternBuffer & END_SYNC_MASK) ^ END_SYNC_DATA) <= END_SYNC_ERRS) {
|
||||||
DEBUG1("DStarRX: Found end sync in Data");
|
DEBUG1("DStarRX: Found end sync in Data");
|
||||||
io.setDecode(false);
|
io.setDecode(false);
|
||||||
|
|
||||||
|
|
@ -383,7 +383,7 @@ void CDStarRX::processData(bool bit)
|
||||||
// Fuzzy matching of the data sync bit sequence
|
// Fuzzy matching of the data sync bit sequence
|
||||||
bool syncSeen = false;
|
bool syncSeen = false;
|
||||||
if (m_rxBufferBits >= (DSTAR_DATA_LENGTH_BITS - 3U)) {
|
if (m_rxBufferBits >= (DSTAR_DATA_LENGTH_BITS - 3U)) {
|
||||||
if (countBits64((m_patternBuffer & DATA_SYNC_MASK) ^ DATA_SYNC_DATA) <= DATA_SYNC_ERRS) {
|
if (countBits32((m_patternBuffer & DATA_SYNC_MASK) ^ DATA_SYNC_DATA) <= DATA_SYNC_ERRS) {
|
||||||
m_rxBufferBits = DSTAR_DATA_LENGTH_BITS;
|
m_rxBufferBits = DSTAR_DATA_LENGTH_BITS;
|
||||||
m_dataBits = MAX_SYNC_BITS;
|
m_dataBits = MAX_SYNC_BITS;
|
||||||
syncSeen = true;
|
syncSeen = true;
|
||||||
|
|
@ -393,9 +393,9 @@ void CDStarRX::processData(bool bit)
|
||||||
// Check to see if the sync is arriving late
|
// Check to see if the sync is arriving late
|
||||||
if (m_rxBufferBits == DSTAR_DATA_LENGTH_BITS && !syncSeen) {
|
if (m_rxBufferBits == DSTAR_DATA_LENGTH_BITS && !syncSeen) {
|
||||||
for (uint8_t i = 1U; i <= 3U; i++) {
|
for (uint8_t i = 1U; i <= 3U; i++) {
|
||||||
uint64_t syncMask = DATA_SYNC_MASK >> i;
|
uint32_t syncMask = DATA_SYNC_MASK >> i;
|
||||||
uint64_t syncData = DATA_SYNC_DATA >> i;
|
uint32_t syncData = DATA_SYNC_DATA >> i;
|
||||||
if (countBits64((m_patternBuffer & syncMask) ^ syncData) <= DATA_SYNC_ERRS) {
|
if (countBits32((m_patternBuffer & syncMask) ^ syncData) <= DATA_SYNC_ERRS) {
|
||||||
m_rxBufferBits -= i;
|
m_rxBufferBits -= i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DSRX_STATE m_rxState;
|
DSRX_STATE m_rxState;
|
||||||
uint64_t m_patternBuffer;
|
uint32_t m_patternBuffer;
|
||||||
uint8_t m_rxBuffer[DSTAR_BUFFER_LENGTH_BITS / 8U];
|
uint8_t m_rxBuffer[DSTAR_BUFFER_LENGTH_BITS / 8U];
|
||||||
unsigned int m_rxBufferBits;
|
unsigned int m_rxBufferBits;
|
||||||
unsigned int m_dataBits;
|
unsigned int m_dataBits;
|
||||||
|
|
|
||||||
20
Globals.h
20
Globals.h
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2019 by Florian Wolters DF2ET
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -42,7 +41,6 @@ enum MMDVM_STATE {
|
||||||
STATE_P25 = 4,
|
STATE_P25 = 4,
|
||||||
STATE_NXDN = 5,
|
STATE_NXDN = 5,
|
||||||
STATE_POCSAG = 6,
|
STATE_POCSAG = 6,
|
||||||
STATE_M17 = 7,
|
|
||||||
|
|
||||||
// Dummy states start at 90
|
// Dummy states start at 90
|
||||||
STATE_DMRDMO1K = 92,
|
STATE_DMRDMO1K = 92,
|
||||||
|
|
@ -50,8 +48,7 @@ enum MMDVM_STATE {
|
||||||
STATE_CWID = 97,
|
STATE_CWID = 97,
|
||||||
STATE_DMRCAL = 98,
|
STATE_DMRCAL = 98,
|
||||||
STATE_DSTARCAL = 99,
|
STATE_DSTARCAL = 99,
|
||||||
STATE_INTCAL = 100,
|
STATE_INTCAL = 100
|
||||||
STATE_POCSAGCAL = 101
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t MARK_SLOT1 = 0x08U;
|
const uint8_t MARK_SLOT1 = 0x08U;
|
||||||
|
|
@ -78,8 +75,6 @@ const uint8_t MARK_NONE = 0x00U;
|
||||||
#include "YSFTX.h"
|
#include "YSFTX.h"
|
||||||
#include "P25RX.h"
|
#include "P25RX.h"
|
||||||
#include "P25TX.h"
|
#include "P25TX.h"
|
||||||
#include "M17RX.h"
|
|
||||||
#include "M17TX.h"
|
|
||||||
#include "NXDNRX.h"
|
#include "NXDNRX.h"
|
||||||
#include "NXDNTX.h"
|
#include "NXDNTX.h"
|
||||||
#include "POCSAGTX.h"
|
#include "POCSAGTX.h"
|
||||||
|
|
@ -88,7 +83,6 @@ const uint8_t MARK_NONE = 0x00U;
|
||||||
#include "CalDMR.h"
|
#include "CalDMR.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
#include "I2CHost.h"
|
|
||||||
|
|
||||||
extern MMDVM_STATE m_modemState;
|
extern MMDVM_STATE m_modemState;
|
||||||
extern MMDVM_STATE m_calState;
|
extern MMDVM_STATE m_calState;
|
||||||
|
|
@ -106,7 +100,6 @@ extern bool m_dmrEnable;
|
||||||
extern bool m_ysfEnable;
|
extern bool m_ysfEnable;
|
||||||
extern bool m_p25Enable;
|
extern bool m_p25Enable;
|
||||||
extern bool m_nxdnEnable;
|
extern bool m_nxdnEnable;
|
||||||
extern bool m_m17Enable;
|
|
||||||
extern bool m_pocsagEnable;
|
extern bool m_pocsagEnable;
|
||||||
|
|
||||||
extern bool m_duplex;
|
extern bool m_duplex;
|
||||||
|
|
@ -137,9 +130,6 @@ extern CYSFTX ysfTX;
|
||||||
extern CP25RX p25RX;
|
extern CP25RX p25RX;
|
||||||
extern CP25TX p25TX;
|
extern CP25TX p25TX;
|
||||||
|
|
||||||
extern CM17RX m17RX;
|
|
||||||
extern CM17TX m17TX;
|
|
||||||
|
|
||||||
extern CNXDNRX nxdnRX;
|
extern CNXDNRX nxdnRX;
|
||||||
extern CNXDNTX nxdnTX;
|
extern CNXDNTX nxdnTX;
|
||||||
|
|
||||||
|
|
@ -153,9 +143,5 @@ extern CCalRSSI calRSSI;
|
||||||
|
|
||||||
extern CCWIdTX cwIdTX;
|
extern CCWIdTX cwIdTX;
|
||||||
|
|
||||||
#if defined(STM32_I2C_HOST)
|
|
||||||
extern CI2CHost i2c;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
201
I2CHost.cpp
201
I2CHost.cpp
|
|
@ -1,201 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2019 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#if defined(STM32_I2C_HOST)
|
|
||||||
|
|
||||||
#include "Globals.h"
|
|
||||||
#include "I2CHost.h"
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
void I2C2_EV_IRQHandler(void) {
|
|
||||||
i2c.I2C_EVHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2C2_ER_IRQHandler(void) {
|
|
||||||
if (I2C_GetITStatus(I2C2, I2C_IT_AF)) {
|
|
||||||
I2C_ClearITPendingBit(I2C2, I2C_IT_AF);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CI2CHost::CI2CHost()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CI2CHost::Init(void)
|
|
||||||
{
|
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
|
||||||
NVIC_InitTypeDef NVIC_InitStructure;
|
|
||||||
I2C_InitTypeDef I2C_InitStructure;
|
|
||||||
|
|
||||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, ENABLE);
|
|
||||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
|
|
||||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
|
|
||||||
|
|
||||||
// Configure I2C GPIOs
|
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
|
|
||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
|
|
||||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
|
||||||
|
|
||||||
// Configure the I2C event interrupt
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannel = I2C2_EV_IRQn;
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 15;
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 15;
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
|
||||||
NVIC_Init(&NVIC_InitStructure);
|
|
||||||
|
|
||||||
// Configure the I2C error interrupt
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannel = I2C2_ER_IRQn;
|
|
||||||
NVIC_Init(&NVIC_InitStructure);
|
|
||||||
|
|
||||||
// I2C configuration
|
|
||||||
I2C_InitStructure.I2C_Mode = I2C_Mode_I2C;
|
|
||||||
I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2;
|
|
||||||
I2C_InitStructure.I2C_OwnAddress1 = I2C_ADDR << 1;
|
|
||||||
I2C_InitStructure.I2C_Ack = I2C_Ack_Enable;
|
|
||||||
I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;
|
|
||||||
I2C_InitStructure.I2C_ClockSpeed = I2C_CLK_FREQ;
|
|
||||||
|
|
||||||
// Enable I2C
|
|
||||||
I2C_Cmd(I2C2, ENABLE);
|
|
||||||
// Apply I2C configuration
|
|
||||||
I2C_Init(I2C2, &I2C_InitStructure);
|
|
||||||
|
|
||||||
I2C_ITConfig(I2C2, I2C_IT_EVT, ENABLE);
|
|
||||||
I2C_ITConfig(I2C2, I2C_IT_BUF, ENABLE);
|
|
||||||
I2C_ITConfig(I2C2, I2C_IT_ERR, ENABLE);
|
|
||||||
|
|
||||||
// Initialize the FIFOs
|
|
||||||
txFIFO_head = 0U;
|
|
||||||
txFIFO_tail = 0U;
|
|
||||||
rxFIFO_head = 0U;
|
|
||||||
rxFIFO_tail = 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CI2CHost::I2C_EVHandler(void) {
|
|
||||||
uint32_t event = I2C_GetLastEvent(I2C2);
|
|
||||||
|
|
||||||
switch (event) {
|
|
||||||
case I2C_EVENT_SLAVE_RECEIVER_ADDRESS_MATCHED:
|
|
||||||
break;
|
|
||||||
case I2C_EVENT_SLAVE_BYTE_RECEIVED:
|
|
||||||
if (rxFIFO_level() < I2C_RX_FIFO_SIZE) {
|
|
||||||
rxFIFO[rxFIFO_head] = I2C_ReceiveData(I2C2);
|
|
||||||
rxFIFO_head++;
|
|
||||||
if (rxFIFO_head >= I2C_RX_FIFO_SIZE)
|
|
||||||
rxFIFO_head = 0U;
|
|
||||||
} else
|
|
||||||
I2C_ReceiveData(I2C2);
|
|
||||||
break;
|
|
||||||
case I2C_EVENT_SLAVE_TRANSMITTER_ADDRESS_MATCHED:
|
|
||||||
case I2C_EVENT_SLAVE_BYTE_TRANSMITTED:
|
|
||||||
if (txFIFO_level() > 0) {
|
|
||||||
I2C_SendData(I2C2, txFIFO[txFIFO_tail]);
|
|
||||||
txFIFO_tail++;
|
|
||||||
if (txFIFO_tail >= I2C_TX_FIFO_SIZE)
|
|
||||||
txFIFO_tail = 0U;
|
|
||||||
} else
|
|
||||||
I2C_SendData(I2C2, 0U);
|
|
||||||
break;
|
|
||||||
case I2C_EVENT_SLAVE_STOP_DETECTED:
|
|
||||||
I2C2_ClearFlag();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CI2CHost::I2C2_ClearFlag(void) {
|
|
||||||
// Clear ADDR flag
|
|
||||||
while((I2C2->SR1 & I2C_SR1_ADDR) == I2C_SR1_ADDR) {
|
|
||||||
I2C2->SR1;
|
|
||||||
I2C2->SR2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear STOPF flag
|
|
||||||
while((I2C2->SR1 & I2C_SR1_STOPF) == I2C_SR1_STOPF) {
|
|
||||||
I2C2->SR1;
|
|
||||||
I2C2->CR1 |= 0x1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t CI2CHost::txFIFO_level(void)
|
|
||||||
{
|
|
||||||
uint32_t tail = txFIFO_tail;
|
|
||||||
uint32_t head = txFIFO_head;
|
|
||||||
|
|
||||||
if (tail > head)
|
|
||||||
return I2C_TX_FIFO_SIZE + head - tail;
|
|
||||||
else
|
|
||||||
return head - tail;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t CI2CHost::rxFIFO_level(void)
|
|
||||||
{
|
|
||||||
uint32_t tail = rxFIFO_tail;
|
|
||||||
uint32_t head = rxFIFO_head;
|
|
||||||
|
|
||||||
if (tail > head)
|
|
||||||
return I2C_RX_FIFO_SIZE + head - tail;
|
|
||||||
else
|
|
||||||
return head - tail;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t CI2CHost::txFIFO_put(uint8_t next)
|
|
||||||
{
|
|
||||||
if (txFIFO_level() < I2C_TX_FIFO_SIZE) {
|
|
||||||
txFIFO[txFIFO_head] = next;
|
|
||||||
|
|
||||||
txFIFO_head++;
|
|
||||||
if (txFIFO_head >= I2C_TX_FIFO_SIZE)
|
|
||||||
txFIFO_head = 0U;
|
|
||||||
return 1U;
|
|
||||||
} else {
|
|
||||||
return 0U;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t CI2CHost::AvailI2C(void)
|
|
||||||
{
|
|
||||||
if (rxFIFO_level() > 0U)
|
|
||||||
return 1U;
|
|
||||||
else
|
|
||||||
return 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t CI2CHost::ReadI2C(void)
|
|
||||||
{
|
|
||||||
uint8_t data_c = rxFIFO[rxFIFO_tail];
|
|
||||||
|
|
||||||
rxFIFO_tail++;
|
|
||||||
if (rxFIFO_tail >= I2C_RX_FIFO_SIZE)
|
|
||||||
rxFIFO_tail = 0U;
|
|
||||||
|
|
||||||
return data_c;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CI2CHost::WriteI2C(const uint8_t* data, uint16_t length)
|
|
||||||
{
|
|
||||||
for (uint16_t i = 0U; i < length; i++)
|
|
||||||
txFIFO_put(data[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
55
I2CHost.h
55
I2CHost.h
|
|
@ -1,55 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2019 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(I2CHost_H)
|
|
||||||
#define I2CHost_H
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#if defined(STM32_I2C_HOST)
|
|
||||||
|
|
||||||
#define I2C_CLK_FREQ 100000U
|
|
||||||
#define I2C_TX_FIFO_SIZE 512U
|
|
||||||
#define I2C_RX_FIFO_SIZE 512U
|
|
||||||
|
|
||||||
class CI2CHost {
|
|
||||||
public:
|
|
||||||
CI2CHost();
|
|
||||||
|
|
||||||
void Init(void);
|
|
||||||
void I2C_EVHandler(void);
|
|
||||||
uint8_t AvailI2C(void);
|
|
||||||
uint8_t ReadI2C(void);
|
|
||||||
void WriteI2C(const uint8_t* data, uint16_t length);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void I2C2_ClearFlag(void);
|
|
||||||
uint16_t txFIFO_level(void);
|
|
||||||
uint16_t rxFIFO_level(void);
|
|
||||||
uint8_t txFIFO_put(uint8_t next);
|
|
||||||
|
|
||||||
volatile uint8_t txFIFO[I2C_TX_FIFO_SIZE];
|
|
||||||
volatile uint8_t rxFIFO[I2C_RX_FIFO_SIZE];
|
|
||||||
volatile uint16_t txFIFO_head, txFIFO_tail;
|
|
||||||
volatile uint16_t rxFIFO_head, rxFIFO_tail;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
82
IO.cpp
82
IO.cpp
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
|
@ -51,7 +51,6 @@ m_int2counter(0U)
|
||||||
YSF_pin(LOW);
|
YSF_pin(LOW);
|
||||||
P25_pin(LOW);
|
P25_pin(LOW);
|
||||||
NXDN_pin(LOW);
|
NXDN_pin(LOW);
|
||||||
M17_pin(LOW);
|
|
||||||
POCSAG_pin(LOW);
|
POCSAG_pin(LOW);
|
||||||
COS_pin(LOW);
|
COS_pin(LOW);
|
||||||
DEB_pin(LOW);
|
DEB_pin(LOW);
|
||||||
|
|
@ -90,7 +89,6 @@ void CIO::selfTest()
|
||||||
YSF_pin(ledValue);
|
YSF_pin(ledValue);
|
||||||
P25_pin(ledValue);
|
P25_pin(ledValue);
|
||||||
NXDN_pin(ledValue);
|
NXDN_pin(ledValue);
|
||||||
M17_pin(ledValue);
|
|
||||||
POCSAG_pin(ledValue);
|
POCSAG_pin(ledValue);
|
||||||
COS_pin(ledValue);
|
COS_pin(ledValue);
|
||||||
|
|
||||||
|
|
@ -113,7 +111,7 @@ void CIO::process()
|
||||||
if (m_started) {
|
if (m_started) {
|
||||||
// Two seconds timeout
|
// Two seconds timeout
|
||||||
if (m_watchdog >= 19200U) {
|
if (m_watchdog >= 19200U) {
|
||||||
if (m_modemState == STATE_DSTAR || m_modemState == STATE_DMR || m_modemState == STATE_YSF || m_modemState == STATE_P25 || m_modemState == STATE_NXDN || m_modemState == STATE_M17) {
|
if (m_modemState == STATE_DSTAR || m_modemState == STATE_DMR || m_modemState == STATE_YSF || m_modemState == STATE_P25 || m_modemState == STATE_NXDN) {
|
||||||
m_modemState = STATE_IDLE;
|
m_modemState = STATE_IDLE;
|
||||||
setMode(m_modemState);
|
setMode(m_modemState);
|
||||||
}
|
}
|
||||||
|
|
@ -180,8 +178,6 @@ void CIO::process()
|
||||||
scantime = SCAN_TIME;
|
scantime = SCAN_TIME;
|
||||||
else if(m_modemState_prev == STATE_NXDN)
|
else if(m_modemState_prev == STATE_NXDN)
|
||||||
scantime = SCAN_TIME;
|
scantime = SCAN_TIME;
|
||||||
else if(m_modemState_prev == STATE_M17)
|
|
||||||
scantime = SCAN_TIME;
|
|
||||||
else
|
else
|
||||||
scantime = SCAN_TIME;
|
scantime = SCAN_TIME;
|
||||||
|
|
||||||
|
|
@ -225,9 +221,6 @@ void CIO::process()
|
||||||
case STATE_NXDN:
|
case STATE_NXDN:
|
||||||
nxdnRX.databit(bit);
|
nxdnRX.databit(bit);
|
||||||
break;
|
break;
|
||||||
case STATE_M17:
|
|
||||||
m17RX.databit(bit);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -259,10 +252,6 @@ void CIO::start()
|
||||||
m_Modes[m_TotalModes] = STATE_NXDN;
|
m_Modes[m_TotalModes] = STATE_NXDN;
|
||||||
m_TotalModes++;
|
m_TotalModes++;
|
||||||
}
|
}
|
||||||
if(m_m17Enable) {
|
|
||||||
m_Modes[m_TotalModes] = STATE_M17;
|
|
||||||
m_TotalModes++;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(ENABLE_SCAN_MODE)
|
#if defined(ENABLE_SCAN_MODE)
|
||||||
if(m_TotalModes > 1U)
|
if(m_TotalModes > 1U)
|
||||||
|
|
@ -318,47 +307,6 @@ bool CIO::hasRXOverflow()
|
||||||
return m_rxBuffer.hasOverflowed();
|
return m_rxBuffer.hasOverflowed();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
void CIO::checkBand(uint32_t frequency_rx, uint32_t frequency_tx) {
|
|
||||||
if (!(io.hasSingleADF7021())) {
|
|
||||||
// There are two ADF7021s on the board
|
|
||||||
if (io.isDualBand()) {
|
|
||||||
// Dual band
|
|
||||||
if ((frequency_tx <= VHF2_MAX) && (frequency_rx <= VHF2_MAX)) {
|
|
||||||
// Turn on VHF side
|
|
||||||
io.setBandVHF(true);
|
|
||||||
} else if ((frequency_tx >= UHF1_MIN) && (frequency_rx >= UHF1_MIN)) {
|
|
||||||
// Turn on UHF side
|
|
||||||
io.setBandVHF(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t CIO::checkZUMspot(uint32_t frequency_rx, uint32_t frequency_tx) {
|
|
||||||
if (!(io.hasSingleADF7021())) {
|
|
||||||
// There are two ADF7021s on the board
|
|
||||||
if (io.isDualBand()) {
|
|
||||||
// Dual band
|
|
||||||
if ((frequency_tx <= VHF2_MAX) && (frequency_rx <= VHF2_MAX)) {
|
|
||||||
// Turn on VHF side
|
|
||||||
io.setBandVHF(true);
|
|
||||||
} else if ((frequency_tx >= UHF1_MIN) && (frequency_rx >= UHF1_MIN)) {
|
|
||||||
// Turn on UHF side
|
|
||||||
io.setBandVHF(false);
|
|
||||||
}
|
|
||||||
} else if (!io.isDualBand()) {
|
|
||||||
// Duplex board
|
|
||||||
if ((frequency_tx < UHF1_MIN) || (frequency_rx < UHF1_MIN)) {
|
|
||||||
// Reject VHF frequencies
|
|
||||||
return 4U;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0U;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_power, uint32_t pocsag_freq_tx)
|
uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_power, uint32_t pocsag_freq_tx)
|
||||||
{
|
{
|
||||||
// Configure power level
|
// Configure power level
|
||||||
|
|
@ -390,13 +338,6 @@ uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_po
|
||||||
return 4U;
|
return 4U;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Check if we have a single, dualband or duplex board
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
if (checkZUMspot(frequency_rx, frequency_tx) > 0) {
|
|
||||||
return 4U;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Configure frequency
|
// Configure frequency
|
||||||
m_frequency_rx = frequency_rx;
|
m_frequency_rx = frequency_rx;
|
||||||
m_frequency_tx = frequency_tx;
|
m_frequency_tx = frequency_tx;
|
||||||
|
|
@ -423,14 +364,6 @@ void CIO::setMode(MMDVM_STATE modemState)
|
||||||
#if defined(USE_ALTERNATE_NXDN_LEDS)
|
#if defined(USE_ALTERNATE_NXDN_LEDS)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_ALTERNATE_M17_LEDS)
|
|
||||||
if (modemState != STATE_M17) {
|
|
||||||
#endif
|
|
||||||
YSF_pin(modemState == STATE_YSF);
|
|
||||||
P25_pin(modemState == STATE_P25);
|
|
||||||
#if defined(USE_ALTERNATE_M17_LEDS)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if defined(USE_ALTERNATE_NXDN_LEDS)
|
#if defined(USE_ALTERNATE_NXDN_LEDS)
|
||||||
if (modemState != STATE_YSF && modemState != STATE_P25) {
|
if (modemState != STATE_YSF && modemState != STATE_P25) {
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -445,13 +378,6 @@ void CIO::setMode(MMDVM_STATE modemState)
|
||||||
#if defined(USE_ALTERNATE_POCSAG_LEDS)
|
#if defined(USE_ALTERNATE_POCSAG_LEDS)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_ALTERNATE_M17_LEDS)
|
|
||||||
if (modemState != STATE_DSTAR && modemState != STATE_P25) {
|
|
||||||
#endif
|
|
||||||
M17_pin(modemState == STATE_M17);
|
|
||||||
#if defined(USE_ALTERNATE_M17_LEDS)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CIO::setDecode(bool dcd)
|
void CIO::setDecode(bool dcd)
|
||||||
|
|
|
||||||
19
IO.h
19
IO.h
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
|
@ -98,7 +98,6 @@ public:
|
||||||
void YSF_pin(bool on);
|
void YSF_pin(bool on);
|
||||||
void P25_pin(bool on);
|
void P25_pin(bool on);
|
||||||
void NXDN_pin(bool on);
|
void NXDN_pin(bool on);
|
||||||
void M17_pin(bool on);
|
|
||||||
void POCSAG_pin(bool on);
|
void POCSAG_pin(bool on);
|
||||||
void COS_pin(bool on);
|
void COS_pin(bool on);
|
||||||
void interrupt(void);
|
void interrupt(void);
|
||||||
|
|
@ -125,13 +124,6 @@ public:
|
||||||
uint32_t getWatchdog(void);
|
uint32_t getWatchdog(void);
|
||||||
void getIntCounter(uint16_t &int1, uint16_t &int2);
|
void getIntCounter(uint16_t &int1, uint16_t &int2);
|
||||||
void selfTest(void);
|
void selfTest(void);
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
void checkBand(uint32_t frequency_rx, uint32_t frequency_tx);
|
|
||||||
uint8_t checkZUMspot(uint32_t frequency_rx, uint32_t frequency_tx);
|
|
||||||
void setBandVHF(bool vhf_on);
|
|
||||||
bool hasSingleADF7021(void);
|
|
||||||
bool isDualBand(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// RF interface API
|
// RF interface API
|
||||||
void setTX(void);
|
void setTX(void);
|
||||||
|
|
@ -142,7 +134,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void start(void);
|
void start(void);
|
||||||
void startInt(void);
|
void startInt(void);
|
||||||
void setDeviations(uint8_t dstarTXLevel, uint8_t dmrTXLevel, uint8_t ysfTXLevel, uint8_t p25TXLevel, uint8_t nxdnTXLevel, uint8_t m17TXLevel, uint8_t pocsagTXLevel, bool ysfLoDev);
|
void setDeviations(uint8_t dstarTXLevel, uint8_t dmrTXLevel, uint8_t ysfTXLevel, uint8_t p25TXLevel, uint8_t nxdnTXLevel, uint8_t pocsagTXLevel, bool ysfLoDev);
|
||||||
void updateCal(void);
|
void updateCal(void);
|
||||||
|
|
||||||
#if defined(SEND_RSSI_DATA)
|
#if defined(SEND_RSSI_DATA)
|
||||||
|
|
@ -163,7 +155,6 @@ public:
|
||||||
uint16_t devYSF(void);
|
uint16_t devYSF(void);
|
||||||
uint16_t devP25(void);
|
uint16_t devP25(void);
|
||||||
uint16_t devNXDN(void);
|
uint16_t devNXDN(void);
|
||||||
uint16_t devM17(void);
|
|
||||||
uint16_t devPOCSAG(void);
|
uint16_t devPOCSAG(void);
|
||||||
void printConf();
|
void printConf();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -183,7 +174,7 @@ private:
|
||||||
uint32_t m_scanPauseCnt;
|
uint32_t m_scanPauseCnt;
|
||||||
uint8_t m_scanPos;
|
uint8_t m_scanPos;
|
||||||
uint8_t m_TotalModes;
|
uint8_t m_TotalModes;
|
||||||
MMDVM_STATE m_Modes[6];
|
MMDVM_STATE m_Modes[5];
|
||||||
bool m_ledValue;
|
bool m_ledValue;
|
||||||
volatile uint32_t m_watchdog;
|
volatile uint32_t m_watchdog;
|
||||||
volatile uint16_t m_int1counter;
|
volatile uint16_t m_int1counter;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// STM32F1 pin definitions, using STM32duino
|
// STM32F1 pin definitions, using STM32duino
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
#if defined(ZUMSPOT_ADF7021)
|
||||||
|
|
||||||
#define PIN_SCLK PB5
|
#define PIN_SCLK PB5
|
||||||
#define PIN_SREAD PB6
|
#define PIN_SREAD PB6
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
#define PIN_SLE2 PA6
|
#define PIN_SLE2 PA6
|
||||||
#define PIN_CE PC14
|
#define PIN_CE PC14
|
||||||
#define PIN_RXD PB4
|
#define PIN_RXD PB4
|
||||||
#define PIN_RXD2 PA11
|
#define PIN_RXD2 PA4
|
||||||
#define PIN_TXD PB3
|
#define PIN_TXD PB3
|
||||||
#define PIN_TXD2 PA8
|
#define PIN_TXD2 PA5
|
||||||
#define PIN_CLKOUT PA15
|
#define PIN_CLKOUT PA15
|
||||||
#define PIN_LED PC13
|
#define PIN_LED PC13
|
||||||
#define PIN_DEB PB9
|
#define PIN_DEB PB9
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#define PIN_COS_LED PB15
|
#define PIN_COS_LED PB15
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Either ZUMSPOT_ADF7021, LONESTAR_USB, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT, NANO_DV_REV10 or SKYBRIDGE_HS need to be defined"
|
#error "Either ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT or NANO_DV_REV10 need to be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||||
|
|
@ -156,7 +156,7 @@ void CIO::Init()
|
||||||
{
|
{
|
||||||
#if defined (__STM32F1__)
|
#if defined (__STM32F1__)
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10) || defined(SKYBRIDGE_HS)
|
#if defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);
|
afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
114
IOSTM.cpp
114
IOSTM.cpp
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||||
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2017 by Danilo DB4PLE
|
* Copyright (C) 2017 by Danilo DB4PLE
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -84,10 +83,6 @@
|
||||||
#define PIN_NXDN_LED GPIO_Pin_8
|
#define PIN_NXDN_LED GPIO_Pin_8
|
||||||
#define PORT_NXDN_LED GPIOA
|
#define PORT_NXDN_LED GPIOA
|
||||||
|
|
||||||
// XXX FIXME
|
|
||||||
#define PIN_M17_LED GPIO_Pin_8
|
|
||||||
#define PORT_M17_LED GPIOA
|
|
||||||
|
|
||||||
#define PIN_POCSAG_LED GPIO_Pin_5
|
#define PIN_POCSAG_LED GPIO_Pin_5
|
||||||
#define PORT_POCSAG_LED GPIOA
|
#define PORT_POCSAG_LED GPIOA
|
||||||
|
|
||||||
|
|
@ -97,7 +92,7 @@
|
||||||
#define PIN_COS_LED GPIO_Pin_13
|
#define PIN_COS_LED GPIO_Pin_13
|
||||||
#define PORT_COS_LED GPIOB
|
#define PORT_COS_LED GPIOB
|
||||||
|
|
||||||
#elif defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS) || defined(LONESTAR_USB)
|
#elif defined(ZUMSPOT_ADF7021)
|
||||||
|
|
||||||
#define PIN_SCLK GPIO_Pin_5
|
#define PIN_SCLK GPIO_Pin_5
|
||||||
#define PORT_SCLK GPIOB
|
#define PORT_SCLK GPIOB
|
||||||
|
|
@ -120,15 +115,6 @@
|
||||||
#define PIN_RXD GPIO_Pin_4
|
#define PIN_RXD GPIO_Pin_4
|
||||||
#define PORT_RXD GPIOB
|
#define PORT_RXD GPIOB
|
||||||
|
|
||||||
#define PIN_SGL_DBL GPIO_Pin_12
|
|
||||||
#define PORT_SGL_DBL GPIOA
|
|
||||||
|
|
||||||
#define PIN_DL_DPX GPIO_Pin_15
|
|
||||||
#define PORT_DL_DPX GPIOC
|
|
||||||
|
|
||||||
#define PIN_SET_BAND GPIO_Pin_15
|
|
||||||
#define PORT_SET_BAND GPIOA
|
|
||||||
|
|
||||||
// TXD used in SPI Data mode of ADF7021
|
// TXD used in SPI Data mode of ADF7021
|
||||||
// TXD is TxRxCLK of ADF7021, standard TX/RX data interface
|
// TXD is TxRxCLK of ADF7021, standard TX/RX data interface
|
||||||
#define PIN_TXD GPIO_Pin_3
|
#define PIN_TXD GPIO_Pin_3
|
||||||
|
|
@ -136,17 +122,6 @@
|
||||||
#define PIN_TXD_INT GPIO_PinSource3
|
#define PIN_TXD_INT GPIO_PinSource3
|
||||||
#define PORT_TXD_INT GPIO_PortSourceGPIOB
|
#define PORT_TXD_INT GPIO_PortSourceGPIOB
|
||||||
|
|
||||||
#if defined(DUPLEX)
|
|
||||||
#define PIN_RXD2 GPIO_Pin_11
|
|
||||||
#define PORT_RXD2 GPIOA
|
|
||||||
|
|
||||||
// TXD2 is TxRxCLK of the second ADF7021, standard TX/RX data interface
|
|
||||||
#define PIN_TXD2 GPIO_Pin_8
|
|
||||||
#define PORT_TXD2 GPIOA
|
|
||||||
#define PIN_TXD2_INT GPIO_PinSource8
|
|
||||||
#define PORT_TXD2_INT GPIO_PortSourceGPIOA
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// CLKOUT used in SPI Data mode of ADF7021
|
// CLKOUT used in SPI Data mode of ADF7021
|
||||||
#define PIN_CLKOUT GPIO_Pin_15
|
#define PIN_CLKOUT GPIO_Pin_15
|
||||||
#define PORT_CLKOUT GPIOA
|
#define PORT_CLKOUT GPIOA
|
||||||
|
|
@ -178,14 +153,6 @@
|
||||||
#endif
|
#endif
|
||||||
#define PORT_NXDN_LED GPIOA
|
#define PORT_NXDN_LED GPIOA
|
||||||
|
|
||||||
// XXX FIXME
|
|
||||||
#if defined(STM32_USB_HOST)
|
|
||||||
#define PIN_M17_LED GPIO_Pin_1
|
|
||||||
#else
|
|
||||||
#define PIN_M17_LED GPIO_Pin_7
|
|
||||||
#endif
|
|
||||||
#define PORT_M17_LED GPIOA
|
|
||||||
|
|
||||||
#define PIN_POCSAG_LED GPIO_Pin_5
|
#define PIN_POCSAG_LED GPIO_Pin_5
|
||||||
#define PORT_POCSAG_LED GPIOA
|
#define PORT_POCSAG_LED GPIOA
|
||||||
|
|
||||||
|
|
@ -195,7 +162,7 @@
|
||||||
#define PIN_COS_LED GPIO_Pin_15
|
#define PIN_COS_LED GPIO_Pin_15
|
||||||
#define PORT_COS_LED GPIOB
|
#define PORT_COS_LED GPIOB
|
||||||
|
|
||||||
#elif defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS)
|
#elif defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
|
|
||||||
#define PIN_SCLK GPIO_Pin_5
|
#define PIN_SCLK GPIO_Pin_5
|
||||||
#define PORT_SCLK GPIOB
|
#define PORT_SCLK GPIOB
|
||||||
|
|
@ -261,10 +228,6 @@
|
||||||
#define PIN_NXDN_LED GPIO_Pin_8
|
#define PIN_NXDN_LED GPIO_Pin_8
|
||||||
#define PORT_NXDN_LED GPIOA
|
#define PORT_NXDN_LED GPIOA
|
||||||
|
|
||||||
// XXX FIXME
|
|
||||||
#define PIN_M17_LED GPIO_Pin_8
|
|
||||||
#define PORT_M17_LED GPIOA
|
|
||||||
|
|
||||||
#define PIN_POCSAG_LED GPIO_Pin_7
|
#define PIN_POCSAG_LED GPIO_Pin_7
|
||||||
#define PORT_POCSAG_LED GPIOA
|
#define PORT_POCSAG_LED GPIOA
|
||||||
|
|
||||||
|
|
@ -275,7 +238,7 @@
|
||||||
#define PORT_COS_LED GPIOB
|
#define PORT_COS_LED GPIOB
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Either PI_HAT_7021_REV_02, ZUMSPOT_ADF7021, LONESTAR_USB, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT, NANO_DV_REV11, D2RG_MMDVM_HS or SKYBRIDGE_HS need to be defined"
|
#error "Either PI_HAT_7021_REV_02, ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT or NANO_DV_REV10 need to be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -297,7 +260,7 @@ extern "C" {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)
|
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
|
|
||||||
#if defined(BIDIR_DATA_PIN)
|
#if defined(BIDIR_DATA_PIN)
|
||||||
void EXTI3_IRQHandler(void) {
|
void EXTI3_IRQHandler(void) {
|
||||||
|
|
@ -317,17 +280,10 @@ extern "C" {
|
||||||
|
|
||||||
#if defined(DUPLEX)
|
#if defined(DUPLEX)
|
||||||
void EXTI9_5_IRQHandler(void) {
|
void EXTI9_5_IRQHandler(void) {
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
|
|
||||||
if(EXTI_GetITStatus(EXTI_Line8)!=RESET) {
|
|
||||||
io.interrupt2();
|
|
||||||
EXTI_ClearITPendingBit(EXTI_Line8);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(EXTI_GetITStatus(EXTI_Line5)!=RESET) {
|
if(EXTI_GetITStatus(EXTI_Line5)!=RESET) {
|
||||||
io.interrupt2();
|
io.interrupt2();
|
||||||
EXTI_ClearITPendingBit(EXTI_Line5);
|
EXTI_ClearITPendingBit(EXTI_Line5);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -348,34 +304,10 @@ void CIO::Init()
|
||||||
|
|
||||||
#if defined(PI_HAT_7021_REV_02)
|
#if defined(PI_HAT_7021_REV_02)
|
||||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
|
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
|
||||||
#elif defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)
|
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
|
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
// Pin defines if the board has a single ADF7021 or double
|
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
|
||||||
GPIO_InitStruct.GPIO_Pin = PIN_SGL_DBL;
|
|
||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
|
||||||
GPIO_Init(PORT_SGL_DBL, &GPIO_InitStruct);
|
|
||||||
|
|
||||||
// Pin defines if the board is dual band or duplex
|
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
|
||||||
GPIO_InitStruct.GPIO_Pin = PIN_DL_DPX;
|
|
||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
|
||||||
GPIO_Init(PORT_DL_DPX, &GPIO_InitStruct);
|
|
||||||
|
|
||||||
// Pin will set UHF or VHF
|
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
|
||||||
GPIO_InitStruct.GPIO_Pin = PIN_SET_BAND;
|
|
||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
||||||
GPIO_Init(PORT_SET_BAND, &GPIO_InitStruct);
|
|
||||||
// TODO: Remove this line
|
|
||||||
// GPIO_WriteBit(PORT_SET_BAND, PIN_SET_BAND, Bit_RESET);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(STM32_USB_HOST)
|
|
||||||
// Pin PA11,PA12 = LOW, USB Reset
|
// Pin PA11,PA12 = LOW, USB Reset
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_11 | GPIO_Pin_12;
|
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_11 | GPIO_Pin_12;
|
||||||
|
|
@ -384,8 +316,6 @@ void CIO::Init()
|
||||||
GPIO_WriteBit(GPIOA, GPIO_Pin_11, Bit_RESET);
|
GPIO_WriteBit(GPIOA, GPIO_Pin_11, Bit_RESET);
|
||||||
GPIO_WriteBit(GPIOA, GPIO_Pin_12, Bit_RESET);
|
GPIO_WriteBit(GPIOA, GPIO_Pin_12, Bit_RESET);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LONG_USB_RESET)
|
#if defined(LONG_USB_RESET)
|
||||||
// 10 ms delay
|
// 10 ms delay
|
||||||
delay_us(10000U);
|
delay_us(10000U);
|
||||||
|
|
@ -463,7 +393,6 @@ void CIO::Init()
|
||||||
#endif
|
#endif
|
||||||
GPIO_Init(PORT_TXD, &GPIO_InitStruct);
|
GPIO_Init(PORT_TXD, &GPIO_InitStruct);
|
||||||
#if defined(DUPLEX)
|
#if defined(DUPLEX)
|
||||||
GPIO_InitStruct.GPIO_Pin = PIN_TXD2;
|
|
||||||
GPIO_Init(PORT_TXD2, &GPIO_InitStruct);
|
GPIO_Init(PORT_TXD2, &GPIO_InitStruct);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -549,7 +478,7 @@ void CIO::Init()
|
||||||
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
|
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)
|
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
|
|
||||||
#if defined(BIDIR_DATA_PIN)
|
#if defined(BIDIR_DATA_PIN)
|
||||||
// Connect EXTI3 Line
|
// Connect EXTI3 Line
|
||||||
|
|
@ -567,11 +496,7 @@ void CIO::Init()
|
||||||
// Connect EXTI5 Line
|
// Connect EXTI5 Line
|
||||||
GPIO_EXTILineConfig(PORT_TXD2_INT, PIN_TXD2_INT);
|
GPIO_EXTILineConfig(PORT_TXD2_INT, PIN_TXD2_INT);
|
||||||
// Configure EXT5 line
|
// Configure EXT5 line
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
EXTI_InitStructure2.EXTI_Line = EXTI_Line8;
|
|
||||||
#else
|
|
||||||
EXTI_InitStructure2.EXTI_Line = EXTI_Line5;
|
EXTI_InitStructure2.EXTI_Line = EXTI_Line5;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -601,7 +526,7 @@ void CIO::startInt()
|
||||||
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
|
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
|
||||||
|
|
||||||
#elif defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)
|
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
|
||||||
|
|
||||||
#if defined(BIDIR_DATA_PIN)
|
#if defined(BIDIR_DATA_PIN)
|
||||||
// Enable and set EXTI3 Interrupt
|
// Enable and set EXTI3 Interrupt
|
||||||
|
|
@ -751,16 +676,6 @@ void CIO::NXDN_pin(bool on)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CIO::M17_pin(bool on)
|
|
||||||
{
|
|
||||||
#if defined(USE_ALTERNATE_M17_LEDS)
|
|
||||||
GPIO_WriteBit(PORT_DSTAR_LED, PIN_DSTAR_LED, on ? Bit_SET : Bit_RESET);
|
|
||||||
GPIO_WriteBit(PORT_P25_LED, PIN_P25_LED, on ? Bit_SET : Bit_RESET);
|
|
||||||
#else
|
|
||||||
GPIO_WriteBit(PORT_M17_LED, PIN_M17_LED, on ? Bit_SET : Bit_RESET);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void CIO::POCSAG_pin(bool on)
|
void CIO::POCSAG_pin(bool on)
|
||||||
{
|
{
|
||||||
#if defined(USE_ALTERNATE_POCSAG_LEDS)
|
#if defined(USE_ALTERNATE_POCSAG_LEDS)
|
||||||
|
|
@ -781,19 +696,6 @@ void CIO::COS_pin(bool on)
|
||||||
GPIO_WriteBit(PORT_COS_LED, PIN_COS_LED, on ? Bit_SET : Bit_RESET);
|
GPIO_WriteBit(PORT_COS_LED, PIN_COS_LED, on ? Bit_SET : Bit_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS)
|
|
||||||
void CIO::setBandVHF(bool vhf_on) {
|
|
||||||
GPIO_WriteBit(PORT_SET_BAND, PIN_SET_BAND, vhf_on ? Bit_SET : Bit_RESET);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CIO::hasSingleADF7021() {
|
|
||||||
return GPIO_ReadInputDataBit(PORT_SGL_DBL, PIN_SGL_DBL) == Bit_SET;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CIO::isDualBand() {
|
|
||||||
return GPIO_ReadInputDataBit(PORT_DL_DPX, PIN_DL_DPX) == Bit_SET;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function delay_us() from stm32duino project
|
* Function delay_us() from stm32duino project
|
||||||
|
|
|
||||||
41
M17Defines.h
41
M17Defines.h
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2016,2017,2018,2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(M17DEFINES_H)
|
|
||||||
#define M17DEFINES_H
|
|
||||||
|
|
||||||
const unsigned int M17_RADIO_SYMBOL_LENGTH = 5U; // At 24 kHz sample rate
|
|
||||||
|
|
||||||
const unsigned int M17_FRAME_LENGTH_BITS = 384U;
|
|
||||||
const unsigned int M17_FRAME_LENGTH_BYTES = M17_FRAME_LENGTH_BITS / 8U;
|
|
||||||
|
|
||||||
const unsigned int M17_SYNC_LENGTH_BITS = 16U;
|
|
||||||
const unsigned int M17_SYNC_LENGTH_BYTES = M17_SYNC_LENGTH_BITS / 8U;
|
|
||||||
|
|
||||||
const uint8_t M17_LINK_SETUP_SYNC_BYTES[] = {0x55U, 0xF7U};
|
|
||||||
const uint8_t M17_STREAM_SYNC_BYTES[] = {0xFFU, 0x5DU};
|
|
||||||
const uint8_t M17_EOT_SYNC_BYTES[] = {0x55U, 0x5DU};
|
|
||||||
|
|
||||||
const uint8_t M17_SYNC_BYTES_LENGTH = 2U;
|
|
||||||
|
|
||||||
const uint16_t M17_LINK_SETUP_SYNC_BITS = 0x55F7U;
|
|
||||||
const uint16_t M17_STREAM_SYNC_BITS = 0xFF5DU;
|
|
||||||
const uint16_t M17_EOT_SYNC_BITS = 0x555DU;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
203
M17RX.cpp
203
M17RX.cpp
|
|
@ -1,203 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2018,2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2016-2018 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
#include "Globals.h"
|
|
||||||
#include "M17RX.h"
|
|
||||||
#include "Utils.h"
|
|
||||||
|
|
||||||
const uint8_t MAX_SYNC_BIT_START_ERRS = 0U;
|
|
||||||
const uint8_t MAX_SYNC_BIT_RUN_ERRS = 2U;
|
|
||||||
|
|
||||||
const unsigned int MAX_SYNC_FRAMES = 3U + 1U;
|
|
||||||
|
|
||||||
const uint8_t BIT_MASK_TABLE[] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U};
|
|
||||||
|
|
||||||
#define WRITE_BIT1(p,i,b) p[(i)>>3] = (b) ? (p[(i)>>3] | BIT_MASK_TABLE[(i)&7]) : (p[(i)>>3] & ~BIT_MASK_TABLE[(i)&7])
|
|
||||||
|
|
||||||
CM17RX::CM17RX() :
|
|
||||||
m_state(M17RXS_NONE),
|
|
||||||
m_bitBuffer(0x00U),
|
|
||||||
m_outBuffer(),
|
|
||||||
m_buffer(NULL),
|
|
||||||
m_bufferPtr(0U),
|
|
||||||
m_lostCount(0U)
|
|
||||||
{
|
|
||||||
m_buffer = m_outBuffer + 1U;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::reset()
|
|
||||||
{
|
|
||||||
m_state = M17RXS_NONE;
|
|
||||||
m_bitBuffer = 0x00U;
|
|
||||||
m_bufferPtr = 0U;
|
|
||||||
m_lostCount = 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::databit(bool bit)
|
|
||||||
{
|
|
||||||
switch (m_state) {
|
|
||||||
case M17RXS_LINK_SETUP:
|
|
||||||
case M17RXS_STREAM:
|
|
||||||
processData(bit);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
processNone(bit);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::processNone(bool bit)
|
|
||||||
{
|
|
||||||
m_bitBuffer <<= 1;
|
|
||||||
if (bit)
|
|
||||||
m_bitBuffer |= 0x01U;
|
|
||||||
|
|
||||||
// Exact matching of the link setup sync bit sequence
|
|
||||||
if (countBits16(m_bitBuffer ^ M17_LINK_SETUP_SYNC_BITS) <= MAX_SYNC_BIT_START_ERRS) {
|
|
||||||
DEBUG1("M17RX: link setup sync found in None");
|
|
||||||
for (uint8_t i = 0U; i < M17_SYNC_BYTES_LENGTH; i++)
|
|
||||||
m_buffer[i] = M17_LINK_SETUP_SYNC_BYTES[i];
|
|
||||||
|
|
||||||
m_lostCount = MAX_SYNC_FRAMES;
|
|
||||||
m_bufferPtr = M17_SYNC_LENGTH_BITS;
|
|
||||||
m_state = M17RXS_LINK_SETUP;
|
|
||||||
|
|
||||||
io.setDecode(true);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exact matching of the stream sync bit sequence
|
|
||||||
if (countBits16(m_bitBuffer ^ M17_STREAM_SYNC_BITS) <= MAX_SYNC_BIT_START_ERRS) {
|
|
||||||
DEBUG1("M17RX: stream sync found in None");
|
|
||||||
for (uint8_t i = 0U; i < M17_SYNC_BYTES_LENGTH; i++)
|
|
||||||
m_buffer[i] = M17_STREAM_SYNC_BYTES[i];
|
|
||||||
|
|
||||||
m_lostCount = MAX_SYNC_FRAMES;
|
|
||||||
m_bufferPtr = M17_SYNC_LENGTH_BITS;
|
|
||||||
m_state = M17RXS_STREAM;
|
|
||||||
|
|
||||||
io.setDecode(true);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::processData(bool bit)
|
|
||||||
{
|
|
||||||
m_bitBuffer <<= 1;
|
|
||||||
if (bit)
|
|
||||||
m_bitBuffer |= 0x01U;
|
|
||||||
|
|
||||||
WRITE_BIT1(m_buffer, m_bufferPtr, bit);
|
|
||||||
|
|
||||||
m_bufferPtr++;
|
|
||||||
if (m_bufferPtr > M17_FRAME_LENGTH_BITS)
|
|
||||||
reset();
|
|
||||||
|
|
||||||
// Only search for the syncs in the right place +-1 bit
|
|
||||||
if (m_bufferPtr >= (M17_SYNC_LENGTH_BITS - 1U) && m_bufferPtr <= (M17_SYNC_LENGTH_BITS + 1U)) {
|
|
||||||
// Fuzzy matching of the link setup sync bit sequence
|
|
||||||
if (countBits16(m_bitBuffer ^ M17_LINK_SETUP_SYNC_BITS) <= MAX_SYNC_BIT_RUN_ERRS) {
|
|
||||||
DEBUG2("M17RX: found link setup sync, pos", m_bufferPtr - M17_SYNC_LENGTH_BITS);
|
|
||||||
m_lostCount = MAX_SYNC_FRAMES;
|
|
||||||
m_bufferPtr = M17_SYNC_LENGTH_BITS;
|
|
||||||
m_state = M17RXS_LINK_SETUP;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fuzzy matching of the stream sync bit sequence
|
|
||||||
if (countBits16(m_bitBuffer ^ M17_STREAM_SYNC_BITS) <= MAX_SYNC_BIT_RUN_ERRS) {
|
|
||||||
DEBUG2("M17RX: found stream sync, pos", m_bufferPtr - M17_SYNC_LENGTH_BITS);
|
|
||||||
m_lostCount = MAX_SYNC_FRAMES;
|
|
||||||
m_bufferPtr = M17_SYNC_LENGTH_BITS;
|
|
||||||
m_state = M17RXS_STREAM;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fuzzy matching of the EOT sync bit sequence
|
|
||||||
if (countBits16(m_bitBuffer ^ M17_EOT_SYNC_BITS) <= MAX_SYNC_BIT_RUN_ERRS) {
|
|
||||||
DEBUG2("M17RX: found eot sync, pos", m_bufferPtr - M17_SYNC_LENGTH_BITS);
|
|
||||||
io.setDecode(false);
|
|
||||||
serial.writeM17EOT();
|
|
||||||
reset();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send a frame to the host if the required number of bits have been received
|
|
||||||
if (m_bufferPtr == M17_FRAME_LENGTH_BITS) {
|
|
||||||
// We've not seen a sync for too long, signal RXLOST and change to RX_NONE
|
|
||||||
m_lostCount--;
|
|
||||||
if (m_lostCount == 0U) {
|
|
||||||
DEBUG1("M17RX: sync timed out, lost lock");
|
|
||||||
io.setDecode(false);
|
|
||||||
serial.writeM17Lost();
|
|
||||||
reset();
|
|
||||||
} else {
|
|
||||||
// Write data to host
|
|
||||||
m_outBuffer[0U] = m_lostCount == (MAX_SYNC_FRAMES - 1U) ? 0x01U : 0x00U;
|
|
||||||
|
|
||||||
switch (m_state) {
|
|
||||||
case M17RXS_LINK_SETUP:
|
|
||||||
writeRSSILinkSetup(m_outBuffer);
|
|
||||||
break;
|
|
||||||
case M17RXS_STREAM:
|
|
||||||
writeRSSIStream(m_outBuffer);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start the next frame
|
|
||||||
::memset(m_outBuffer, 0x00U, M17_FRAME_LENGTH_BYTES + 3U);
|
|
||||||
m_bufferPtr = 0U;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::writeRSSILinkSetup(uint8_t* data)
|
|
||||||
{
|
|
||||||
#if defined(SEND_RSSI_DATA)
|
|
||||||
uint16_t rssi = io.readRSSI();
|
|
||||||
|
|
||||||
data[49U] = (rssi >> 8) & 0xFFU;
|
|
||||||
data[50U] = (rssi >> 0) & 0xFFU;
|
|
||||||
|
|
||||||
serial.writeM17LinkSetup(data, M17_FRAME_LENGTH_BYTES + 3U);
|
|
||||||
#else
|
|
||||||
serial.writeM17LinkSetup(data, M17_FRAME_LENGTH_BYTES + 1U);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17RX::writeRSSIStream(uint8_t* data)
|
|
||||||
{
|
|
||||||
#if defined(SEND_RSSI_DATA)
|
|
||||||
uint16_t rssi = io.readRSSI();
|
|
||||||
|
|
||||||
data[49U] = (rssi >> 8) & 0xFFU;
|
|
||||||
data[50U] = (rssi >> 0) & 0xFFU;
|
|
||||||
|
|
||||||
serial.writeM17Stream(data, M17_FRAME_LENGTH_BYTES + 3U);
|
|
||||||
#else
|
|
||||||
serial.writeM17Stream(data, M17_FRAME_LENGTH_BYTES + 1U);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
54
M17RX.h
54
M17RX.h
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015-2018,2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2016-2018 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(M17RX_H)
|
|
||||||
#define M17RX_H
|
|
||||||
|
|
||||||
#include "M17Defines.h"
|
|
||||||
|
|
||||||
enum M17RX_STATE {
|
|
||||||
M17RXS_NONE,
|
|
||||||
M17RXS_LINK_SETUP,
|
|
||||||
M17RXS_STREAM
|
|
||||||
};
|
|
||||||
|
|
||||||
class CM17RX {
|
|
||||||
public:
|
|
||||||
CM17RX();
|
|
||||||
|
|
||||||
void databit(bool bit);
|
|
||||||
|
|
||||||
void reset();
|
|
||||||
|
|
||||||
private:
|
|
||||||
M17RX_STATE m_state;
|
|
||||||
uint16_t m_bitBuffer;
|
|
||||||
uint8_t m_outBuffer[M17_FRAME_LENGTH_BYTES + 3U];
|
|
||||||
uint8_t* m_buffer;
|
|
||||||
uint16_t m_bufferPtr;
|
|
||||||
uint16_t m_lostCount;
|
|
||||||
|
|
||||||
void processNone(bool bit);
|
|
||||||
void processData(bool bit);
|
|
||||||
void writeRSSILinkSetup(uint8_t* data);
|
|
||||||
void writeRSSIStream(uint8_t* data);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
124
M17TX.cpp
124
M17TX.cpp
|
|
@ -1,124 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2018,2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
#include "Globals.h"
|
|
||||||
#include "M17TX.h"
|
|
||||||
|
|
||||||
#include "M17Defines.h"
|
|
||||||
|
|
||||||
const uint8_t M17_SYNC = 0x77U;
|
|
||||||
const uint8_t M17_PREAMBLE = 0x77U;
|
|
||||||
|
|
||||||
CM17TX::CM17TX() :
|
|
||||||
m_buffer(1500U),
|
|
||||||
m_poBuffer(),
|
|
||||||
m_poLen(0U),
|
|
||||||
m_poPtr(0U),
|
|
||||||
m_txDelay(240U), // 200ms
|
|
||||||
m_delay(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17TX::process()
|
|
||||||
{
|
|
||||||
if (m_buffer.getData() == 0U && m_poLen == 0U)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (m_poLen == 0U) {
|
|
||||||
if (!m_tx) {
|
|
||||||
m_delay = true;
|
|
||||||
m_poLen = m_txDelay;
|
|
||||||
} else {
|
|
||||||
m_delay = false;
|
|
||||||
for (uint8_t i = 0U; i < M17_FRAME_LENGTH_BYTES; i++)
|
|
||||||
m_poBuffer[m_poLen++] = m_buffer.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_poPtr = 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_poLen > 0U) {
|
|
||||||
uint16_t space = io.getSpace();
|
|
||||||
|
|
||||||
while (space > 8U) {
|
|
||||||
if (m_delay) {
|
|
||||||
writeByte(M17_SYNC);
|
|
||||||
m_poPtr++;
|
|
||||||
} else
|
|
||||||
writeByte(m_poBuffer[m_poPtr++]);
|
|
||||||
|
|
||||||
space -= 8U;
|
|
||||||
|
|
||||||
if (m_poPtr >= m_poLen) {
|
|
||||||
if (m_delay) {
|
|
||||||
m_delay = false;
|
|
||||||
m_poPtr = 0U;
|
|
||||||
m_poLen = 3U;
|
|
||||||
} else {
|
|
||||||
m_poPtr = 0U;
|
|
||||||
m_poLen = 0U;
|
|
||||||
m_delay = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t CM17TX::writeData(const uint8_t* data, uint8_t length)
|
|
||||||
{
|
|
||||||
if (length != (M17_FRAME_LENGTH_BYTES + 1U))
|
|
||||||
return 4U;
|
|
||||||
|
|
||||||
uint16_t space = m_buffer.getSpace();
|
|
||||||
if (space < M17_FRAME_LENGTH_BYTES)
|
|
||||||
return 5U;
|
|
||||||
|
|
||||||
for (uint8_t i = 0U; i < M17_FRAME_LENGTH_BYTES; i++)
|
|
||||||
m_buffer.put(data[i + 1U]);
|
|
||||||
|
|
||||||
return 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17TX::writeByte(uint8_t c)
|
|
||||||
{
|
|
||||||
uint8_t bit;
|
|
||||||
uint8_t mask = 0x80U;
|
|
||||||
|
|
||||||
for (uint8_t i = 0U; i < 8U; i++, c <<= 1) {
|
|
||||||
if ((c & mask) == mask)
|
|
||||||
bit = 1U;
|
|
||||||
else
|
|
||||||
bit = 0U;
|
|
||||||
|
|
||||||
io.write(&bit, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CM17TX::setTXDelay(uint8_t delay)
|
|
||||||
{
|
|
||||||
m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t CM17TX::getSpace() const
|
|
||||||
{
|
|
||||||
return m_buffer.getSpace() / M17_FRAME_LENGTH_BYTES;
|
|
||||||
}
|
|
||||||
|
|
||||||
50
M17TX.h
50
M17TX.h
|
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015,2016,2017,2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(M17TX_H)
|
|
||||||
#define M17TX_H
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#include "SerialRB.h"
|
|
||||||
|
|
||||||
class CM17TX {
|
|
||||||
public:
|
|
||||||
CM17TX();
|
|
||||||
|
|
||||||
uint8_t writeData(const uint8_t* data, uint8_t length);
|
|
||||||
|
|
||||||
void process();
|
|
||||||
|
|
||||||
void setTXDelay(uint8_t delay);
|
|
||||||
|
|
||||||
uint8_t getSpace() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
CSerialRB m_buffer;
|
|
||||||
uint8_t m_poBuffer[1200U];
|
|
||||||
uint16_t m_poLen;
|
|
||||||
uint16_t m_poPtr;
|
|
||||||
uint16_t m_txDelay;
|
|
||||||
bool m_delay;
|
|
||||||
|
|
||||||
void writeByte(uint8_t c);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
16
MMDVM_HS.cpp
16
MMDVM_HS.cpp
|
|
@ -1,9 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016 by Mathis Schmieder DB9MAT
|
* Copyright (C) 2016 by Mathis Schmieder DB9MAT
|
||||||
* Copyright (C) 2016 by Colin Durbridge G4EML
|
* Copyright (C) 2016 by Colin Durbridge G4EML
|
||||||
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2019 by Florian Wolters DF2ET
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -43,7 +42,6 @@ bool m_dmrEnable = true;
|
||||||
bool m_ysfEnable = true;
|
bool m_ysfEnable = true;
|
||||||
bool m_p25Enable = true;
|
bool m_p25Enable = true;
|
||||||
bool m_nxdnEnable = true;
|
bool m_nxdnEnable = true;
|
||||||
bool m_m17Enable = true;
|
|
||||||
bool m_pocsagEnable = true;
|
bool m_pocsagEnable = true;
|
||||||
|
|
||||||
bool m_duplex = false;
|
bool m_duplex = false;
|
||||||
|
|
@ -71,9 +69,6 @@ CYSFTX ysfTX;
|
||||||
CP25RX p25RX;
|
CP25RX p25RX;
|
||||||
CP25TX p25TX;
|
CP25TX p25TX;
|
||||||
|
|
||||||
CM17RX m17RX;
|
|
||||||
CM17TX m17TX;
|
|
||||||
|
|
||||||
CNXDNRX nxdnRX;
|
CNXDNRX nxdnRX;
|
||||||
CNXDNTX nxdnTX;
|
CNXDNTX nxdnTX;
|
||||||
|
|
||||||
|
|
@ -90,10 +85,6 @@ CCWIdTX cwIdTX;
|
||||||
CSerialPort serial;
|
CSerialPort serial;
|
||||||
CIO io;
|
CIO io;
|
||||||
|
|
||||||
#if defined(STM32_I2C_HOST)
|
|
||||||
CI2CHost i2c;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
serial.start();
|
serial.start();
|
||||||
|
|
@ -129,9 +120,6 @@ void loop()
|
||||||
if (m_nxdnEnable && m_modemState == STATE_NXDN)
|
if (m_nxdnEnable && m_modemState == STATE_NXDN)
|
||||||
nxdnTX.process();
|
nxdnTX.process();
|
||||||
|
|
||||||
if (m_m17Enable && m_modemState == STATE_M17)
|
|
||||||
m17TX.process();
|
|
||||||
|
|
||||||
if (m_pocsagEnable && (m_modemState == STATE_POCSAG || pocsagTX.busy()))
|
if (m_pocsagEnable && (m_modemState == STATE_POCSAG || pocsagTX.busy()))
|
||||||
pocsagTX.process();
|
pocsagTX.process();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016 by Colin Durbridge G4EML
|
* Copyright (C) 2016 by Colin Durbridge G4EML
|
||||||
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
|
|
@ -38,7 +38,6 @@ bool m_dmrEnable = true;
|
||||||
bool m_ysfEnable = true;
|
bool m_ysfEnable = true;
|
||||||
bool m_p25Enable = true;
|
bool m_p25Enable = true;
|
||||||
bool m_nxdnEnable = true;
|
bool m_nxdnEnable = true;
|
||||||
bool m_m17Enable = true;
|
|
||||||
bool m_pocsagEnable = true;
|
bool m_pocsagEnable = true;
|
||||||
|
|
||||||
bool m_duplex = false;
|
bool m_duplex = false;
|
||||||
|
|
@ -66,9 +65,6 @@ CYSFTX ysfTX;
|
||||||
CP25RX p25RX;
|
CP25RX p25RX;
|
||||||
CP25TX p25TX;
|
CP25TX p25TX;
|
||||||
|
|
||||||
CM17RX m17RX;
|
|
||||||
CM17TX m17TX;
|
|
||||||
|
|
||||||
CNXDNRX nxdnRX;
|
CNXDNRX nxdnRX;
|
||||||
CNXDNTX nxdnTX;
|
CNXDNTX nxdnTX;
|
||||||
|
|
||||||
|
|
@ -119,9 +115,6 @@ void loop()
|
||||||
if (m_nxdnEnable && m_modemState == STATE_NXDN)
|
if (m_nxdnEnable && m_modemState == STATE_NXDN)
|
||||||
nxdnTX.process();
|
nxdnTX.process();
|
||||||
|
|
||||||
if (m_m17Enable && m_modemState == STATE_M17)
|
|
||||||
m17TX.process();
|
|
||||||
|
|
||||||
if (m_pocsagEnable && (m_modemState == STATE_POCSAG || pocsagTX.busy()))
|
if (m_pocsagEnable && (m_modemState == STATE_POCSAG || pocsagTX.busy()))
|
||||||
pocsagTX.process();
|
pocsagTX.process();
|
||||||
|
|
||||||
|
|
|
||||||
66
Makefile
66
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
# Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
# Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -110,20 +110,10 @@ else
|
||||||
MDDIRS=mkdir $@
|
MDDIRS=mkdir $@
|
||||||
|
|
||||||
ifeq ($(shell uname -s),Linux)
|
ifeq ($(shell uname -s),Linux)
|
||||||
ST_FLASH_ON_PATH=$(shell which st-flash)
|
|
||||||
ST_FLASH_IS_ON_PATH=$(.SHELLSTATUS)
|
|
||||||
ifeq ($(shell uname -m),x86_64)
|
ifeq ($(shell uname -m),x86_64)
|
||||||
DFU_RST=./$(F1_LIB_PATH)/utils/linux64/upload-reset
|
DFU_RST=./$(F1_LIB_PATH)/utils/linux64/upload-reset
|
||||||
DFU_UTIL=./$(F1_LIB_PATH)/utils/linux64/dfu-util
|
DFU_UTIL=./$(F1_LIB_PATH)/utils/linux64/dfu-util
|
||||||
DFU_RST=./$(F1_LIB_PATH)/utils/linux64/upload-reset
|
ST_FLASH=./$(F1_LIB_PATH)/utils/linux64/st-flash
|
||||||
DFU_UTIL=./$(F1_LIB_PATH)/utils/linux64/dfu-util
|
|
||||||
ifeq ($(ST_FLASH_IS_ON_PATH),0)
|
|
||||||
ST_FLASH=$(ST_FLASH_ON_PATH)
|
|
||||||
ST_FLASH_OPTS=--flash=128k
|
|
||||||
else
|
|
||||||
ST_FLASH=./$(F1_LIB_PATH)/utils/linux64/st-flash
|
|
||||||
ST_FLASH_OPTS=
|
|
||||||
endif
|
|
||||||
STM32FLASH=./$(F1_LIB_PATH)/utils/linux64/stm32flash
|
STM32FLASH=./$(F1_LIB_PATH)/utils/linux64/stm32flash
|
||||||
else ifeq ($(shell uname -m),armv7l)
|
else ifeq ($(shell uname -m),armv7l)
|
||||||
DFU_RST=./$(F1_LIB_PATH)/utils/rpi32/upload-reset
|
DFU_RST=./$(F1_LIB_PATH)/utils/rpi32/upload-reset
|
||||||
|
|
@ -138,13 +128,7 @@ else
|
||||||
else
|
else
|
||||||
DFU_RST=./$(F1_LIB_PATH)/utils/linux/upload-reset
|
DFU_RST=./$(F1_LIB_PATH)/utils/linux/upload-reset
|
||||||
DFU_UTIL=./$(F1_LIB_PATH)/utils/linux/dfu-util
|
DFU_UTIL=./$(F1_LIB_PATH)/utils/linux/dfu-util
|
||||||
ifeq ($(ST_FLASH_IS_ON_PATH),0)
|
ST_FLASH=./$(F1_LIB_PATH)/utils/linux/st-flash
|
||||||
ST_FLASH=$(ST_FLASH_ON_PATH)
|
|
||||||
ST_FLASH_OPTS=--flash=128k
|
|
||||||
else
|
|
||||||
ST_FLASH=./$(F1_LIB_PATH)/utils/linux/st-flash
|
|
||||||
ST_FLASH_OPTS=
|
|
||||||
endif
|
|
||||||
STM32FLASH=./$(F1_LIB_PATH)/utils/linux/stm32flash
|
STM32FLASH=./$(F1_LIB_PATH)/utils/linux/stm32flash
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
@ -421,20 +405,18 @@ clean:
|
||||||
$(RM) GitVersion.h
|
$(RM) GitVersion.h
|
||||||
|
|
||||||
stlink:
|
stlink:
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write bin/$(BINBIN_F1) 0x8000000
|
$(ST_FLASH) write bin/$(BINBIN_F1) 0x8000000
|
||||||
|
|
||||||
stlink-nobl:
|
stlink-nobl:
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write bin/$(BINBIN_F1NOBL) 0x8000000
|
$(ST_FLASH) write bin/$(BINBIN_F1NOBL) 0x8000000
|
||||||
|
|
||||||
stlink-bl:
|
stlink-bl:
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13_long_rst.bin 0x8000000
|
$(ST_FLASH) write $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13_long_rst.bin 0x8000000
|
||||||
sleep 3
|
$(ST_FLASH) write bin/$(BINBIN_F1BL) 0x8002000
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write bin/$(BINBIN_F1BL) 0x8002000
|
|
||||||
|
|
||||||
stlink-bl-old:
|
stlink-bl-old:
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13.bin 0x8000000
|
$(ST_FLASH) write $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13.bin 0x8000000
|
||||||
sleep 3
|
$(ST_FLASH) write bin/$(BINBIN_F1BL) 0x8002000
|
||||||
$(ST_FLASH) $(ST_FLASH_OPTS) write bin/$(BINBIN_F1BL) 0x8002000
|
|
||||||
|
|
||||||
serial:
|
serial:
|
||||||
$(STM32FLASH) -v -w bin/$(BINBIN_F1) -g 0x0 $(devser)
|
$(STM32FLASH) -v -w bin/$(BINBIN_F1) -g 0x0 $(devser)
|
||||||
|
|
@ -444,12 +426,10 @@ serial-nobl:
|
||||||
|
|
||||||
serial-bl:
|
serial-bl:
|
||||||
$(STM32FLASH) -v -w $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13_long_rst.bin -g 0x0 $(devser)
|
$(STM32FLASH) -v -w $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13_long_rst.bin -g 0x0 $(devser)
|
||||||
sleep 3
|
|
||||||
$(STM32FLASH) -v -w bin/$(BINBIN_F1BL) -g 0x0 -S 0x08002000 $(devser)
|
$(STM32FLASH) -v -w bin/$(BINBIN_F1BL) -g 0x0 -S 0x08002000 $(devser)
|
||||||
|
|
||||||
serial-bl-old:
|
serial-bl-old:
|
||||||
$(STM32FLASH) -v -w $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13.bin -g 0x0 $(devser)
|
$(STM32FLASH) -v -w $(F1_LIB_PATH)/utils/bootloader/generic_boot20_pc13.bin -g 0x0 $(devser)
|
||||||
sleep 3
|
|
||||||
$(STM32FLASH) -v -w bin/$(BINBIN_F1BL) -g 0x0 -S 0x08002000 $(devser)
|
$(STM32FLASH) -v -w bin/$(BINBIN_F1BL) -g 0x0 -S 0x08002000 $(devser)
|
||||||
|
|
||||||
nano-hotspot:
|
nano-hotspot:
|
||||||
|
|
@ -463,20 +443,11 @@ endif
|
||||||
|
|
||||||
nano-dv:
|
nano-dv:
|
||||||
ifneq ($(wildcard /usr/local/bin/stm32flash),)
|
ifneq ($(wildcard /usr/local/bin/stm32flash),)
|
||||||
/usr/local/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 66,-67,67:-66,67 /dev/ttyAMA0
|
/usr/local/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 67,-66,66:-67,66 /dev/ttyAMA0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard /usr/bin/stm32flash),)
|
ifneq ($(wildcard /usr/bin/stm32flash),)
|
||||||
/usr/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 66,-67,67:-66,67 /dev/ttyAMA0
|
/usr/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 67,-66,66:-67,66 /dev/ttyAMA0
|
||||||
endif
|
|
||||||
|
|
||||||
d2rg_mmdvm_hs:
|
|
||||||
ifneq ($(wildcard /usr/local/bin/stm32flash),)
|
|
||||||
/usr/local/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 23,-22,22:-23,22 /dev/ttySC0
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(wildcard /usr/bin/stm32flash),)
|
|
||||||
/usr/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 23,-22,22:-23,22 /dev/ttySC0
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
zumspot-pi:
|
zumspot-pi:
|
||||||
|
|
@ -492,21 +463,6 @@ mmdvm_hs_hat: zumspot-pi
|
||||||
|
|
||||||
mmdvm_hs_dual_hat: zumspot-pi
|
mmdvm_hs_dual_hat: zumspot-pi
|
||||||
|
|
||||||
skybridge: zumspot-pi
|
|
||||||
|
|
||||||
hotpot-opipc_opipcplus:
|
|
||||||
ifneq ($(wildcard /usr/local/bin/stm32flash),)
|
|
||||||
/usr/local/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 198,-199,199:-198,199 /dev/ttyS3
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(wildcard /usr/bin/stm32flash),)
|
|
||||||
/usr/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 198,-199,199:-198,199 /dev/ttyS3
|
|
||||||
endif
|
|
||||||
|
|
||||||
mmdvm_hs_hat_opi: hotpot-opipc_opipcplus
|
|
||||||
|
|
||||||
mmdvm_hs_dual_hat_opi: hotpot-opipc_opipcplus
|
|
||||||
|
|
||||||
dfu:
|
dfu:
|
||||||
ifdef devser
|
ifdef devser
|
||||||
$(DFU_RST) $(devser) 750
|
$(DFU_RST) $(devser) 750
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ m_buffer(1500U),
|
||||||
m_poBuffer(),
|
m_poBuffer(),
|
||||||
m_poLen(0U),
|
m_poLen(0U),
|
||||||
m_poPtr(0U),
|
m_poPtr(0U),
|
||||||
m_txDelay(60U), // 50ms (reduced for TPT support)
|
m_txDelay(240U), // 200ms
|
||||||
m_delay(false)
|
m_delay(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +111,7 @@ void CP25TX::writeByte(uint8_t c)
|
||||||
|
|
||||||
void CP25TX::setTXDelay(uint8_t delay)
|
void CP25TX::setTXDelay(uint8_t delay)
|
||||||
{
|
{
|
||||||
m_txDelay = 60U + uint16_t(delay) * 12U; // 50ms + tx delay (reduced for TPT support)
|
m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t CP25TX::getSpace() const
|
uint16_t CP25TX::getSpace() const
|
||||||
|
|
|
||||||
36
POCSAGTX.cpp
36
POCSAGTX.cpp
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2019 by Florian Wolters DF2ET
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -29,18 +28,12 @@ m_poBuffer(),
|
||||||
m_poLen(0U),
|
m_poLen(0U),
|
||||||
m_poPtr(0U),
|
m_poPtr(0U),
|
||||||
m_txDelay(POCSAG_PREAMBLE_LENGTH_BYTES),
|
m_txDelay(POCSAG_PREAMBLE_LENGTH_BYTES),
|
||||||
m_delay(false),
|
m_delay(false)
|
||||||
m_cal(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPOCSAGTX::process()
|
void CPOCSAGTX::process()
|
||||||
{
|
{
|
||||||
if (m_cal) {
|
|
||||||
m_delay = false;
|
|
||||||
createCal();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_poLen == 0U && m_buffer.getData() > 0U) {
|
if (m_poLen == 0U && m_buffer.getData() > 0U) {
|
||||||
if (!m_tx) {
|
if (!m_tx) {
|
||||||
m_delay = true;
|
m_delay = true;
|
||||||
|
|
@ -127,28 +120,3 @@ uint8_t CPOCSAGTX::getSpace() const
|
||||||
{
|
{
|
||||||
return m_buffer.getSpace() / POCSAG_FRAME_LENGTH_BYTES;
|
return m_buffer.getSpace() / POCSAG_FRAME_LENGTH_BYTES;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t CPOCSAGTX::setCal(const uint8_t* data, uint8_t length)
|
|
||||||
{
|
|
||||||
if (length != 1U)
|
|
||||||
return 4U;
|
|
||||||
|
|
||||||
m_cal = data[0U] == 1U;
|
|
||||||
|
|
||||||
if (m_cal)
|
|
||||||
io.ifConf(STATE_POCSAG, true);
|
|
||||||
|
|
||||||
return 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPOCSAGTX::createCal()
|
|
||||||
{
|
|
||||||
// 600 Hz square wave generation
|
|
||||||
for (unsigned int i = 0U; i < POCSAG_FRAME_LENGTH_BYTES; i++) {
|
|
||||||
m_poBuffer[i] = 0xAAU;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_poLen = POCSAG_FRAME_LENGTH_BYTES;
|
|
||||||
|
|
||||||
m_poPtr = 0U;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2019 by Florian Wolters DF2ET
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -29,10 +28,6 @@ public:
|
||||||
|
|
||||||
void setTXDelay(uint8_t delay);
|
void setTXDelay(uint8_t delay);
|
||||||
|
|
||||||
uint8_t setCal(const uint8_t* data, uint8_t length);
|
|
||||||
|
|
||||||
void createCal();
|
|
||||||
|
|
||||||
uint8_t getSpace() const;
|
uint8_t getSpace() const;
|
||||||
|
|
||||||
void process();
|
void process();
|
||||||
|
|
@ -46,7 +41,6 @@ private:
|
||||||
uint16_t m_poPtr;
|
uint16_t m_poPtr;
|
||||||
uint16_t m_txDelay;
|
uint16_t m_txDelay;
|
||||||
bool m_delay;
|
bool m_delay;
|
||||||
bool m_cal;
|
|
||||||
|
|
||||||
void writeByte(uint8_t c);
|
void writeByte(uint8_t c);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
61
README.md
61
README.md
|
|
@ -119,23 +119,18 @@ This utility includes firmwares binaries and USB drivers for Windows 7/8/10. If
|
||||||
|
|
||||||
Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board:
|
Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board:
|
||||||
|
|
||||||
- install_fw_librekit.sh: only for ZUMspot Libre Kit board (KI6ZUM & VE2GZI) or generic MMDVM_HS board with USB interface
|
|
||||||
- install_fw_rpi.sh: only for ZUMspot RPi board (KI6ZUM & VE2GZI)
|
- install_fw_rpi.sh: only for ZUMspot RPi board (KI6ZUM & VE2GZI)
|
||||||
- install_fw_usb.sh: only for ZUMspot USB dongle (KI6ZUM)
|
|
||||||
- install_fw_duplex.sh: only for ZUMspot Duplex for RPi (KI6ZUM)
|
|
||||||
- install_fw_dualband.sh: only for ZUMspot Dualband for RPi (KI6ZUM)
|
|
||||||
- install_fw_hshat.sh: only for MMDVM_HS_Hat board (DB9MAT & DF2ET)
|
- install_fw_hshat.sh: only for MMDVM_HS_Hat board (DB9MAT & DF2ET)
|
||||||
- install_fw_hshat-12mhz.sh: only for MMDVM_HS_Hat board with 12.288 MHz TCXO (DB9MAT & DF2ET)
|
- install_fw_hshat-12mhz.sh: only for MMDVM_HS_Hat board with 12.288 MHz TCXO (DB9MAT & DF2ET)
|
||||||
- install_fw_hsdualhat.sh: only for MMDVM_HS_Dual_Hat board (DB9MAT & DF2ET & DO7EN)
|
|
||||||
- install_fw_hsdualhat-12mhz.sh: only for MMDVM_HS_Dual_Hat board with 12.288 MHz TCXO (DB9MAT & DF2ET & DO7EN)
|
|
||||||
- install_fw_nanohs.sh: only for Nano hotSPOT board (BI7JTA)
|
- install_fw_nanohs.sh: only for Nano hotSPOT board (BI7JTA)
|
||||||
- install_fw_nanodv_npi.sh: only for NanoDV NPi board 1.0 (BG4TGO & BG5HHP)
|
- install_fw_nanodv_npi.sh: only for NanoDV NPi board 1.0 (BG4TGO & BG5HHP)
|
||||||
- install_fw_nanodv_usb.sh: only for NanoDV USB board 1.0 (BG4TGO & BG5HHP)
|
- install_fw_nanodv_usb.sh: only for NanoDV USB board 1.0 (BG4TGO & BG5HHP)
|
||||||
- install_fw_d2rg_mmdvmhs.sh: only for D2RG MMDVM_HS board (BG3MDO, VE2GZI, CA6JAU)
|
- install_fw_hsdualhat.sh: only for MMDVM_HS_Dual_Hat board (DB9MAT & DF2ET & DO7EN)
|
||||||
|
- install_fw_librekit.sh: only for ZUMspot Libre Kit board (KI6ZUM & VE2GZI) or generic MMDVM_HS board with USB interface
|
||||||
|
- install_fw_usb.sh: only for ZUMspot USB dongle (KI6ZUM & VE2GZI)
|
||||||
|
- install_fw_duplex.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with USB interface
|
||||||
- install_fw_gen_gpio.sh: only for generic MMDVM_HS board (EA7GIB) with GPIO serial interface
|
- install_fw_gen_gpio.sh: only for generic MMDVM_HS board (EA7GIB) with GPIO serial interface
|
||||||
- install_fw_duplex_gpio.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with GPIO serial interface
|
- install_fw_duplex_gpio.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with GPIO serial interface
|
||||||
- install_fw_duplex_usb.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with USB interface
|
|
||||||
- install_fw_skybridge_rpi.sh: only for BridgeCom SkyBridge HotSpot
|
|
||||||
|
|
||||||
For example, download the ZUMspot RPi upgrade script:
|
For example, download the ZUMspot RPi upgrade script:
|
||||||
|
|
||||||
|
|
@ -152,10 +147,6 @@ stop your MMDVMHost process and run (you will need the root password):
|
||||||
|
|
||||||
and wait to complete the upgrading process.
|
and wait to complete the upgrading process.
|
||||||
|
|
||||||
You could optionally install a beta firmware for testing:
|
|
||||||
|
|
||||||
./install_fw_rpi.sh beta
|
|
||||||
|
|
||||||
## Build from the sources
|
## Build from the sources
|
||||||
|
|
||||||
You could use example files from MMDVM_HS/configs folder and overwrite the Config.h file, in order to compile a firmware with default settings. There are a specific config file for each ZUMspot or any MMDVM_HS compatible boards. In general, there are two possible compilation ways:
|
You could use example files from MMDVM_HS/configs folder and overwrite the Config.h file, in order to compile a firmware with default settings. There are a specific config file for each ZUMspot or any MMDVM_HS compatible boards. In general, there are two possible compilation ways:
|
||||||
|
|
@ -188,10 +179,6 @@ Some detailed examples as follows:
|
||||||
|
|
||||||
Please visit Mathis Schmieder GitHub [here](https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md) for detailed instructions.
|
Please visit Mathis Schmieder GitHub [here](https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md) for detailed instructions.
|
||||||
|
|
||||||
### D2RG MMDVM_HS board
|
|
||||||
|
|
||||||
This hotspot needs Raspbian support for SPI-UART converter included in this board. If you don't see /dev/ttySC0, please visit Yuan BG3MDO GitHub [here](https://github.com/bg3mdo/D2RG_MMDVM_HS_ambe_uart_service) for driver installation instructions.
|
|
||||||
|
|
||||||
### ZUMspot Libre Kit (under Linux Raspbian)
|
### ZUMspot Libre Kit (under Linux Raspbian)
|
||||||
|
|
||||||
If you are using Pi-Star, expand filesystem (if you haven't done before):
|
If you are using Pi-Star, expand filesystem (if you haven't done before):
|
||||||
|
|
@ -275,8 +262,6 @@ Install the necessary software tools:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
|
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
|
||||||
|
|
||||||
Note: The Pi-Star image contains an executable for stm32flash. The next five steps can be skipped!
|
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://git.code.sf.net/p/stm32flash/code stm32flash
|
git clone https://git.code.sf.net/p/stm32flash/code stm32flash
|
||||||
cd stm32flash
|
cd stm32flash
|
||||||
|
|
@ -320,41 +305,3 @@ Upload the firmware to ZUMspot RPi board:
|
||||||
|
|
||||||
sudo make zumspot-pi
|
sudo make zumspot-pi
|
||||||
|
|
||||||
### MMDVM_HS_Dual_Hat\MMDVM_HS_Hat gpio firmware update on OrangePI PC/PC2/PC Plus
|
|
||||||
|
|
||||||
Install the necessary software tools:
|
|
||||||
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
|
|
||||||
|
|
||||||
Download the sources:
|
|
||||||
|
|
||||||
cd ~
|
|
||||||
git clone https://github.com/juribeparada/MMDVM_HS
|
|
||||||
cd MMDVM_HS/
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
|
|
||||||
Install the tools for building firmware
|
|
||||||
|
|
||||||
cd MMDVM_HS/scripts
|
|
||||||
./install_buildtools.sh
|
|
||||||
|
|
||||||
Copy MMDVM_HS/configs/MMDVM_HS_Dual_Hat.h or MMDVM_HS/configs/MMDVM_HS_Hat.h (MMDVM_HS_Hat-12mhz.h) to MMDVM_HS/Config.h and build the firmware:
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
Stop the MMDVMHost services:
|
|
||||||
|
|
||||||
sudo systemctl stop mmdvmhost.timer
|
|
||||||
sudo systemctl stop mmdvmhost.service
|
|
||||||
|
|
||||||
Upload the firmware to mmdvm_hs_dual_hat (mmdvm_hs_hat) on OrangePi PC\PC2\PC Plus:
|
|
||||||
|
|
||||||
sudo make mmdvm_hs_dual_hat_opi (sudo make mmdvm_hs_hat_opi)
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
sudo /usr/local/bin/stm32flash -v -w bin/mmdvm_f1.bin -g 0x0 -R -i 198,-199,199:-198,199 /dev/ttyS3
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1debc23063f3942608e2bd62d04d5e1249c47fa3
|
Subproject commit 74ff93791264faef4c2d8e871b2877d24e0bd1c1
|
||||||
276
SerialPort.cpp
276
SerialPort.cpp
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013,2015,2016,2018,2020,2021 by Jonathan Naylor G4KLX
|
* Copyright (C) 2013,2015,2016,2018 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2016 by Colin Durbridge G4EML
|
* Copyright (C) 2016 by Colin Durbridge G4EML
|
||||||
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2019 by Florian Wolters DF2ET
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -60,12 +59,6 @@ const uint8_t MMDVM_P25_LOST = 0x32U;
|
||||||
const uint8_t MMDVM_NXDN_DATA = 0x40U;
|
const uint8_t MMDVM_NXDN_DATA = 0x40U;
|
||||||
const uint8_t MMDVM_NXDN_LOST = 0x41U;
|
const uint8_t MMDVM_NXDN_LOST = 0x41U;
|
||||||
|
|
||||||
const uint8_t MMDVM_M17_LINK_SETUP = 0x45U;
|
|
||||||
const uint8_t MMDVM_M17_STREAM = 0x46U;
|
|
||||||
const uint8_t MMDVM_M17_PACKET = 0x47U;
|
|
||||||
const uint8_t MMDVM_M17_LOST = 0x48U;
|
|
||||||
const uint8_t MMDVM_M17_EOT = 0x49U;
|
|
||||||
|
|
||||||
const uint8_t MMDVM_POCSAG_DATA = 0x50U;
|
const uint8_t MMDVM_POCSAG_DATA = 0x50U;
|
||||||
|
|
||||||
const uint8_t MMDVM_ACK = 0x70U;
|
const uint8_t MMDVM_ACK = 0x70U;
|
||||||
|
|
@ -84,16 +77,10 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
|
||||||
|
|
||||||
const uint8_t PROTOCOL_VERSION = 1U;
|
const uint8_t PROTOCOL_VERSION = 1U;
|
||||||
|
|
||||||
#if defined(ENABLE_UDID)
|
|
||||||
char UDID[] = "00000000000000000000000000000000";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CSerialPort::CSerialPort() :
|
CSerialPort::CSerialPort() :
|
||||||
m_buffer(),
|
m_buffer(),
|
||||||
m_ptr(0U),
|
m_ptr(0U),
|
||||||
m_len(0U),
|
m_len(0U),
|
||||||
m_serial_buffer(),
|
|
||||||
m_serial_len(0U),
|
|
||||||
m_debug(false),
|
m_debug(false),
|
||||||
m_firstCal(false)
|
m_firstCal(false)
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +119,7 @@ void CSerialPort::getStatus()
|
||||||
|
|
||||||
// Send all sorts of interesting internal values
|
// Send all sorts of interesting internal values
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
reply[0U] = MMDVM_FRAME_START;
|
||||||
reply[1U] = 14U;
|
reply[1U] = 13U;
|
||||||
reply[2U] = MMDVM_GET_STATUS;
|
reply[2U] = MMDVM_GET_STATUS;
|
||||||
|
|
||||||
reply[3U] = 0x00U;
|
reply[3U] = 0x00U;
|
||||||
|
|
@ -148,8 +135,6 @@ void CSerialPort::getStatus()
|
||||||
reply[3U] |= 0x10U;
|
reply[3U] |= 0x10U;
|
||||||
if (m_pocsagEnable)
|
if (m_pocsagEnable)
|
||||||
reply[3U] |= 0x20U;
|
reply[3U] |= 0x20U;
|
||||||
if (m_m17Enable)
|
|
||||||
reply[3U] |= 0x80U;
|
|
||||||
|
|
||||||
reply[4U] = uint8_t(m_modemState);
|
reply[4U] = uint8_t(m_modemState);
|
||||||
|
|
||||||
|
|
@ -204,17 +189,12 @@ void CSerialPort::getStatus()
|
||||||
else
|
else
|
||||||
reply[12U] = 0U;
|
reply[12U] = 0U;
|
||||||
|
|
||||||
if (m_m17Enable)
|
writeInt(1U, reply, 13);
|
||||||
reply[13U] = m17TX.getSpace();
|
|
||||||
else
|
|
||||||
reply[13U] = 0U;
|
|
||||||
|
|
||||||
writeInt(1U, reply, 14);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSerialPort::getVersion()
|
void CSerialPort::getVersion()
|
||||||
{
|
{
|
||||||
uint8_t reply[132U];
|
uint8_t reply[100U];
|
||||||
|
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
reply[0U] = MMDVM_FRAME_START;
|
||||||
reply[1U] = 0U;
|
reply[1U] = 0U;
|
||||||
|
|
@ -226,12 +206,6 @@ void CSerialPort::getVersion()
|
||||||
for (uint8_t i = 0U; HARDWARE[i] != 0x00U; i++, count++)
|
for (uint8_t i = 0U; HARDWARE[i] != 0x00U; i++, count++)
|
||||||
reply[count] = HARDWARE[i];
|
reply[count] = HARDWARE[i];
|
||||||
|
|
||||||
#if defined(ENABLE_UDID)
|
|
||||||
reply[count++] = '\0';
|
|
||||||
for (uint8_t i = 0U; UDID[i] != 0x00U; i++, count++)
|
|
||||||
reply[count] = UDID[i];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
reply[1U] = count;
|
reply[1U] = count;
|
||||||
|
|
||||||
writeInt(1U, reply, count);
|
writeInt(1U, reply, count);
|
||||||
|
|
@ -239,7 +213,7 @@ void CSerialPort::getVersion()
|
||||||
|
|
||||||
uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
{
|
{
|
||||||
if (length < 23U)
|
if (length < 13U)
|
||||||
return 4U;
|
return 4U;
|
||||||
|
|
||||||
bool ysfLoDev = (data[0U] & 0x08U) == 0x08U;
|
bool ysfLoDev = (data[0U] & 0x08U) == 0x08U;
|
||||||
|
|
@ -253,7 +227,6 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
bool p25Enable = (data[1U] & 0x08U) == 0x08U;
|
bool p25Enable = (data[1U] & 0x08U) == 0x08U;
|
||||||
bool nxdnEnable = (data[1U] & 0x10U) == 0x10U;
|
bool nxdnEnable = (data[1U] & 0x10U) == 0x10U;
|
||||||
bool pocsagEnable = (data[1U] & 0x20U) == 0x20U;
|
bool pocsagEnable = (data[1U] & 0x20U) == 0x20U;
|
||||||
bool m17Enable = (data[1U] & 0x40U) == 0x40U;
|
|
||||||
|
|
||||||
uint8_t txDelay = data[2U];
|
uint8_t txDelay = data[2U];
|
||||||
if (txDelay > 50U)
|
if (txDelay > 50U)
|
||||||
|
|
@ -261,7 +234,7 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
|
|
||||||
MMDVM_STATE modemState = MMDVM_STATE(data[3U]);
|
MMDVM_STATE modemState = MMDVM_STATE(data[3U]);
|
||||||
|
|
||||||
if (modemState != STATE_IDLE && modemState != STATE_DSTAR && modemState != STATE_DMR && modemState != STATE_YSF && modemState != STATE_P25 && modemState != STATE_NXDN && modemState != STATE_M17 && modemState != STATE_POCSAG && modemState != STATE_DSTARCAL && modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_INTCAL && modemState != STATE_RSSICAL && modemState != STATE_POCSAGCAL)
|
if (modemState != STATE_IDLE && modemState != STATE_DSTAR && modemState != STATE_DMR && modemState != STATE_YSF && modemState != STATE_P25 && modemState != STATE_NXDN && modemState != STATE_POCSAG && modemState != STATE_DSTARCAL && modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_INTCAL && modemState != STATE_RSSICAL)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_DSTAR && !dstarEnable)
|
if (modemState == STATE_DSTAR && !dstarEnable)
|
||||||
return 4U;
|
return 4U;
|
||||||
|
|
@ -275,8 +248,6 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_POCSAG && !pocsagEnable)
|
if (modemState == STATE_POCSAG && !pocsagEnable)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_M17 && !m17Enable)
|
|
||||||
return 4U;
|
|
||||||
|
|
||||||
uint8_t colorCode = data[6U];
|
uint8_t colorCode = data[6U];
|
||||||
if (colorCode > 15U)
|
if (colorCode > 15U)
|
||||||
|
|
@ -292,18 +263,22 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
uint8_t dmrTXLevel = data[10U];
|
uint8_t dmrTXLevel = data[10U];
|
||||||
uint8_t ysfTXLevel = data[11U];
|
uint8_t ysfTXLevel = data[11U];
|
||||||
uint8_t p25TXLevel = data[12U];
|
uint8_t p25TXLevel = data[12U];
|
||||||
uint8_t nxdnTXLevel = data[15U];
|
uint8_t nxdnTXLevel = 128U;
|
||||||
uint8_t pocsagTXLevel = data[17U];
|
uint8_t pocsagTXLevel = 128U;
|
||||||
uint8_t m17TXLevel = data[21U];
|
|
||||||
|
|
||||||
io.setDeviations(dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, m17TXLevel, pocsagTXLevel, ysfLoDev);
|
if (length >= 16U)
|
||||||
|
nxdnTXLevel = data[15U];
|
||||||
|
|
||||||
|
if (length >= 18U)
|
||||||
|
pocsagTXLevel = data[17U];
|
||||||
|
|
||||||
|
io.setDeviations(dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, ysfLoDev);
|
||||||
|
|
||||||
m_dstarEnable = dstarEnable;
|
m_dstarEnable = dstarEnable;
|
||||||
m_dmrEnable = dmrEnable;
|
m_dmrEnable = dmrEnable;
|
||||||
m_ysfEnable = ysfEnable;
|
m_ysfEnable = ysfEnable;
|
||||||
m_p25Enable = p25Enable;
|
m_p25Enable = p25Enable;
|
||||||
m_nxdnEnable = nxdnEnable;
|
m_nxdnEnable = nxdnEnable;
|
||||||
m_m17Enable = m17Enable;
|
|
||||||
m_pocsagEnable = pocsagEnable;
|
m_pocsagEnable = pocsagEnable;
|
||||||
|
|
||||||
if (modemState == STATE_DMRCAL || modemState == STATE_DMRDMO1K || modemState == STATE_RSSICAL || modemState == STATE_INTCAL) {
|
if (modemState == STATE_DMRCAL || modemState == STATE_DMRDMO1K || modemState == STATE_RSSICAL || modemState == STATE_INTCAL) {
|
||||||
|
|
@ -314,12 +289,6 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
io.updateCal();
|
io.updateCal();
|
||||||
if (modemState == STATE_RSSICAL)
|
if (modemState == STATE_RSSICAL)
|
||||||
io.ifConf(STATE_DMR, true);
|
io.ifConf(STATE_DMR, true);
|
||||||
} else if (modemState == STATE_POCSAGCAL) {
|
|
||||||
m_pocsagEnable = true;
|
|
||||||
m_modemState = STATE_POCSAG;
|
|
||||||
m_calState = modemState;
|
|
||||||
if (m_firstCal)
|
|
||||||
io.updateCal();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_modemState = modemState;
|
m_modemState = modemState;
|
||||||
|
|
@ -333,18 +302,12 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
DEBUG1("Full duplex not supported with this firmware");
|
DEBUG1("Full duplex not supported with this firmware");
|
||||||
return 6U;
|
return 6U;
|
||||||
}
|
}
|
||||||
#elif defined(DUPLEX) && (defined(ZUMSPOT_ADF7021) || defined(LONESTAR_USB) || defined(SKYBRIDGE_HS))
|
|
||||||
if (io.isDualBand() && m_duplex && m_calState == STATE_IDLE && modemState != STATE_DSTARCAL) {
|
|
||||||
DEBUG1("Full duplex is not supported on this board");
|
|
||||||
return 6U;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dstarTX.setTXDelay(txDelay);
|
dstarTX.setTXDelay(txDelay);
|
||||||
ysfTX.setTXDelay(txDelay);
|
ysfTX.setTXDelay(txDelay);
|
||||||
p25TX.setTXDelay(txDelay);
|
p25TX.setTXDelay(txDelay);
|
||||||
nxdnTX.setTXDelay(txDelay);
|
nxdnTX.setTXDelay(txDelay);
|
||||||
m17TX.setTXDelay(txDelay);
|
|
||||||
pocsagTX.setTXDelay(txDelay);
|
pocsagTX.setTXDelay(txDelay);
|
||||||
dmrDMOTX.setTXDelay(txDelay);
|
dmrDMOTX.setTXDelay(txDelay);
|
||||||
|
|
||||||
|
|
@ -359,7 +322,7 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
|
|
||||||
io.setLoDevYSF(ysfLoDev);
|
io.setLoDevYSF(ysfLoDev);
|
||||||
|
|
||||||
if (!m_firstCal || (modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_RSSICAL && modemState != STATE_INTCAL && modemState != STATE_POCSAGCAL)) {
|
if (!m_firstCal || (modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_RSSICAL && modemState != STATE_INTCAL)) {
|
||||||
if(m_dstarEnable)
|
if(m_dstarEnable)
|
||||||
io.ifConf(STATE_DSTAR, true);
|
io.ifConf(STATE_DSTAR, true);
|
||||||
else if(m_dmrEnable)
|
else if(m_dmrEnable)
|
||||||
|
|
@ -370,8 +333,6 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
io.ifConf(STATE_P25, true);
|
io.ifConf(STATE_P25, true);
|
||||||
else if(m_nxdnEnable)
|
else if(m_nxdnEnable)
|
||||||
io.ifConf(STATE_NXDN, true);
|
io.ifConf(STATE_NXDN, true);
|
||||||
else if(m_m17Enable)
|
|
||||||
io.ifConf(STATE_M17, true);
|
|
||||||
else if(m_pocsagEnable)
|
else if(m_pocsagEnable)
|
||||||
io.ifConf(STATE_POCSAG, true);
|
io.ifConf(STATE_POCSAG, true);
|
||||||
}
|
}
|
||||||
|
|
@ -381,7 +342,7 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
||||||
io.printConf();
|
io.printConf();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (modemState == STATE_DMRCAL || modemState == STATE_DMRDMO1K || modemState == STATE_RSSICAL || modemState == STATE_INTCAL || modemState == STATE_POCSAGCAL)
|
if (modemState == STATE_DMRCAL || modemState == STATE_DMRDMO1K || modemState == STATE_RSSICAL || modemState == STATE_INTCAL)
|
||||||
m_firstCal = true;
|
m_firstCal = true;
|
||||||
|
|
||||||
return 0U;
|
return 0U;
|
||||||
|
|
@ -398,7 +359,7 @@ uint8_t CSerialPort::setMode(const uint8_t* data, uint8_t length)
|
||||||
if (modemState == m_modemState)
|
if (modemState == m_modemState)
|
||||||
return 0U;
|
return 0U;
|
||||||
|
|
||||||
if (modemState != STATE_IDLE && modemState != STATE_DSTAR && modemState != STATE_DMR && modemState != STATE_YSF && modemState != STATE_P25 && modemState != STATE_NXDN && modemState != STATE_M17 && modemState != STATE_POCSAG && modemState != STATE_DSTARCAL && modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_RSSICAL && modemState != STATE_INTCAL && modemState != STATE_POCSAGCAL)
|
if (modemState != STATE_IDLE && modemState != STATE_DSTAR && modemState != STATE_DMR && modemState != STATE_YSF && modemState != STATE_P25 && modemState != STATE_NXDN && modemState != STATE_POCSAG && modemState != STATE_DSTARCAL && modemState != STATE_DMRCAL && modemState != STATE_DMRDMO1K && modemState != STATE_RSSICAL && modemState != STATE_INTCAL)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_DSTAR && !m_dstarEnable)
|
if (modemState == STATE_DSTAR && !m_dstarEnable)
|
||||||
return 4U;
|
return 4U;
|
||||||
|
|
@ -410,8 +371,6 @@ uint8_t CSerialPort::setMode(const uint8_t* data, uint8_t length)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_NXDN && !m_nxdnEnable)
|
if (modemState == STATE_NXDN && !m_nxdnEnable)
|
||||||
return 4U;
|
return 4U;
|
||||||
if (modemState == STATE_M17 && !m_m17Enable)
|
|
||||||
return 4U;
|
|
||||||
if (modemState == STATE_POCSAG && !m_pocsagEnable)
|
if (modemState == STATE_POCSAG && !m_pocsagEnable)
|
||||||
return 4U;
|
return 4U;
|
||||||
|
|
||||||
|
|
@ -421,12 +380,6 @@ uint8_t CSerialPort::setMode(const uint8_t* data, uint8_t length)
|
||||||
m_calState = modemState;
|
m_calState = modemState;
|
||||||
if (m_firstCal)
|
if (m_firstCal)
|
||||||
io.updateCal();
|
io.updateCal();
|
||||||
} else if (modemState == STATE_POCSAGCAL) {
|
|
||||||
m_pocsagEnable = true;
|
|
||||||
tmpState = STATE_POCSAG;
|
|
||||||
m_calState = modemState;
|
|
||||||
if (m_firstCal)
|
|
||||||
io.updateCal();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tmpState = modemState;
|
tmpState = modemState;
|
||||||
|
|
@ -486,7 +439,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
p25RX.reset();
|
p25RX.reset();
|
||||||
nxdnRX.reset();
|
nxdnRX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_DSTAR:
|
case STATE_DSTAR:
|
||||||
|
|
@ -499,7 +451,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
p25RX.reset();
|
p25RX.reset();
|
||||||
nxdnRX.reset();
|
nxdnRX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_YSF:
|
case STATE_YSF:
|
||||||
|
|
@ -512,7 +463,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
p25RX.reset();
|
p25RX.reset();
|
||||||
nxdnRX.reset();
|
nxdnRX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_P25:
|
case STATE_P25:
|
||||||
|
|
@ -525,7 +475,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
nxdnRX.reset();
|
nxdnRX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_NXDN:
|
case STATE_NXDN:
|
||||||
|
|
@ -538,20 +487,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
p25RX.reset();
|
p25RX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
|
||||||
break;
|
|
||||||
case STATE_M17:
|
|
||||||
DEBUG1("Mode set to M17");
|
|
||||||
#if defined(DUPLEX)
|
|
||||||
dmrIdleRX.reset();
|
|
||||||
dmrRX.reset();
|
|
||||||
#endif
|
|
||||||
dmrDMORX.reset();
|
|
||||||
dstarRX.reset();
|
|
||||||
ysfRX.reset();
|
|
||||||
p25RX.reset();
|
|
||||||
nxdnRX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_POCSAG:
|
case STATE_POCSAG:
|
||||||
|
|
@ -565,7 +500,6 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
p25RX.reset();
|
p25RX.reset();
|
||||||
nxdnRX.reset();
|
nxdnRX.reset();
|
||||||
m17RX.reset();
|
|
||||||
cwIdTX.reset();
|
cwIdTX.reset();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -589,7 +523,7 @@ void CSerialPort::start()
|
||||||
beginInt(1U, 115200);
|
beginInt(1U, 115200);
|
||||||
|
|
||||||
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
||||||
beginInt(3U, SERIAL_REPEATER_BAUD);
|
beginInt(3U, 9600);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -658,8 +592,6 @@ void CSerialPort::process()
|
||||||
case MMDVM_CAL_DATA:
|
case MMDVM_CAL_DATA:
|
||||||
if (m_calState == STATE_DMRCAL || m_calState == STATE_DMRDMO1K) {
|
if (m_calState == STATE_DMRCAL || m_calState == STATE_DMRDMO1K) {
|
||||||
err = calDMR.write(m_buffer + 3U, m_len - 3U);
|
err = calDMR.write(m_buffer + 3U, m_len - 3U);
|
||||||
} else if (m_calState == STATE_POCSAGCAL) {
|
|
||||||
err = pocsagTX.setCal(m_buffer + 3U, m_len - 3U);
|
|
||||||
} else if (m_calState == STATE_RSSICAL || m_calState == STATE_INTCAL) {
|
} else if (m_calState == STATE_RSSICAL || m_calState == STATE_INTCAL) {
|
||||||
err = 0U;
|
err = 0U;
|
||||||
}
|
}
|
||||||
|
|
@ -867,48 +799,6 @@ void CSerialPort::process()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MMDVM_M17_LINK_SETUP:
|
|
||||||
if (m_m17Enable) {
|
|
||||||
if (m_modemState == STATE_IDLE || m_modemState == STATE_M17)
|
|
||||||
err = m17TX.writeData(m_buffer + 3U, m_len - 3U);
|
|
||||||
}
|
|
||||||
if (err == 0U) {
|
|
||||||
if (m_modemState == STATE_IDLE)
|
|
||||||
setMode(STATE_M17);
|
|
||||||
} else {
|
|
||||||
DEBUG2("Received invalid M17 link setup data", err);
|
|
||||||
sendNAK(err);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MMDVM_M17_STREAM:
|
|
||||||
if (m_m17Enable) {
|
|
||||||
if (m_modemState == STATE_IDLE || m_modemState == STATE_M17)
|
|
||||||
err = m17TX.writeData(m_buffer + 3U, m_len - 3U);
|
|
||||||
}
|
|
||||||
if (err == 0U) {
|
|
||||||
if (m_modemState == STATE_IDLE)
|
|
||||||
setMode(STATE_M17);
|
|
||||||
} else {
|
|
||||||
DEBUG2("Received invalid M17 stream data", err);
|
|
||||||
sendNAK(err);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MMDVM_M17_EOT:
|
|
||||||
if (m_m17Enable) {
|
|
||||||
if (m_modemState == STATE_IDLE || m_modemState == STATE_M17)
|
|
||||||
err = m17TX.writeData(m_buffer + 3U, m_len - 3U);
|
|
||||||
}
|
|
||||||
if (err == 0U) {
|
|
||||||
if (m_modemState == STATE_IDLE)
|
|
||||||
setMode(STATE_M17);
|
|
||||||
} else {
|
|
||||||
DEBUG2("Received invalid M17 EOT", err);
|
|
||||||
sendNAK(err);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MMDVM_POCSAG_DATA:
|
case MMDVM_POCSAG_DATA:
|
||||||
if (m_pocsagEnable) {
|
if (m_pocsagEnable) {
|
||||||
if (m_modemState == STATE_IDLE || m_modemState == STATE_POCSAG) {
|
if (m_modemState == STATE_IDLE || m_modemState == STATE_POCSAG) {
|
||||||
|
|
@ -954,54 +844,12 @@ void CSerialPort::process()
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
||||||
// Check for any incoming serial data from a device/screen on UART2
|
// Drain any incoming serial data
|
||||||
// !!Notice!! on powerup the Nextion screen dumps FF FF FF 88 FF FF FF to the serial port.
|
|
||||||
while (availableInt(3U))
|
while (availableInt(3U))
|
||||||
{
|
readInt(3U);
|
||||||
// read UART2
|
|
||||||
m_serial_buffer[m_serial_len++] = readInt(3U);
|
|
||||||
|
|
||||||
if (m_serial_len >=3 && (m_serial_buffer[m_serial_len - 3] == 0xFF) && (m_serial_buffer[m_serial_len - 2] == 0xFF) && (m_serial_buffer[m_serial_len - 1] == 0xFF))
|
|
||||||
{
|
|
||||||
if (m_serial_len > 3)
|
|
||||||
serial.writeSerialRpt(m_serial_buffer, m_serial_len);
|
|
||||||
|
|
||||||
// if the last 3 bytes are FF's then the screen is done sending data so send the m_serial_buffer to serial.writeSerialRpt()
|
|
||||||
//
|
|
||||||
// TODO - BG5HHP
|
|
||||||
// modem serial data repeat should be generic instead of coupling with the nextion protocol.
|
|
||||||
//
|
|
||||||
m_serial_len = 0U;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_serial_len == sizeof(m_serial_buffer))
|
|
||||||
{
|
|
||||||
// buffer overflow
|
|
||||||
m_serial_len = 0U;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
|
||||||
void CSerialPort::writeSerialRpt(const uint8_t* data, uint8_t length)
|
|
||||||
{
|
|
||||||
if (length == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t head[3];
|
|
||||||
head[0U] = MMDVM_FRAME_START;
|
|
||||||
head[1U] = length + 3;
|
|
||||||
head[2U] = MMDVM_SERIAL;
|
|
||||||
|
|
||||||
writeInt(1U, head, 3U);
|
|
||||||
writeInt(1U, data, length, true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void CSerialPort::writeDStarHeader(const uint8_t* header, uint8_t length)
|
void CSerialPort::writeDStarHeader(const uint8_t* header, uint8_t length)
|
||||||
{
|
{
|
||||||
if (m_modemState != STATE_DSTAR && m_modemState != STATE_IDLE)
|
if (m_modemState != STATE_DSTAR && m_modemState != STATE_IDLE)
|
||||||
|
|
@ -1264,86 +1112,6 @@ void CSerialPort::writeNXDNLost()
|
||||||
writeInt(1U, reply, 3);
|
writeInt(1U, reply, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSerialPort::writeM17LinkSetup(const uint8_t* data, uint8_t length)
|
|
||||||
{
|
|
||||||
if (m_modemState != STATE_M17 && m_modemState != STATE_IDLE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!m_m17Enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t reply[130U];
|
|
||||||
|
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
|
||||||
reply[1U] = 0U;
|
|
||||||
reply[2U] = MMDVM_M17_LINK_SETUP;
|
|
||||||
|
|
||||||
uint8_t count = 3U;
|
|
||||||
for (uint8_t i = 0U; i < length; i++, count++)
|
|
||||||
reply[count] = data[i];
|
|
||||||
|
|
||||||
reply[1U] = count;
|
|
||||||
|
|
||||||
writeInt(1U, reply, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSerialPort::writeM17Stream(const uint8_t* data, uint8_t length)
|
|
||||||
{
|
|
||||||
if (m_modemState != STATE_M17 && m_modemState != STATE_IDLE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!m_m17Enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t reply[130U];
|
|
||||||
|
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
|
||||||
reply[1U] = 0U;
|
|
||||||
reply[2U] = MMDVM_M17_STREAM;
|
|
||||||
|
|
||||||
uint8_t count = 3U;
|
|
||||||
for (uint8_t i = 0U; i < length; i++, count++)
|
|
||||||
reply[count] = data[i];
|
|
||||||
|
|
||||||
reply[1U] = count;
|
|
||||||
|
|
||||||
writeInt(1U, reply, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSerialPort::writeM17EOT()
|
|
||||||
{
|
|
||||||
if (m_modemState != STATE_M17 && m_modemState != STATE_IDLE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!m_m17Enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t reply[3U];
|
|
||||||
|
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
|
||||||
reply[1U] = 3U;
|
|
||||||
reply[2U] = MMDVM_M17_EOT;
|
|
||||||
|
|
||||||
writeInt(1U, reply, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSerialPort::writeM17Lost()
|
|
||||||
{
|
|
||||||
if (m_modemState != STATE_M17 && m_modemState != STATE_IDLE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!m_m17Enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t reply[3U];
|
|
||||||
|
|
||||||
reply[0U] = MMDVM_FRAME_START;
|
|
||||||
reply[1U] = 3U;
|
|
||||||
reply[2U] = MMDVM_M17_LOST;
|
|
||||||
|
|
||||||
writeInt(1U, reply, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(SEND_RSSI_DATA)
|
#if defined(SEND_RSSI_DATA)
|
||||||
|
|
||||||
void CSerialPort::writeRSSIData(const uint8_t* data, uint8_t length)
|
void CSerialPort::writeRSSIData(const uint8_t* data, uint8_t length)
|
||||||
|
|
|
||||||
14
SerialPort.h
14
SerialPort.h
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2018,2020,2021 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -30,10 +30,6 @@ public:
|
||||||
|
|
||||||
void process();
|
void process();
|
||||||
|
|
||||||
#if defined(SERIAL_REPEATER) || defined(SERIAL_REPEATER_USART1)
|
|
||||||
void writeSerialRpt(const uint8_t* data, uint8_t length);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void writeDStarHeader(const uint8_t* header, uint8_t length);
|
void writeDStarHeader(const uint8_t* header, uint8_t length);
|
||||||
void writeDStarData(const uint8_t* data, uint8_t length);
|
void writeDStarData(const uint8_t* data, uint8_t length);
|
||||||
void writeDStarLost();
|
void writeDStarLost();
|
||||||
|
|
@ -52,11 +48,6 @@ public:
|
||||||
void writeNXDNData(const uint8_t* data, uint8_t length);
|
void writeNXDNData(const uint8_t* data, uint8_t length);
|
||||||
void writeNXDNLost();
|
void writeNXDNLost();
|
||||||
|
|
||||||
void writeM17LinkSetup(const uint8_t* data, uint8_t length);
|
|
||||||
void writeM17Stream(const uint8_t* data, uint8_t length);
|
|
||||||
void writeM17EOT();
|
|
||||||
void writeM17Lost();
|
|
||||||
|
|
||||||
#if defined(SEND_RSSI_DATA)
|
#if defined(SEND_RSSI_DATA)
|
||||||
void writeRSSIData(const uint8_t* data, uint8_t length);
|
void writeRSSIData(const uint8_t* data, uint8_t length);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -74,9 +65,6 @@ private:
|
||||||
uint8_t m_buffer[256U];
|
uint8_t m_buffer[256U];
|
||||||
uint8_t m_ptr;
|
uint8_t m_ptr;
|
||||||
uint8_t m_len;
|
uint8_t m_len;
|
||||||
uint8_t m_serial_buffer[128U];
|
|
||||||
uint8_t m_serial_len;
|
|
||||||
|
|
||||||
bool m_debug;
|
bool m_debug;
|
||||||
bool m_firstCal;
|
bool m_firstCal;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||||
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
|
* Copyright (C) 2016,2017 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "SerialPort.h"
|
#include "SerialPort.h"
|
||||||
#include "I2CHost.h"
|
|
||||||
|
|
||||||
#if defined(STM32_USB_HOST)
|
#if defined(STM32_USB_HOST)
|
||||||
#include <usb_serial.h>
|
#include <usb_serial.h>
|
||||||
|
|
@ -33,9 +32,9 @@
|
||||||
Pin definitions:
|
Pin definitions:
|
||||||
|
|
||||||
- Host communication:
|
- Host communication:
|
||||||
1) USART1 - TXD PA9 - RXD PA10
|
USART1 - TXD PA9 - RXD PA10
|
||||||
2) USB VCOM
|
or
|
||||||
3) I2C - SCL PB10 - SDA PB11
|
USB VCOM
|
||||||
|
|
||||||
- Serial repeater
|
- Serial repeater
|
||||||
USART2 - TXD PA2 - RXD PA3
|
USART2 - TXD PA2 - RXD PA3
|
||||||
|
|
@ -433,45 +432,15 @@ void WriteUSART2(const uint8_t* data, uint16_t length)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
#if defined(ENABLE_UDID)
|
|
||||||
extern char UDID[];
|
|
||||||
extern "C" {
|
|
||||||
#include <stdio.h>
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CSerialPort::beginInt(uint8_t n, int speed)
|
void CSerialPort::beginInt(uint8_t n, int speed)
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_UDID)
|
|
||||||
#if defined(STM32F4XX)
|
|
||||||
uint32_t *id0 = (uint32_t *) (0x1FFF7A10);
|
|
||||||
uint32_t *id1 = (uint32_t *) (0x1FFF7A10 + 0x04);
|
|
||||||
uint32_t *id2 = (uint32_t *) (0x1FFF7A10 + 0x08);
|
|
||||||
::sprintf(UDID, "%08X%08X%08X", *(unsigned int *)id0, *(unsigned int *)id1, *(unsigned int *)id2);
|
|
||||||
|
|
||||||
#elif defined(STM32F7XX)
|
|
||||||
uint32_t *id0 = (uint32_t *) (0x1FF0F420);
|
|
||||||
uint32_t *id1 = (uint32_t *) (0x1FF0F420 + 0x04);
|
|
||||||
uint32_t *id2 = (uint32_t *) (0x1FF0F420 + 0x08);
|
|
||||||
::sprintf(UDID, "%08X%08X%08X", *(unsigned int *)id0, *(unsigned int *)id1, *(unsigned int *)id2);
|
|
||||||
|
|
||||||
#elif defined(STM32F10X_MD)
|
|
||||||
uint16_t *id00 = (uint16_t *) (0x1FFFF7E8);
|
|
||||||
uint16_t *id01 = (uint16_t *) (0x1FFFF7E8 + 0x02);
|
|
||||||
uint32_t *id1 = (uint32_t *) (0x1FFFF7E8 + 0x04);
|
|
||||||
uint32_t *id2 = (uint32_t *) (0x1FFFF7E8 + 0x08);
|
|
||||||
::sprintf(UDID, "%04X%04X%08X%08X", *id00, *id01, *(unsigned int *)id1, *(unsigned int *)id2);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 1U:
|
case 1U:
|
||||||
#if defined(STM32_USART1_HOST)
|
#if defined(STM32_USART1_HOST)
|
||||||
InitUSART1(speed);
|
InitUSART1(speed);
|
||||||
#elif defined(STM32_USB_HOST)
|
#elif defined(STM32_USB_HOST)
|
||||||
usbserial.begin();
|
usbserial.begin();
|
||||||
#elif defined(STM32_I2C_HOST)
|
|
||||||
i2c.Init();
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 3U:
|
case 3U:
|
||||||
|
|
@ -494,8 +463,6 @@ int CSerialPort::availableInt(uint8_t n)
|
||||||
return AvailUSART1();
|
return AvailUSART1();
|
||||||
#elif defined(STM32_USB_HOST)
|
#elif defined(STM32_USB_HOST)
|
||||||
return usbserial.available();
|
return usbserial.available();
|
||||||
#elif defined(STM32_I2C_HOST)
|
|
||||||
return i2c.AvailI2C();
|
|
||||||
#endif
|
#endif
|
||||||
case 3U:
|
case 3U:
|
||||||
#if defined(SERIAL_REPEATER)
|
#if defined(SERIAL_REPEATER)
|
||||||
|
|
@ -516,8 +483,6 @@ uint8_t CSerialPort::readInt(uint8_t n)
|
||||||
return ReadUSART1();
|
return ReadUSART1();
|
||||||
#elif defined(STM32_USB_HOST)
|
#elif defined(STM32_USB_HOST)
|
||||||
return usbserial.read();
|
return usbserial.read();
|
||||||
#elif defined(STM32_I2C_HOST)
|
|
||||||
return i2c.ReadI2C();
|
|
||||||
#endif
|
#endif
|
||||||
case 3U:
|
case 3U:
|
||||||
#if defined(SERIAL_REPEATER)
|
#if defined(SERIAL_REPEATER)
|
||||||
|
|
@ -536,14 +501,12 @@ void CSerialPort::writeInt(uint8_t n, const uint8_t* data, uint16_t length, bool
|
||||||
case 1U:
|
case 1U:
|
||||||
#if defined(STM32_USART1_HOST)
|
#if defined(STM32_USART1_HOST)
|
||||||
WriteUSART1(data, length);
|
WriteUSART1(data, length);
|
||||||
if (flush)
|
if (flush)
|
||||||
TXSerialFlush1();
|
TXSerialFlush1();
|
||||||
#elif defined(STM32_USB_HOST)
|
#elif defined(STM32_USB_HOST)
|
||||||
usbserial.write(data, length);
|
usbserial.write(data, length);
|
||||||
if (flush)
|
if (flush)
|
||||||
usbserial.flush();
|
usbserial.flush();
|
||||||
#elif defined(STM32_I2C_HOST)
|
|
||||||
i2c.WriteI2C(data, length);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 3U:
|
case 3U:
|
||||||
|
|
|
||||||
11
Utils.cpp
11
Utils.cpp
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -31,15 +31,6 @@ uint8_t countBits8(uint8_t bits)
|
||||||
return BITS_TABLE[bits];
|
return BITS_TABLE[bits];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t countBits16(uint16_t bits)
|
|
||||||
{
|
|
||||||
uint8_t* p = (uint8_t*)&bits;
|
|
||||||
uint8_t n = 0U;
|
|
||||||
n += BITS_TABLE[p[0U]];
|
|
||||||
n += BITS_TABLE[p[1U]];
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t countBits32(uint32_t bits)
|
uint8_t countBits32(uint32_t bits)
|
||||||
{
|
{
|
||||||
uint8_t* p = (uint8_t*)&bits;
|
uint8_t* p = (uint8_t*)&bits;
|
||||||
|
|
|
||||||
4
Utils.h
4
Utils.h
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||||
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
* Copyright (C) 2017 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
|
|
||||||
uint8_t countBits8(uint8_t bits);
|
uint8_t countBits8(uint8_t bits);
|
||||||
|
|
||||||
uint8_t countBits16(uint16_t bits);
|
|
||||||
|
|
||||||
uint8_t countBits32(uint32_t bits);
|
uint8_t countBits32(uint32_t bits);
|
||||||
|
|
||||||
uint8_t countBits64(uint64_t bits);
|
uint8_t countBits64(uint64_t bits);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
const uint8_t SYNC_BIT_START_ERRS = 2U;
|
const uint8_t SYNC_BIT_START_ERRS = 2U;
|
||||||
const uint8_t SYNC_BIT_RUN_ERRS = 4U;
|
const uint8_t SYNC_BIT_RUN_ERRS = 4U;
|
||||||
|
|
||||||
const unsigned int MAX_SYNC_FRAMES = 1U + 1U;
|
const unsigned int MAX_SYNC_FRAMES = 4U + 1U;
|
||||||
|
|
||||||
const uint8_t BIT_MASK_TABLE[] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U};
|
const uint8_t BIT_MASK_TABLE[] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_H)
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
|
||||||
// #define ZUMSPOT_ADF7021
|
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
|
||||||
// #define LIBRE_KIT_ADF7021
|
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
|
||||||
// #define MMDVM_HS_HAT_REV12
|
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
|
||||||
// #define NANO_HOTSPOT
|
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
|
||||||
// #define NANO_DV_REV10
|
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
#define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
|
||||||
#define ENABLE_ADF7021
|
|
||||||
|
|
||||||
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
|
|
||||||
// #define DUPLEX
|
|
||||||
|
|
||||||
// TCXO of the ADF7021
|
|
||||||
// For 14.7456 MHz:
|
|
||||||
#define ADF7021_14_7456
|
|
||||||
// For 12.2880 MHz:
|
|
||||||
// #define ADF7021_12_2880
|
|
||||||
|
|
||||||
// Configure receiver gain for ADF7021
|
|
||||||
// AGC automatic, default settings:
|
|
||||||
#define AD7021_GAIN_AUTO
|
|
||||||
// AGC automatic with high LNA linearity:
|
|
||||||
// #define AD7021_GAIN_AUTO_LIN
|
|
||||||
// AGC OFF, lowest gain:
|
|
||||||
// #define AD7021_GAIN_LOW
|
|
||||||
// AGC OFF, highest gain:
|
|
||||||
// #define AD7021_GAIN_HIGH
|
|
||||||
|
|
||||||
// Host communication selection:
|
|
||||||
#define STM32_USART1_HOST
|
|
||||||
// #define STM32_USB_HOST
|
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
|
||||||
#define ENABLE_SCAN_MODE
|
|
||||||
|
|
||||||
// Send RSSI value:
|
|
||||||
#define SEND_RSSI_DATA
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
|
||||||
#define SERIAL_REPEATER
|
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
|
||||||
// #define SERIAL_REPEATER_USART1
|
|
||||||
|
|
||||||
// Enable P25 Wide modulation:
|
|
||||||
// #define ENABLE_P25_WIDE
|
|
||||||
|
|
||||||
// Disable mode LEDs blink during scan mode:
|
|
||||||
// #define QUIET_MODE_LEDS
|
|
||||||
|
|
||||||
// Engage a constant or descreet Service LED mode once repeater is running
|
|
||||||
// #define CONSTANT_SRV_LED
|
|
||||||
// #define CONSTANT_SRV_LED_INVERTED
|
|
||||||
// #define DISCREET_SRV_LED
|
|
||||||
// #define DISCREET_SRV_LED_INVERTED
|
|
||||||
|
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
|
||||||
// #define LONG_USB_RESET
|
|
||||||
|
|
||||||
// Enable modem debug messages
|
|
||||||
#define ENABLE_DEBUG
|
|
||||||
|
|
||||||
// Disable frequency bands check
|
|
||||||
// #define DISABLE_FREQ_CHECK
|
|
||||||
|
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
|
||||||
// #define DISABLE_FREQ_BAN
|
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_H)
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
|
||||||
// #define ZUMSPOT_ADF7021
|
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
|
||||||
// #define LIBRE_KIT_ADF7021
|
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
|
||||||
// #define MMDVM_HS_HAT_REV12
|
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
|
||||||
// #define NANO_HOTSPOT
|
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
|
||||||
// #define NANO_DV_REV10
|
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
// 9) LoneStar USB Stick ADF7071
|
|
||||||
#define LONESTAR_USB
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
|
||||||
#define ENABLE_ADF7021
|
|
||||||
|
|
||||||
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
|
|
||||||
// #define DUPLEX
|
|
||||||
|
|
||||||
// TCXO of the ADF7021
|
|
||||||
// For 14.7456 MHz:
|
|
||||||
#define ADF7021_14_7456
|
|
||||||
// For 12.2880 MHz:
|
|
||||||
// #define ADF7021_12_2880
|
|
||||||
|
|
||||||
// Configure receiver gain for ADF7021
|
|
||||||
// AGC automatic, default settings:
|
|
||||||
#define AD7021_GAIN_AUTO
|
|
||||||
// AGC automatic with high LNA linearity:
|
|
||||||
// #define AD7021_GAIN_AUTO_LIN
|
|
||||||
// AGC OFF, lowest gain:
|
|
||||||
// #define AD7021_GAIN_LOW
|
|
||||||
// AGC OFF, highest gain:
|
|
||||||
// #define AD7021_GAIN_HIGH
|
|
||||||
|
|
||||||
// Host communication selection:
|
|
||||||
// #define STM32_USART1_HOST
|
|
||||||
#define STM32_USB_HOST
|
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
|
||||||
#define ENABLE_SCAN_MODE
|
|
||||||
|
|
||||||
// Send RSSI value:
|
|
||||||
#define SEND_RSSI_DATA
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
|
||||||
// #define SERIAL_REPEATER
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
|
||||||
// #define SERIAL_REPEATER_USART1
|
|
||||||
|
|
||||||
// Enable P25 Wide modulation:
|
|
||||||
// #define ENABLE_P25_WIDE
|
|
||||||
|
|
||||||
// Disable mode LEDs blink during scan mode:
|
|
||||||
// #define QUIET_MODE_LEDS
|
|
||||||
|
|
||||||
// Engage a constant or descreet Service LED mode once repeater is running
|
|
||||||
// #define CONSTANT_SRV_LED
|
|
||||||
// #define CONSTANT_SRV_LED_INVERTED
|
|
||||||
// #define DISCREET_SRV_LED
|
|
||||||
// #define DISCREET_SRV_LED_INVERTED
|
|
||||||
|
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
|
||||||
#define LONG_USB_RESET
|
|
||||||
|
|
||||||
// Enable modem debug messages
|
|
||||||
#define ENABLE_DEBUG
|
|
||||||
|
|
||||||
// Disable frequency bands check
|
|
||||||
// #define DISABLE_FREQ_CHECK
|
|
||||||
|
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
|
||||||
// #define DISABLE_FREQ_BAN
|
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
#define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
#define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
#define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
#define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -30,12 +30,8 @@
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
// #define MMDVM_HS_DUAL_HAT_REV10
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
// 5) Nano hotSPOT (BI7JTA)
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.1 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
#define NANO_DV_REV11
|
#define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,11 +86,8 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
// Enable for RPi 3B+, USB mode
|
||||||
// #define LONG_USB_RESET
|
// #define LONG_USB_RESET
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -30,12 +30,8 @@
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
// #define MMDVM_HS_DUAL_HAT_REV10
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
// 5) Nano hotSPOT (BI7JTA)
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.1 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
#define NANO_DV_REV11
|
#define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
// #define STM32_USART1_HOST
|
// #define STM32_USART1_HOST
|
||||||
#define STM32_USB_HOST
|
#define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,11 +86,8 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
#define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
// Enable for RPi 3B+, USB mode
|
||||||
#define LONG_USB_RESET
|
#define LONG_USB_RESET
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
#define NANO_HOTSPOT
|
#define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_H)
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
|
||||||
// #define ZUMSPOT_ADF7021
|
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
|
||||||
// #define LIBRE_KIT_ADF7021
|
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
|
||||||
// #define MMDVM_HS_HAT_REV12
|
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
|
||||||
// #define NANO_HOTSPOT
|
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
|
||||||
// #define NANO_DV_REV10
|
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
#define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
|
||||||
#define ENABLE_ADF7021
|
|
||||||
|
|
||||||
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
|
|
||||||
// #define DUPLEX
|
|
||||||
|
|
||||||
// TCXO of the ADF7021
|
|
||||||
// For 14.7456 MHz:
|
|
||||||
#define ADF7021_14_7456
|
|
||||||
// For 12.2880 MHz:
|
|
||||||
// #define ADF7021_12_2880
|
|
||||||
|
|
||||||
// Configure receiver gain for ADF7021
|
|
||||||
// AGC automatic, default settings:
|
|
||||||
#define AD7021_GAIN_AUTO
|
|
||||||
// AGC automatic with high LNA linearity:
|
|
||||||
// #define AD7021_GAIN_AUTO_LIN
|
|
||||||
// AGC OFF, lowest gain:
|
|
||||||
// #define AD7021_GAIN_LOW
|
|
||||||
// AGC OFF, highest gain:
|
|
||||||
// #define AD7021_GAIN_HIGH
|
|
||||||
|
|
||||||
// Host communication selection:
|
|
||||||
#define STM32_USART1_HOST
|
|
||||||
// #define STM32_USB_HOST
|
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
|
||||||
#define ENABLE_SCAN_MODE
|
|
||||||
|
|
||||||
// Send RSSI value:
|
|
||||||
#define SEND_RSSI_DATA
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
|
||||||
#define SERIAL_REPEATER
|
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
|
||||||
// #define SERIAL_REPEATER_USART1
|
|
||||||
|
|
||||||
// Enable P25 Wide modulation:
|
|
||||||
// #define ENABLE_P25_WIDE
|
|
||||||
|
|
||||||
// Disable mode LEDs blink during scan mode:
|
|
||||||
// #define QUIET_MODE_LEDS
|
|
||||||
|
|
||||||
// Engage a constant or descreet Service LED mode once repeater is running
|
|
||||||
// #define CONSTANT_SRV_LED
|
|
||||||
// #define CONSTANT_SRV_LED_INVERTED
|
|
||||||
// #define DISCREET_SRV_LED
|
|
||||||
// #define DISCREET_SRV_LED_INVERTED
|
|
||||||
|
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
|
||||||
// #define LONG_USB_RESET
|
|
||||||
|
|
||||||
// Enable modem debug messages
|
|
||||||
#define ENABLE_DEBUG
|
|
||||||
|
|
||||||
// Disable frequency bands check
|
|
||||||
// #define DISABLE_FREQ_CHECK
|
|
||||||
|
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
|
||||||
// #define DISABLE_FREQ_BAN
|
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
// #define STM32_USART1_HOST
|
// #define STM32_USART1_HOST
|
||||||
#define STM32_USB_HOST
|
#define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
// #define STM32_USART1_HOST
|
// #define STM32_USART1_HOST
|
||||||
#define STM32_USB_HOST
|
#define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -94,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -112,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_H)
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
|
||||||
#define ZUMSPOT_ADF7021
|
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
|
||||||
// #define LIBRE_KIT_ADF7021
|
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
|
||||||
// #define MMDVM_HS_HAT_REV12
|
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
|
||||||
// #define NANO_HOTSPOT
|
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
|
||||||
// #define NANO_DV_REV10
|
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
|
||||||
#define ENABLE_ADF7021
|
|
||||||
|
|
||||||
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
|
|
||||||
// #define DUPLEX
|
|
||||||
|
|
||||||
// TCXO of the ADF7021
|
|
||||||
// For 14.7456 MHz:
|
|
||||||
#define ADF7021_14_7456
|
|
||||||
// For 12.2880 MHz:
|
|
||||||
// #define ADF7021_12_2880
|
|
||||||
|
|
||||||
// Configure receiver gain for ADF7021
|
|
||||||
// AGC automatic, default settings:
|
|
||||||
#define AD7021_GAIN_AUTO
|
|
||||||
// AGC automatic with high LNA linearity:
|
|
||||||
// #define AD7021_GAIN_AUTO_LIN
|
|
||||||
// AGC OFF, lowest gain:
|
|
||||||
// #define AD7021_GAIN_LOW
|
|
||||||
// AGC OFF, highest gain:
|
|
||||||
// #define AD7021_GAIN_HIGH
|
|
||||||
|
|
||||||
// Host communication selection:
|
|
||||||
#define STM32_USART1_HOST
|
|
||||||
// #define STM32_USB_HOST
|
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
|
||||||
#define ENABLE_SCAN_MODE
|
|
||||||
|
|
||||||
// Send RSSI value:
|
|
||||||
#define SEND_RSSI_DATA
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
|
||||||
#define SERIAL_REPEATER
|
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
|
||||||
// #define SERIAL_REPEATER_USART1
|
|
||||||
|
|
||||||
// Enable P25 Wide modulation:
|
|
||||||
// #define ENABLE_P25_WIDE
|
|
||||||
|
|
||||||
// Disable mode LEDs blink during scan mode:
|
|
||||||
// #define QUIET_MODE_LEDS
|
|
||||||
|
|
||||||
// Engage a constant or descreet Service LED mode once repeater is running
|
|
||||||
// #define CONSTANT_SRV_LED
|
|
||||||
// #define CONSTANT_SRV_LED_INVERTED
|
|
||||||
// #define DISCREET_SRV_LED
|
|
||||||
// #define DISCREET_SRV_LED_INVERTED
|
|
||||||
|
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
|
||||||
// #define LONG_USB_RESET
|
|
||||||
|
|
||||||
// Enable modem debug messages
|
|
||||||
#define ENABLE_DEBUG
|
|
||||||
|
|
||||||
// Disable frequency bands check
|
|
||||||
// #define DISABLE_FREQ_CHECK
|
|
||||||
|
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
|
||||||
// #define DISABLE_FREQ_BAN
|
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
// Select one board (STM32F103 based boards)
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
// 1) ZUMspot RPi or ZUMspot USB:
|
||||||
#define ZUMSPOT_ADF7021
|
// #define ZUMSPOT_ADF7021
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
||||||
// #define LIBRE_KIT_ADF7021
|
#define LIBRE_KIT_ADF7021
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
||||||
// #define MMDVM_HS_HAT_REV12
|
// #define MMDVM_HS_HAT_REV12
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -60,22 +56,17 @@
|
||||||
// #define AD7021_GAIN_HIGH
|
// #define AD7021_GAIN_HIGH
|
||||||
|
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
// #define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
#define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
||||||
// Send RSSI value:
|
// Send RSSI value:
|
||||||
#define SEND_RSSI_DATA
|
// #define SEND_RSSI_DATA
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,17 +86,14 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
// Enable for RPi 3B+, USB mode
|
||||||
// #define LONG_USB_RESET
|
#define LONG_USB_RESET
|
||||||
|
|
||||||
// Enable modem debug messages
|
// Enable modem debug messages
|
||||||
#define ENABLE_DEBUG
|
// #define ENABLE_DEBUG
|
||||||
|
|
||||||
// Disable frequency bands check
|
// Disable frequency bands check
|
||||||
// #define DISABLE_FREQ_CHECK
|
// #define DISABLE_FREQ_CHECK
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_H)
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
// Select one board (STM32F103 based boards)
|
|
||||||
// 1) ZUMspot RPi or ZUMspot USB:
|
|
||||||
// #define ZUMSPOT_ADF7021
|
|
||||||
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
|
|
||||||
#define LIBRE_KIT_ADF7021
|
|
||||||
// 3) MMDVM_HS_Hat revisions 1.1, 1.2 and 1.4 (DB9MAT & DF2ET)
|
|
||||||
// #define MMDVM_HS_HAT_REV12
|
|
||||||
// 4) MMDVM_HS_Dual_Hat revisions 1.0 (DB9MAT & DF2ET & DO7EN)
|
|
||||||
// #define MMDVM_HS_DUAL_HAT_REV10
|
|
||||||
// 5) Nano hotSPOT (BI7JTA)
|
|
||||||
// #define NANO_HOTSPOT
|
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
|
||||||
// #define NANO_DV_REV10
|
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
|
||||||
#define ENABLE_ADF7021
|
|
||||||
|
|
||||||
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
|
|
||||||
#define DUPLEX
|
|
||||||
|
|
||||||
// TCXO of the ADF7021
|
|
||||||
// For 14.7456 MHz:
|
|
||||||
#define ADF7021_14_7456
|
|
||||||
// For 12.2880 MHz:
|
|
||||||
// #define ADF7021_12_2880
|
|
||||||
|
|
||||||
// Configure receiver gain for ADF7021
|
|
||||||
// AGC automatic, default settings:
|
|
||||||
#define AD7021_GAIN_AUTO
|
|
||||||
// AGC automatic with high LNA linearity:
|
|
||||||
// #define AD7021_GAIN_AUTO_LIN
|
|
||||||
// AGC OFF, lowest gain:
|
|
||||||
// #define AD7021_GAIN_LOW
|
|
||||||
// AGC OFF, highest gain:
|
|
||||||
// #define AD7021_GAIN_HIGH
|
|
||||||
|
|
||||||
// Host communication selection:
|
|
||||||
// #define STM32_USART1_HOST
|
|
||||||
#define STM32_USB_HOST
|
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
|
||||||
#define ENABLE_SCAN_MODE
|
|
||||||
|
|
||||||
// Send RSSI value:
|
|
||||||
// #define SEND_RSSI_DATA
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
|
||||||
#define SERIAL_REPEATER
|
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
|
||||||
// #define SERIAL_REPEATER_USART1
|
|
||||||
|
|
||||||
// Enable P25 Wide modulation:
|
|
||||||
// #define ENABLE_P25_WIDE
|
|
||||||
|
|
||||||
// Disable mode LEDs blink during scan mode:
|
|
||||||
// #define QUIET_MODE_LEDS
|
|
||||||
|
|
||||||
// Engage a constant or descreet Service LED mode once repeater is running
|
|
||||||
// #define CONSTANT_SRV_LED
|
|
||||||
// #define CONSTANT_SRV_LED_INVERTED
|
|
||||||
// #define DISCREET_SRV_LED
|
|
||||||
// #define DISCREET_SRV_LED_INVERTED
|
|
||||||
|
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
|
||||||
|
|
||||||
// Enable for RPi 3B+, USB mode
|
|
||||||
#define LONG_USB_RESET
|
|
||||||
|
|
||||||
// Enable modem debug messages
|
|
||||||
// #define ENABLE_DEBUG
|
|
||||||
|
|
||||||
// Disable frequency bands check
|
|
||||||
// #define DISABLE_FREQ_CHECK
|
|
||||||
|
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
|
||||||
// #define DISABLE_FREQ_BAN
|
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
// #define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
// #define NANO_HOTSPOT
|
// #define NANO_HOTSPOT
|
||||||
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
// 6) NanoDV NPi or USB revisions 1.0 (BG4TGO & BG5HHP)
|
||||||
// #define NANO_DV_REV10
|
// #define NANO_DV_REV10
|
||||||
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
|
|
||||||
// #define D2RG_MMDVM_HS
|
|
||||||
// 8) BridgeCom SkyBridge HotSpot
|
|
||||||
// #define SKYBRIDGE_HS
|
|
||||||
|
|
||||||
// Enable ADF7021 support:
|
// Enable ADF7021 support:
|
||||||
#define ENABLE_ADF7021
|
#define ENABLE_ADF7021
|
||||||
|
|
@ -62,10 +58,6 @@
|
||||||
// Host communication selection:
|
// Host communication selection:
|
||||||
#define STM32_USART1_HOST
|
#define STM32_USART1_HOST
|
||||||
// #define STM32_USB_HOST
|
// #define STM32_USB_HOST
|
||||||
// #define STM32_I2C_HOST
|
|
||||||
|
|
||||||
// I2C host address:
|
|
||||||
#define I2C_ADDR 0x22
|
|
||||||
|
|
||||||
// Enable mode detection:
|
// Enable mode detection:
|
||||||
#define ENABLE_SCAN_MODE
|
#define ENABLE_SCAN_MODE
|
||||||
|
|
@ -75,7 +67,6 @@
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi):
|
||||||
#define SERIAL_REPEATER
|
#define SERIAL_REPEATER
|
||||||
#define SERIAL_REPEATER_BAUD 9600
|
|
||||||
|
|
||||||
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled):
|
||||||
// #define SERIAL_REPEATER_USART1
|
// #define SERIAL_REPEATER_USART1
|
||||||
|
|
@ -95,9 +86,6 @@
|
||||||
// Use the YSF and P25 LEDs for NXDN
|
// Use the YSF and P25 LEDs for NXDN
|
||||||
// #define USE_ALTERNATE_NXDN_LEDS
|
// #define USE_ALTERNATE_NXDN_LEDS
|
||||||
|
|
||||||
// Use the D-Star and P25 LEDs for M17
|
|
||||||
// #define USE_ALTERNATE_M17_LEDS
|
|
||||||
|
|
||||||
// Use the D-Star and DMR LEDs for POCSAG
|
// Use the D-Star and DMR LEDs for POCSAG
|
||||||
// #define USE_ALTERNATE_POCSAG_LEDS
|
// #define USE_ALTERNATE_POCSAG_LEDS
|
||||||
|
|
||||||
|
|
@ -113,7 +101,4 @@
|
||||||
// Disable frequency restrictions (satellite, ISS, etc)
|
// Disable frequency restrictions (satellite, ISS, etc)
|
||||||
// #define DISABLE_FREQ_BAN
|
// #define DISABLE_FREQ_BAN
|
||||||
|
|
||||||
// Enable UDID feature
|
|
||||||
#define ENABLE_UDID
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,173 +16,86 @@
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
echo "******************************************************"
|
|
||||||
echo "********* Cleaning objects and updating code *********"
|
|
||||||
echo "******************************************************"
|
|
||||||
cd ~/MMDVM_HS/
|
cd ~/MMDVM_HS/
|
||||||
make clean
|
make clean
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# Building ZUMspot Libre Kit
|
# Building ZUMspot Libre Kit
|
||||||
echo "*******************************************************"
|
|
||||||
echo "********* Building ZUMspot Libre Kit firmware *********"
|
|
||||||
echo "*******************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_Libre.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/ZUMspot_Libre.h ~/MMDVM_HS/Config.h
|
||||||
make -j4 bl
|
make bl
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/zumspot_libre_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/zumspot_libre_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building ZUMspot RPi
|
# Building ZUMspot RPi
|
||||||
echo "*************************************************"
|
|
||||||
echo "********* Building ZUMspot RPi firmware *********"
|
|
||||||
echo "*************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_RPi.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/ZUMspot_RPi.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/zumspot_rpi_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/zumspot_rpi_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building ZUMspot USB
|
# Building ZUMspot USB
|
||||||
echo "*************************************************"
|
|
||||||
echo "********* Building ZUMspot USB firmware *********"
|
|
||||||
echo "*************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_USB.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/ZUMspot_USB.h ~/MMDVM_HS/Config.h
|
||||||
make -j4 bl
|
make bl
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/zumspot_usb_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/zumspot_usb_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building ZUMspot Duplex
|
# Building ZUMspot Duplex
|
||||||
echo "****************************************************"
|
|
||||||
echo "********* Building ZUMspot Duplex firmware *********"
|
|
||||||
echo "****************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_duplex.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/ZUMspot_duplex.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make bl
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/zumspot_duplex_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/zumspot_duplex_fw.bin
|
||||||
make clean
|
|
||||||
|
|
||||||
# Building ZUMspot Dualband
|
|
||||||
echo "******************************************************"
|
|
||||||
echo "********* Building ZUMspot Dualband firmware *********"
|
|
||||||
echo "******************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_dualband.h ~/MMDVM_HS/Config.h
|
|
||||||
make -j4
|
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/zumspot_dualband_fw.bin
|
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building MMDVM_HS_Hat
|
# Building MMDVM_HS_Hat
|
||||||
echo "**************************************************"
|
|
||||||
echo "********* Building MMDVM_HS_Hat firmware *********"
|
|
||||||
echo "**************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/MMDVM_HS_Hat.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/MMDVM_HS_Hat.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_hat_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_hat_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building MMDVM_HS_Hat (12.288 MHz TCXO)
|
# Building MMDVM_HS_Hat (12.288 MHz TCXO)
|
||||||
echo "********************************************************************"
|
|
||||||
echo "********* Building MMDVM_HS_Hat (12.288 MHz TCXO) firmware *********"
|
|
||||||
echo "********************************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/MMDVM_HS_Hat-12mhz.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/MMDVM_HS_Hat-12mhz.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_hat_fw-12mhz.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_hat_fw-12mhz.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building MMDVM_HS_Dual_Hat
|
# Building MMDVM_HS_Dual_Hat
|
||||||
echo "*******************************************************"
|
|
||||||
echo "********* Building MMDVM_HS_Dual_Hat firmware *********"
|
|
||||||
echo "*******************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/MMDVM_HS_Dual_Hat.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/MMDVM_HS_Dual_Hat.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_dual_hat_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_dual_hat_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building MMDVM_HS_Dual_Hat (12.288 MHz TCXO)
|
# Building MMDVM_HS_Dual_Hat (12.288 MHz TCXO)
|
||||||
echo "*************************************************************************"
|
|
||||||
echo "********* Building MMDVM_HS_Dual_Hat (12.288 MHz TCXO) firmware *********"
|
|
||||||
echo "*************************************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/MMDVM_HS_Dual_Hat-12mhz.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/MMDVM_HS_Dual_Hat-12mhz.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_dual_hat_fw-12mhz.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/mmdvm_hs_dual_hat_fw-12mhz.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building Nano hotSPOT
|
# Building Nano hotSPOT
|
||||||
echo "**************************************************"
|
|
||||||
echo "********* Building Nano hotSPOT firmware *********"
|
|
||||||
echo "**************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/Nano_hotSPOT.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/Nano_hotSPOT.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/nano_hotspot_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/nano_hotspot_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building NanoDV NPi
|
# Building NanoDV NPi
|
||||||
echo "************************************************"
|
|
||||||
echo "********* Building NanoDV NPi firmware *********"
|
|
||||||
echo "************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/NanoDV_NPi.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/NanoDV_NPi.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/nanodv_npi_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/nanodv_npi_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building NanoDV USB
|
# Building NanoDV USB
|
||||||
echo "************************************************"
|
|
||||||
echo "********* Building NanoDV USB firmware *********"
|
|
||||||
echo "************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/NanoDV_USB.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/NanoDV_USB.h ~/MMDVM_HS/Config.h
|
||||||
make -j4 bl
|
make bl
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/nanodv_usb_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/nanodv_usb_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building D2RG MMDVM_HS
|
|
||||||
echo "***************************************************"
|
|
||||||
echo "********* Building D2RG MMDVM_HS firmware *********"
|
|
||||||
echo "***************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/D2RG_MMDVM_HS.h ~/MMDVM_HS/Config.h
|
|
||||||
make -j4
|
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/d2rg_mmdvm_hs.bin
|
|
||||||
make clean
|
|
||||||
|
|
||||||
# Building Generic Simplex GPIO
|
# Building Generic Simplex GPIO
|
||||||
echo "**********************************************************"
|
|
||||||
echo "********* Building Generic Simplex GPIO firmware *********"
|
|
||||||
echo "**********************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/generic_gpio.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/generic_gpio.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/generic_gpio_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/generic_gpio_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building Generic Duplex GPIO
|
# Building Generic Duplex GPIO
|
||||||
echo "*********************************************************"
|
|
||||||
echo "********* Building Generic Duplex GPIO firmware *********"
|
|
||||||
echo "*********************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/generic_duplex_gpio.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/generic_duplex_gpio.h ~/MMDVM_HS/Config.h
|
||||||
make -j4
|
make
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/generic_duplex_gpio_fw.bin
|
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/generic_duplex_gpio_fw.bin
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Building Generic Duplex USB
|
|
||||||
echo "********************************************************"
|
|
||||||
echo "********* Building Generic Duplex USB firmware *********"
|
|
||||||
echo "********************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/generic_duplex_usb.h ~/MMDVM_HS/Config.h
|
|
||||||
make -j4 bl
|
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/generic_duplex_usb_fw.bin
|
|
||||||
make clean
|
|
||||||
|
|
||||||
# Building SkyBridge RPi HS
|
|
||||||
echo "******************************************************"
|
|
||||||
echo "********* Building SkyBridge RPi HS firmware *********"
|
|
||||||
echo "******************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/SkyBridge_RPi.h ~/MMDVM_HS/Config.h
|
|
||||||
make -j4
|
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1.bin ~/MMDVM_HS/bin/skybridge_rpi_fw.bin
|
|
||||||
make clean
|
|
||||||
|
|
||||||
# Building LoneStar USB
|
|
||||||
echo "*************************************************"
|
|
||||||
echo "********* Building LoneStar USB firmware *********"
|
|
||||||
echo "*************************************************"
|
|
||||||
cp ~/MMDVM_HS/configs/LoneStar_USB.h ~/MMDVM_HS/Config.h
|
|
||||||
make -j4 bl
|
|
||||||
mv ~/MMDVM_HS/bin/mmdvm_f1bl.bin ~/MMDVM_HS/bin/lonestar_usb_fw.bin
|
|
||||||
make clean
|
|
||||||
|
|
||||||
cp ~/MMDVM_HS/configs/ZUMspot_Libre.h ~/MMDVM_HS/Config.h
|
cp ~/MMDVM_HS/configs/ZUMspot_Libre.h ~/MMDVM_HS/Config.h
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,6 @@ if [ $(uname -s) == "Linux" ]; then
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.5.2"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="d2rg_mmdvm_hs.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
# Note: /dev/ttySC0 should be enabled, see: https://github.com/bg3mdo/D2RG_MMDVM_HS_ambe_uart_service
|
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 23,-22,22:-23,22 /dev/ttySC0
|
|
||||||
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.5.2"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="zumspot_dualband_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for ZUMspot Libre Kit
|
||||||
FW_FILENAME="zumspot_duplex_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/zumspot_duplex_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -85,6 +72,12 @@ fi
|
||||||
# Stop MMDVMHost process to free serial port
|
# Stop MMDVMHost process to free serial port
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Reset ZUMspot to enter bootloader mode
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $DFU_RST $DEV_USB_SER 750
|
||||||
|
|
||||||
|
# Upload the firmware
|
||||||
|
eval sudo $DFU_UTIL -D zumspot_duplex_fw.bin -d 1eaf:0003 -a 2 -R -R
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Please RESET your ZUMspot !"
|
||||||
|
echo
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,25 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="generic_duplex_gpio_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download latest firmware for Generic Duplex GPIO
|
# Download latest firmware for Generic Duplex GPIO
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/generic_duplex_gpio_fw.bin
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -44,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -79,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -89,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w generic_duplex_gpio_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.5.2"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="generic_duplex_gpio_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download latest firmware for Generic Duplex GPIO
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 198,-199,199:-198,199 /dev/ttyS3
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.5.2"
|
|
||||||
|
|
||||||
# Change USB-serial port name ONLY in macOS
|
|
||||||
MAC_DEV_USB_SER="/dev/cu.usbmodem14401"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="generic_duplex_usb_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
DEV_USB_SER="/dev/ttyACM0"
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DEV_USB_SER=$MAC_DEV_USB_SER
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Reset ZUMspot to enter bootloader mode
|
|
||||||
eval sudo $DFU_RST $DEV_USB_SER 750
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
eval sudo $DFU_UTIL -D $FW_FILENAME -d 1eaf:0003 -a 2 -R -R
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Please RESET your MMDVM_HS board !"
|
|
||||||
echo
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for Generic Simplex GPIO
|
||||||
FW_FILENAME="generic_gpio_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/generic_gpio_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w generic_gpio_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for MMDVM_HS_Hat
|
||||||
FW_FILENAME="mmdvm_hs_dual_hat_fw-12mhz.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/mmdvm_hs_dual_hat_fw-12mhz.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w mmdvm_hs_dual_hat_fw-12mhz.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for MMDVM_HS_Hat
|
||||||
FW_FILENAME="mmdvm_hs_dual_hat_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/mmdvm_hs_dual_hat_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w mmdvm_hs_dual_hat_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU, Florian Wolters DF2ET
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for MMDVM_HS_Hat with 12.288 MHz TCXO
|
||||||
FW_FILENAME="mmdvm_hs_hat_fw-12mhz.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/mmdvm_hs_hat_fw-12mhz.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w mmdvm_hs_hat_fw-12mhz.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for MMDVM_HS_Hat
|
||||||
FW_FILENAME="mmdvm_hs_hat_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/mmdvm_hs_hat_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w mmdvm_hs_hat_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,25 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Change USB-serial port name ONLY in macOS
|
# Change USB-serial port name ONLY in macOS
|
||||||
MAC_DEV_USB_SER="/dev/cu.usbmodem14401"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Configure beta version
|
# Download latest firmware for ZUMspot Libre Kit
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/zumspot_libre_fw.bin
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="zumspot_libre_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -51,12 +39,6 @@ if [ $(uname -s) == "Linux" ]; then
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -94,8 +76,8 @@ sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
eval sudo $DFU_RST $DEV_USB_SER 750
|
eval sudo $DFU_RST $DEV_USB_SER 750
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $DFU_UTIL -D $FW_FILENAME -d 1eaf:0003 -a 2 -R -R
|
eval sudo $DFU_UTIL -D zumspot_libre_fw.bin -d 1eaf:0003 -a 2 -R -R
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Please RESET your ZUMspot Libre Kit !"
|
echo "Please RESET your ZUMspot !"
|
||||||
echo
|
echo
|
||||||
|
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.6.0"
|
|
||||||
|
|
||||||
# Change USB-serial port name ONLY in macOS
|
|
||||||
MAC_DEV_USB_SER="/dev/cu.usbmodem14401"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.6.0b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="lonestar_usb_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
DEV_USB_SER="/dev/ttyACM0"
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DEV_USB_SER=$MAC_DEV_USB_SER
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Reset ZUMspot to enter bootloader mode
|
|
||||||
eval sudo $DFU_RST $DEV_USB_SER 750
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
eval sudo $DFU_UTIL -D $FW_FILENAME -d 1eaf:0003 -a 2 -R -R
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Please RESET your LoneStar device !"
|
|
||||||
echo
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for Nano DV
|
||||||
FW_FILENAME="nanodv_npi_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/nanodv_npi_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 66,-67,67:-66,67 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w nanodv_npi_fw.bin -g 0x0 -R -i 67,-66,66:-67,66 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,25 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Change USB-serial port name ONLY in macOS
|
# Change USB-serial port name ONLY in macOS
|
||||||
MAC_DEV_USB_SER="/dev/cu.usbmodem14401"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Configure beta version
|
# Download latest firmware for ZUMspot USB
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/nanodv_usb_fw.bin
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="nanodv_usb_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -51,12 +39,6 @@ if [ $(uname -s) == "Linux" ]; then
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -94,7 +76,7 @@ sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
eval sudo $DFU_RST $DEV_USB_SER 750
|
eval sudo $DFU_RST $DEV_USB_SER 750
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $DFU_UTIL -D $FW_FILENAME -d 1eaf:0003 -a 2 -R -R
|
eval sudo $DFU_UTIL -D nanodv_usb_fw.bin -d 1eaf:0003 -a 2 -R -R
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Please RESET your Nano DV !"
|
echo "Please RESET your Nano DV !"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,34 +16,14 @@
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# If we run this on a NanoPi board set the GPIO pins
|
|
||||||
if [ -f /etc/pistar-release ]; then
|
|
||||||
hardware=$(grep -i hardware /etc/pistar-release | awk -F "= " '{print $2}')
|
|
||||||
if [[ ${hardware} == "NanoPi" ]]; then
|
|
||||||
echo 3 > /sys/class/gpio/export
|
|
||||||
echo out > /sys/class/gpio/gpio3/direction
|
|
||||||
echo 1 > /sys/class/gpio/gpio3/value
|
|
||||||
echo 3 > /sys/class/gpio/unexport
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for Nano hotSPOT
|
||||||
FW_FILENAME="nano_hotspot_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/nano_hotspot_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -52,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -87,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -97,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 200,-3,3:-200,3 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w nano_hotspot_fw.bin -g 0x0 -R -i 200,-3,3:-200,3 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
|
# Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,22 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Configure beta version
|
# Change USB-serial port name ONLY in macOS
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Firmware filename
|
# Download latest firmware for ZUMspot RPi (GPIO)
|
||||||
FW_FILENAME="zumspot_rpi_fw.bin"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/zumspot_rpi_fw.bin
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -41,18 +32,13 @@ fi
|
||||||
|
|
||||||
# Configure vars depending on OS
|
# Configure vars depending on OS
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
if [ $(uname -s) == "Linux" ]; then
|
||||||
|
DEV_USB_SER="/dev/ttyACM0"
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
if [ $(uname -m) == "x86_64" ]; then
|
||||||
echo "Linux 64-bit detected"
|
echo "Linux 64-bit detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -76,6 +62,7 @@ fi
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
if [ $(uname -s) == "Darwin" ]; then
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
|
DEV_USB_SER=$MAC_DEV_USB_SER
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
||||||
|
|
@ -86,5 +73,5 @@ fi
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
eval sudo $STM32FLASH -v -w zumspot_rpi_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Configure latest version
|
|
||||||
FW_VERSION="v1.5.2"
|
|
||||||
|
|
||||||
# Configure beta version
|
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="skybridge_rpi_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
|
||||||
git clone https://github.com/juribeparada/STM32F10X_Lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure vars depending on OS
|
|
||||||
if [ $(uname -s) == "Linux" ]; then
|
|
||||||
if [ $(uname -m) == "x86_64" ]; then
|
|
||||||
echo "Linux 64-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
|
||||||
echo "Raspberry Pi 3 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv6l" ]; then
|
|
||||||
echo "Raspberry Pi 2 or Pi Zero W detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
else
|
|
||||||
echo "Linux 32-bit detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "macOS detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop MMDVMHost process to free serial port
|
|
||||||
sudo killall MMDVMHost >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Upload the firmware
|
|
||||||
eval sudo $STM32FLASH -v -w $FW_FILENAME -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0
|
|
||||||
|
|
||||||
|
|
@ -17,25 +17,13 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
# Configure latest version
|
# Configure latest version
|
||||||
FW_VERSION="v1.5.2"
|
FW_VERSION="v1.4.14"
|
||||||
|
|
||||||
# Change USB-serial port name ONLY in macOS
|
# Change USB-serial port name ONLY in macOS
|
||||||
MAC_DEV_USB_SER="/dev/cu.usbmodem14401"
|
MAC_DEV_USB_SER="/dev/cu.usbmodem1441"
|
||||||
|
|
||||||
# Configure beta version
|
# Download latest firmware for ZUMspot USB
|
||||||
FW_VERSION_BETA="v1.5.1b"
|
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/zumspot_usb_fw.bin
|
||||||
|
|
||||||
# Firmware filename
|
|
||||||
FW_FILENAME="zumspot_usb_fw.bin"
|
|
||||||
|
|
||||||
# Download latest firmware
|
|
||||||
if [ $1 = "beta" ]; then
|
|
||||||
echo "Downloading beta firmware..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION_BETA/$FW_FILENAME
|
|
||||||
else
|
|
||||||
echo "Downloading latest firmware (stable)..."
|
|
||||||
curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/$FW_FILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download STM32F10X_Lib (only for binary tools)
|
# Download STM32F10X_Lib (only for binary tools)
|
||||||
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
if [ ! -d "./STM32F10X_Lib/utils" ]; then
|
||||||
|
|
@ -51,12 +39,6 @@ if [ $(uname -s) == "Linux" ]; then
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util"
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash"
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash"
|
||||||
elif [ $(uname -m) == "aarch64" ] ; then
|
|
||||||
echo "Raspberry Pi 4 detected"
|
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
|
||||||
DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util"
|
|
||||||
ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash"
|
|
||||||
STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash"
|
|
||||||
elif [ $(uname -m) == "armv7l" ]; then
|
elif [ $(uname -m) == "armv7l" ]; then
|
||||||
echo "Raspberry Pi 3 detected"
|
echo "Raspberry Pi 3 detected"
|
||||||
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset"
|
||||||
|
|
@ -94,7 +76,7 @@ sudo killall MMDVMHost >/dev/null 2>&1
|
||||||
eval sudo $DFU_RST $DEV_USB_SER 750
|
eval sudo $DFU_RST $DEV_USB_SER 750
|
||||||
|
|
||||||
# Upload the firmware
|
# Upload the firmware
|
||||||
eval sudo $DFU_UTIL -D $FW_FILENAME -d 1eaf:0003 -a 2 -R -R
|
eval sudo $DFU_UTIL -D zumspot_usb_fw.bin -d 1eaf:0003 -a 2 -R -R
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Please RESET your ZUMspot !"
|
echo "Please RESET your ZUMspot !"
|
||||||
|
|
|
||||||
17
version.h
17
version.h
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
|
* Copyright (C) 2017,2018 by Andy Uribe CA6JAU
|
||||||
* Copyright (C) 2020,2021 by Jonathan Naylor G4KLX
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -24,9 +23,9 @@
|
||||||
#include "ADF7021.h"
|
#include "ADF7021.h"
|
||||||
|
|
||||||
#define VER_MAJOR "1"
|
#define VER_MAJOR "1"
|
||||||
#define VER_MINOR "6"
|
#define VER_MINOR "4"
|
||||||
#define VER_REV "0"
|
#define VER_REV "14"
|
||||||
#define VERSION_DATE "20210919"
|
#define VERSION_DATE "20181209"
|
||||||
|
|
||||||
#if defined(ZUMSPOT_ADF7021)
|
#if defined(ZUMSPOT_ADF7021)
|
||||||
#define BOARD_INFO "ZUMspot"
|
#define BOARD_INFO "ZUMspot"
|
||||||
|
|
@ -36,14 +35,8 @@
|
||||||
#define BOARD_INFO "MMDVM_HS_Dual_Hat"
|
#define BOARD_INFO "MMDVM_HS_Dual_Hat"
|
||||||
#elif defined(NANO_HOTSPOT)
|
#elif defined(NANO_HOTSPOT)
|
||||||
#define BOARD_INFO "Nano_hotSPOT"
|
#define BOARD_INFO "Nano_hotSPOT"
|
||||||
#elif defined(NANO_DV_REV11)
|
#elif defined(NANO_DV_REV10)
|
||||||
#define BOARD_INFO "Nano_DV"
|
#define BOARD_INFO "Nano_DV"
|
||||||
#elif defined(D2RG_MMDVM_HS)
|
|
||||||
#define BOARD_INFO "D2RG_MMDVM_HS"
|
|
||||||
#elif defined(SKYBRIDGE_HS)
|
|
||||||
#define BOARD_INFO "SkyBridge"
|
|
||||||
#elif defined(LONESTAR_USB)
|
|
||||||
#define BOARD_INFO "LS_USB_STICK"
|
|
||||||
#else
|
#else
|
||||||
#define BOARD_INFO "MMDVM_HS"
|
#define BOARD_INFO "MMDVM_HS"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue