diff --git a/dcs.c b/dcs.c index 4d93c9a..4615dc5 100644 --- a/dcs.c +++ b/dcs.c @@ -91,7 +91,7 @@ uint8_t DCS_GetCdcssCode(uint32_t Code) return 0xFF; } -uint8_t DCS_GetCtcssCode(uint16_t Code) +uint8_t DCS_GetCtcssCode(int Code) { unsigned int i; uint8_t Result = 0xFF; diff --git a/dcs.h b/dcs.h index b8dfdc0..873ddb6 100644 --- a/dcs.h +++ b/dcs.h @@ -39,7 +39,7 @@ extern const uint16_t DCS_Options[104]; uint32_t DCS_GetGolayCodeWord(DCS_CodeType_t CodeType, uint8_t Option); uint8_t DCS_GetCdcssCode(uint32_t Code); -uint8_t DCS_GetCtcssCode(uint16_t Code); +uint8_t DCS_GetCtcssCode(int Code); #endif diff --git a/driver/bk4819.c b/driver/bk4819.c index 49ac4dc..384da6d 100644 --- a/driver/bk4819.c +++ b/driver/bk4819.c @@ -465,7 +465,7 @@ void BK4819_SetCTCSSFrequency(uint32_t FreqControlWord) // freq(Hz) * 20.64888 for XTAL 13M/26M or // freq(Hz) * 20.97152 for XTAL 12.8M/19.2M/25.6M/38.4M // - BK4819_WriteRegister(BK4819_REG_07, BK4819_REG_07_MODE_CTC1 | (((FreqControlWord * 2064888u) + 500000u) / 1000000u)); // with rounding + BK4819_WriteRegister(BK4819_REG_07, BK4819_REG_07_MODE_CTC1 | (((FreqControlWord * 206488u) + 50000u) / 100000u)); // with rounding } // freq_10Hz is CTCSS Hz * 10 diff --git a/firmware.bin b/firmware.bin index 005ff71..90d044b 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 8639629..364f0ce 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ