Commit 272df604 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

Merge branch 'tom-tmp' into v3-switch_for_wrpc

parents d9f2709b a1d8e4b3
...@@ -445,6 +445,10 @@ Boolean doInit(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS) ...@@ -445,6 +445,10 @@ Boolean doInit(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS)
else else
PTPD_TRACE(TRACE_PROTO, ptpPortDS,"wrConfig .............. FORCED configuration\n") ; PTPD_TRACE(TRACE_PROTO, ptpPortDS,"wrConfig .............. FORCED configuration\n") ;
/* Slave-only port reinitialized: reset the servo. FIXME: won't work with multiple slave ports. */
if(ptpPortDS->wrConfig == WR_S_ONLY)
wr_servo_reset();
/* Create the timers (standard PTP only, the WR ones are created in another function: initWrData) */ /* Create the timers (standard PTP only, the WR ones are created in another function: initWrData) */
timerInit(&ptpPortDS->timers.sync, "Sync"); timerInit(&ptpPortDS->timers.sync, "Sync");
......
...@@ -249,4 +249,8 @@ static inline unsigned long pow_2(int exp) ...@@ -249,4 +249,8 @@ static inline unsigned long pow_2(int exp)
} }
void singlePortLoop(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS, int portIndex);
void sharedPortsLoop(PtpPortDS *ptpPortDS);
#endif /*PTPD_H_*/ #endif /*PTPD_H_*/
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <stdio.h> #include <stdio.h>
#include <inttypes.h> #include <inttypes.h>
#include <unistd.h>
/* /*
* This is a freestanding compilation, and we may miss some data * This is a freestanding compilation, and we may miss some data
* structures. For example misses <stdint.h>. Most likely it's * structures. For example misses <stdint.h>. Most likely it's
...@@ -55,7 +56,7 @@ static inline void ptpd_handle_wripc() {} ...@@ -55,7 +56,7 @@ static inline void ptpd_handle_wripc() {}
#define printf(x, ...) mprintf(x, ##__VA_ARGS__) #define printf(x, ...) mprintf(x, ##__VA_ARGS__)
#define fprintf(file, x, ...) mprintf(x, ##__VA_ARGS__) #define fprintf(file, x, ...) mprintf(x, ##__VA_ARGS__)
#define sprintf(buf, ...) msprintf(buf, __VA_ARGS__) //#define sprintf(buf, ...) msprintf(buf, __VA_ARGS__)
//#define DBG(x, ...) mprintf(x, ##__VA_ARGS__) //#define DBG(x, ...) mprintf(x, ##__VA_ARGS__)
......
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