diff --git a/Globals.h b/Globals.h index d68e2c5..a44e888 100644 --- a/Globals.h +++ b/Globals.h @@ -97,6 +97,12 @@ const uint16_t RX_BLOCK_SIZE = 2U; const uint16_t TX_RINGBUFFER_SIZE = 500U; const uint16_t RX_RINGBUFFER_SIZE = 600U; +#if defined(STM32F105xC) +const uint16_t TX_BUFFER_LEN = 2000U; +#else +const uint16_t TX_BUFFER_LEN = 4000U; +#endif + extern MMDVM_STATE m_modemState; extern bool m_dstarEnable; diff --git a/NXDNTX.cpp b/NXDNTX.cpp index 2601101..45d8ffa 100644 --- a/NXDNTX.cpp +++ b/NXDNTX.cpp @@ -45,7 +45,7 @@ const uint8_t NXDN_PREAMBLE[] = {0x57U, 0x75U, 0xFDU}; const uint8_t NXDN_SYNC = 0x5FU; CNXDNTX::CNXDNTX() : -m_buffer(4000U), +m_buffer(TX_BUFFER_LEN), m_modFilter(), m_sincFilter(), m_modState(), diff --git a/P25TX.cpp b/P25TX.cpp index 7cc75d9..9db1747 100644 --- a/P25TX.cpp +++ b/P25TX.cpp @@ -43,7 +43,7 @@ const q15_t P25_LEVELD = -1260; const uint8_t P25_START_SYNC = 0x77U; CP25TX::CP25TX() : -m_buffer(4000U), +m_buffer(TX_BUFFER_LEN), m_modFilter(), m_lpFilter(), m_modState(), diff --git a/SerialRB.h b/SerialRB.h index 22667d5..a2ccb8b 100644 --- a/SerialRB.h +++ b/SerialRB.h @@ -32,7 +32,11 @@ Boston, MA 02110-1301, USA. #include #endif +#if defined(STM32F105xC) +const uint16_t SERIAL_RINGBUFFER_SIZE = 370U; +#else const uint16_t SERIAL_RINGBUFFER_SIZE = 1000U; +#endif class CSerialRB { public: diff --git a/YSFTX.cpp b/YSFTX.cpp index 5790334..4f0400d 100644 --- a/YSFTX.cpp +++ b/YSFTX.cpp @@ -44,7 +44,7 @@ const uint8_t YSF_END_SYNC = 0xFFU; const uint8_t YSF_HANG = 0x00U; CYSFTX::CYSFTX() : -m_buffer(4000U), +m_buffer(TX_BUFFER_LEN), m_modFilter(), m_modState(), m_poBuffer(),