From 79909602d8a6eac4d398878c2384b78193dd76ca Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Wed, 15 Mar 2017 01:11:33 -0300 Subject: [PATCH] Adding support for ADF7021N version --- ADF7021.h | 21 ++++++++------------- Config.h | 3 +++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ADF7021.h b/ADF7021.h index 00aeae2..10f3874 100644 --- a/ADF7021.h +++ b/ADF7021.h @@ -98,12 +98,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define AFC_OFFSET_P25 0 #endif -// Slicer threshold for 4FSK demodulator (REG 13) -#define ADF7021_SLICER_TH_DSTAR 0U -#define ADF7021_SLICER_TH_DMR 54U -#define ADF7021_SLICER_TH_YSF 75U -#define ADF7021_SLICER_TH_P25 52U - /****** Support for 19.6800 MHz TCXO (original RF7021SE boards) ******/ #elif defined(ADF7021_19_6800) @@ -168,12 +162,6 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define AFC_OFFSET_P25 0 #endif -// Slicer threshold for 4FSK demodulator (REG 13) -#define ADF7021_SLICER_TH_DSTAR 0U -#define ADF7021_SLICER_TH_DMR 54U -#define ADF7021_SLICER_TH_YSF 75U -#define ADF7021_SLICER_TH_P25 52U - /****** Support for 12.2880 MHz TCXO ******/ #elif defined(ADF7021_12_2880) @@ -238,12 +226,19 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define AFC_OFFSET_P25 0 #endif +#endif + // Slicer threshold for 4FSK demodulator (REG 13) +#if defined(ADF7021_N_VER) +#define ADF7021_SLICER_TH_DSTAR 0U +#define ADF7021_SLICER_TH_DMR 47U +#define ADF7021_SLICER_TH_YSF 63U +#define ADF7021_SLICER_TH_P25 43U +#else #define ADF7021_SLICER_TH_DSTAR 0U #define ADF7021_SLICER_TH_DMR 54U #define ADF7021_SLICER_TH_YSF 75U #define ADF7021_SLICER_TH_P25 52U - #endif #define bitRead(value, bit) (((value) >> (bit)) & 0x01) diff --git a/Config.h b/Config.h index d15959b..1c7fe7e 100644 --- a/Config.h +++ b/Config.h @@ -27,6 +27,9 @@ // Enable ADF7021 support: #define ENABLE_ADF7021 +// Support for ADF7021-N version +// #define ADF7021_N_VER + // Bidirectional Data pin (Enable Standard TX/RX Data Interface of ADF7021): #define BIDIR_DATA_PIN