Commit b25f479e authored by Adam Wujek's avatar Adam Wujek

[FEATURE: #54] arch-wrpc: Add configuration item for ptp_fallback

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent c034de96
......@@ -210,6 +210,14 @@ menu "PTP Protocol Options"
default 37
help
Difference in seconds between TAI and UTC.
config PTP_FALLBACK_PTP_DISABLE
boolean "Disable fallback from WR to PTP"
default false
help
Option to disable PTP fallback from WR to PTP.
In some situations it might be desired to retry
establishing WR link on handshake failure.
endmenu
menu "Enabled profiles"
......
......@@ -22,6 +22,12 @@
#include "softpll_ng.h"
#ifdef CONFIG_PTP_FALLBACK_PTP_DISABLE
# define HAS_PTP_FALLBACK 0
#else
# define HAS_PTP_FALLBACK 1
#endif
/* TODO: get rid of ptp_mode, use WRPC_ARCH_G(ppg)->timingModeCfg instead */
static uint8_t ptp_mode = WRC_MODE_UNKNOWN;
......@@ -126,7 +132,7 @@ int wrc_ptp_init(void)
ppi->__tx_buffer = __tx_buffer;
ppi->__rx_buffer = __rx_buffer;
ppi->servo = &servo;
ppi->ptp_fallback = TRUE;
ppi->ptp_fallback = HAS_PTP_FALLBACK;
ppi->asymmetryCorrectionPortDS.enable = 1;
/* copy default ppi config */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment