flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
flexptp_options_mk64f.h File Reference
#include <lwip/ip_addr.h>
#include <lwip/netif.h>
#include "embfmt/embformat.h"
#include "standard_output/standard_output.h"
#include <stdlib.h>
#include <eth_custom/ethernetif.h>
#include "flexPTP_port/ptp_port_mk64f_lwip.h"
#include <flexptp/servo/pid_controller.h>
#include "cli.h"

Go to the source code of this file.

Macros

#define LWIP
 
#define PTP_HLT_INTERFACE
 
#define FLEXPTP_TASK_PRIORITY   24
 
#define FLEXPTP_SNPRINTF(...)   embfmt(__VA_ARGS__)
 
#define PTP_CONFIG_LEADING_PARAMS   netif_default
 
#define PTP_HW_INIT()   ethernetif_ptp_init(PTP_CONFIG_LEADING_PARAMS)
 
#define PTP_SET_CLOCK(s, ns)   ethernetif_ptp_set_clock(PTP_CONFIG_LEADING_PARAMS, labs(s), abs(ns))
 
#define PTP_SET_TUNING(tuning)   ethernetif_ptp_set_tuning(PTP_CONFIG_LEADING_PARAMS, tuning)
 
#define PTP_HW_GET_TIME(pt)   ptphw_gettime(pt)
 
#define PTP_SERVO_INIT()   pid_ctrl_init()
 
#define PTP_SERVO_DEINIT()   pid_ctrl_deinit()
 
#define PTP_SERVO_RESET()   pid_ctrl_reset()
 
#define PTP_SERVO_RUN(d, pscd)   pid_ctrl_run(d, pscd)
 
#define CLI_REG_CMD(cmd_hintline, n_cmd, n_min_arg, cb)   cli_register_command(cmd_hintline, n_cmd, n_min_arg, cb)
 
#define CLILOG(en, ...)
 
#define PTP_ENABLE_MASTER_OPERATION   (1)
 
#define PTP_CLOCK_PRIORITY1   (128)
 
#define PTP_CLOCK_PRIORITY2   (128)
 
#define PTP_BEST_CLOCK_CLASS   (PTP_CC_DEFAULT)
 
#define PTP_WORST_ACCURACY   (PTP_CA_UNKNOWN)
 
#define PTP_TIME_SOURCE   (PTP_TSRC_INTERNAL_OSCILLATOR)
 

Macro Definition Documentation

◆ CLI_REG_CMD

#define CLI_REG_CMD (   cmd_hintline,
  n_cmd,
  n_min_arg,
  cb 
)    cli_register_command(cmd_hintline, n_cmd, n_min_arg, cb)

Definition at line 64 of file flexptp_options_mk64f.h.

◆ CLILOG

#define CLILOG (   en,
  ... 
)
Value:
{ \
if (en) \
MSG(__VA_ARGS__); \
}

Definition at line 69 of file flexptp_options_mk64f.h.

◆ FLEXPTP_SNPRINTF

#define FLEXPTP_SNPRINTF (   ...)    embfmt(__VA_ARGS__)

Definition at line 25 of file flexptp_options_mk64f.h.

◆ FLEXPTP_TASK_PRIORITY

#define FLEXPTP_TASK_PRIORITY   24

Definition at line 7 of file flexptp_options_mk64f.h.

◆ LWIP

#define LWIP

Definition at line 4 of file flexptp_options_mk64f.h.

◆ PTP_BEST_CLOCK_CLASS

#define PTP_BEST_CLOCK_CLASS   (PTP_CC_DEFAULT)

Definition at line 82 of file flexptp_options_mk64f.h.

◆ PTP_CLOCK_PRIORITY1

#define PTP_CLOCK_PRIORITY1   (128)

Definition at line 80 of file flexptp_options_mk64f.h.

◆ PTP_CLOCK_PRIORITY2

#define PTP_CLOCK_PRIORITY2   (128)

Definition at line 81 of file flexptp_options_mk64f.h.

◆ PTP_CONFIG_LEADING_PARAMS

#define PTP_CONFIG_LEADING_PARAMS   netif_default

Definition at line 34 of file flexptp_options_mk64f.h.

◆ PTP_ENABLE_MASTER_OPERATION

#define PTP_ENABLE_MASTER_OPERATION   (1)

Definition at line 77 of file flexptp_options_mk64f.h.

◆ PTP_HLT_INTERFACE

#define PTP_HLT_INTERFACE

Definition at line 5 of file flexptp_options_mk64f.h.

◆ PTP_HW_GET_TIME

#define PTP_HW_GET_TIME (   pt)    ptphw_gettime(pt)

Definition at line 39 of file flexptp_options_mk64f.h.

◆ PTP_HW_INIT

#define PTP_HW_INIT ( )    ethernetif_ptp_init(PTP_CONFIG_LEADING_PARAMS)

Definition at line 36 of file flexptp_options_mk64f.h.

◆ PTP_SERVO_DEINIT

#define PTP_SERVO_DEINIT ( )    pid_ctrl_deinit()

Definition at line 51 of file flexptp_options_mk64f.h.

◆ PTP_SERVO_INIT

#define PTP_SERVO_INIT ( )    pid_ctrl_init()

Definition at line 50 of file flexptp_options_mk64f.h.

◆ PTP_SERVO_RESET

#define PTP_SERVO_RESET ( )    pid_ctrl_reset()

Definition at line 52 of file flexptp_options_mk64f.h.

◆ PTP_SERVO_RUN

#define PTP_SERVO_RUN (   d,
  pscd 
)    pid_ctrl_run(d, pscd)

Definition at line 53 of file flexptp_options_mk64f.h.

◆ PTP_SET_CLOCK

#define PTP_SET_CLOCK (   s,
  ns 
)    ethernetif_ptp_set_clock(PTP_CONFIG_LEADING_PARAMS, labs(s), abs(ns))

Definition at line 37 of file flexptp_options_mk64f.h.

◆ PTP_SET_TUNING

#define PTP_SET_TUNING (   tuning)    ethernetif_ptp_set_tuning(PTP_CONFIG_LEADING_PARAMS, tuning)

Definition at line 38 of file flexptp_options_mk64f.h.

◆ PTP_TIME_SOURCE

#define PTP_TIME_SOURCE   (PTP_TSRC_INTERNAL_OSCILLATOR)

Definition at line 84 of file flexptp_options_mk64f.h.

◆ PTP_WORST_ACCURACY

#define PTP_WORST_ACCURACY   (PTP_CA_UNKNOWN)

Definition at line 83 of file flexptp_options_mk64f.h.