Commit e842d702 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrc_ptp: reset wr servo when changing mode (master/slave)

parent 1a88e745
...@@ -80,7 +80,7 @@ int wrc_ptp_set_mode(int mode) ...@@ -80,7 +80,7 @@ int wrc_ptp_set_mode(int mode)
ptp_mode = 0; ptp_mode = 0;
ptp_enabled = 0; wrc_ptp_stop();
switch(mode) switch(mode)
{ {
...@@ -147,6 +147,7 @@ int wrc_ptp_get_mode() ...@@ -147,6 +147,7 @@ int wrc_ptp_get_mode()
int wrc_ptp_start() int wrc_ptp_start()
{ {
ptpPortDS->linkUP = FALSE; ptpPortDS->linkUP = FALSE;
wr_servo_reset();
initDataClock(&rtOpts, &ptpClockDS); initDataClock(&rtOpts, &ptpClockDS);
ptp_enabled = 1; ptp_enabled = 1;
...@@ -156,6 +157,7 @@ int wrc_ptp_start() ...@@ -156,6 +157,7 @@ int wrc_ptp_start()
int wrc_ptp_stop() int wrc_ptp_stop()
{ {
ptp_enabled = 0; ptp_enabled = 0;
wr_servo_reset();
return 0; return 0;
} }
......
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