Commit dc1c7d26 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

arch-wrpc: use new endpoint API

parent faf82346
......@@ -215,6 +215,8 @@ int wrc_ptp_start()
{
struct pp_instance *ppi = &ppi_static;
pp_printf("PTP Start!\n");
pp_init_globals(&ppg_static, &__pp_default_rt_opts);
/* Call the state machine. Being it in "Initializing" state, make
......
......@@ -11,6 +11,7 @@
#include <hal_exports.h>
#include "wrpc.h"
#include "../proto-ext-whiterabbit/wr-constants.h"
#include "board.h"
extern int32_t sfp_alpha;
......@@ -86,12 +87,12 @@ int wrpc_calibration_pattern_enable(struct pp_instance *ppi,
unsigned int calibrationPattern,
unsigned int calibrationPatternLen)
{
ep_cal_pattern_enable();
ep_cal_pattern_enable(&wrc_endpoint_dev);
return WR_HW_CALIB_OK;
}
int wrpc_calibration_pattern_disable(struct pp_instance *ppi)
{
ep_cal_pattern_disable();
ep_cal_pattern_disable(&wrc_endpoint_dev);
return WR_HW_CALIB_OK;
}
......@@ -11,6 +11,7 @@
#include <dev/syscon.h> /* wrpc-sw */
#include <dev/endpoint.h> /* wrpc-sw */
#include <ptpd_netif.h> /* wrpc-sw */
#include "board.h"
int frame_rx_delay_us; /* set by faults.c */
......@@ -92,7 +93,7 @@ static int wrpc_net_recv(struct pp_instance *ppi, void *pkt, int len,
/* WR counts bitslide later, in fixed-delta, so subtract it */
t4 = *t;
bitslide = ep_get_bitslide();
bitslide = ep_get_bitslide(&wrc_endpoint_dev);
t_bts.secs = 0;
t_bts.scaled_nsecs = (bitslide << 16) / 1000;
pp_time_sub(&t4, &t_bts);
......
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