diff --git a/ADF7021.cpp b/ADF7021.cpp index 027050d..482cfd0 100644 --- a/ADF7021.cpp +++ b/ADF7021.cpp @@ -345,7 +345,11 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset) ADF7021_REG2 = (uint32_t) 0b10 << 28; // invert data (and RC alpha = 0.5) ADF7021_REG2 |= (uint32_t) (ADF7021_DEV_P25 / div2) << 19; // deviation +#if defined(ENABLE_P25_WIDE) + ADF7021_REG2 |= (uint32_t) 0b011 << 4; // modulation (4FSK) +#else ADF7021_REG2 |= (uint32_t) 0b111 << 4; // modulation (RC 4FSK) +#endif break; default: diff --git a/ADF7021.h b/ADF7021.h index 8992ddc..b571dcf 100644 --- a/ADF7021.h +++ b/ADF7021.h @@ -62,7 +62,11 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define ADF7021_DEV_DMR 23U #define ADF7021_DEV_YSF_L 18U #define ADF7021_DEV_YSF_H 36U +#if defined(ENABLE_P25_WIDE) +#define ADF7021_DEV_P25 32U +#else #define ADF7021_DEV_P25 22U +#endif // TX/RX CLOCK register (REG 03) #define ADF7021_REG3_DSTAR 0x2A4C4193 @@ -142,7 +146,11 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define ADF7021_DEV_DMR 14U #define ADF7021_DEV_YSF_L 11U #define ADF7021_DEV_YSF_H 21U +#if defined(ENABLE_P25_WIDE) +#define ADF7021_DEV_P25 21U +#else #define ADF7021_DEV_P25 14U +#endif // TX/RX CLOCK register (REG 03) #define ADF7021_REG3_DSTAR 0x29EC4153 @@ -220,7 +228,7 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define ADF7021_SLICER_TH_DMR 57U #define ADF7021_SLICER_TH_YSF_L 38U #define ADF7021_SLICER_TH_YSF_H 75U -#define ADF7021_SLICER_TH_P25 52U +#define ADF7021_SLICER_TH_P25 47U #endif diff --git a/Config.h b/Config.h index 11b9714..df1c438 100644 --- a/Config.h +++ b/Config.h @@ -62,4 +62,7 @@ // Enable Nextion LCD serial port repeater: // #define SERIAL_REPEATER +// Enable P25 Wide modulation +// #define ENABLE_P25_WIDE + #endif