Commit c215a7c4 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

includes updated

parent 8db4cfd9
#ifndef __ENDPOINT_H #ifndef __ENDPOINT_H
#define __ENDPOINT_H #define __ENDPOINT_H
#define DMTD_AVG_SAMPLES 256
#define DMTD_MAX_PHASE 16384
void ep_init(uint8_t mac_addr[]); void ep_init(uint8_t mac_addr[]);
void get_mac_addr(uint8_t dev_addr[]);
int ep_enable(int enabled, int autoneg); int ep_enable(int enabled, int autoneg);
int ep_link_up(); int ep_link_up();
int ep_get_deltas(uint32_t *delta_tx, uint32_t *delta_rx);
int ep_get_psval(int32_t *psval);
int ep_cal_pattern_enable();
int ep_cal_pattern_disable();
#endif #endif
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
typedef signed long long uint64_t;
typedef signed char int8_t; typedef signed char int8_t;
typedef signed short int16_t; typedef signed short int16_t;
typedef signed int int32_t; typedef signed int int32_t;
typedef signed long long int64_t;
#endif #endif
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
#include "types.h" #include "types.h"
#define ETH_HEADER_SIZE 14
void minic_init(); void minic_init();
void minic_disable();
int minic_poll_rx(); int minic_poll_rx();
int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_timestamp *hwts); int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_timestamp *hwts);
......
...@@ -6,6 +6,7 @@ int softpll_check_lock(); ...@@ -6,6 +6,7 @@ int softpll_check_lock();
void softpll_disable(); void softpll_disable();
int softpll_busy(); int softpll_busy();
void softpll_set_phase(int ps); void softpll_set_phase(int ps);
int softpll_get_setpoint();
#endif #endif
//#ifndef __TRACE_H__
//#define __TRACE_H__
#define MSGS_PROTO 1 // PTPWRd/protocol.c
#define MSGS_WRPROTO 1 // PTPWRd/wr_protocol.c
#define MSGS_WRSERVO 1 // PTPWRd/dep/wr_servo.c
#define MSGS_MSG 0 // PTPWRd/dep/msg.c PTPWRd/dep/startup.c
#define MSGS_NET 0 // PTPWRd/dep/net.c
#define MSGS_ERR 1
#define MSGS_BMC 0 // PTPWRd/bmc.c
#define MSGS_PTPD 0 // PTPWRd/ptpd.c
#define MSGS_WRAPPER 1 // libposix/freestanding_wrapper.c
#define MSGS_DISPLAY 0 // libposix/freestanding_display.c
#define MSGS_DEV 1 // dev/*
#if MSGS_PROTO
#define TRACE_PROTO(...) mprintf("[PROTO ]: " __VA_ARGS__)
#else
#define TRACE_PROTO(...)
#endif
#if MSGS_WRPROTO
#define TRACE_WRPROTO(...) mprintf("[WRPROTO]: " __VA_ARGS__)
#else
#define TRACE_WRPROTO(...)
#endif
#if MSGS_WRSERVO
#define TRACE_WRSERVO(...) mprintf("[WR SRV ]: " __VA_ARGS__)
#else
#define TRACE_WRSERVO(...)
#endif
#if MSGS_MSG
#define TRACE_MSG(...) mprintf("[MSG ]: " __VA_ARGS__)
#else
#define TRACE_MSG(...)
#endif
#if MSGS_NET
#define TRACE_NET(...) mprintf("[NET ]: " __VA_ARGS__)
#else
#define TRACE_NET(...)
#endif
#if MSGS_ERR
#define TRACE_ERR(...) mprintf("[ERROR ]: " __VA_ARGS__)
#else
#define TRACE_ERR(...)
#endif
#if MSGS_BMC
#define TRACE_BMC(...) mprintf("[BMC ]: " __VA_ARGS__)
#else
#define TRACE_BMC(...)
#endif
#if MSGS_PTPD
#define TRACE_PTPD(...) mprintf("[PTPD ]: " __VA_ARGS__)
#else
#define TRACE_PTPD(...)
#endif
#if MSGS_WRAPPER
#define TRACE_WRAP(...) mprintf("[WRAPPER]: " __VA_ARGS__)
#else
#define TRACE_WRAP(...)
#endif
#if MSGS_DISPLAY
#define TRACE_DISP(...) mprintf("[DISPLAY]: " __VA_ARGS__)
#else
#define TRACE_DISP(...)
#endif
#if MSGS_DEV
#define TRACE_DEV(...) mprintf("[DEV ]: " __VA_ARGS__)
#else
#define TRACE_DEV(...)
#endif
//#endif
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