Skip to content

Commit

Permalink
Adding support for P25 wide modulation
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Jun 1, 2017
1 parent 5684499 commit d7a4075
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ADF7021.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 9 additions & 1 deletion ADF7021.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@
// Enable Nextion LCD serial port repeater:
// #define SERIAL_REPEATER

// Enable P25 Wide modulation
// #define ENABLE_P25_WIDE

#endif

0 comments on commit d7a4075

Please sign in to comment.