![]() |
flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
|
#include <etherlib/etherlib.h>#include "utils.h"#include "eth_hw_drv.h"#include <stdlib.h>#include <flexptp/servo/pid_controller.h>#include "cli.h"Go to the source code of this file.
Macros | |
| #define | ETHLIB |
| #define | PTP_ADDEND_INTERFACE |
| #define | PTP_MAIN_OSCILLATOR_FREQ_HZ (200000000) |
| #define | PTP_INCREMENT_NSEC (5) |
| #define | PTP_HW_INIT(increment, addend) ptphw_init(increment, addend) |
| #define | PTP_SET_CLOCK(s, ns) ETHHW_InitPTPTime(ETH, labs(s), abs(ns)) |
| #define | PTP_SET_ADDEND(addend) ETHHW_SetPTPAddend(ETH, addend) |
| #define | PTP_HW_GET_TIME(pt) ptphw_gettime(pt) |
| #define | PTP_SERVO_INIT() pd_ctrl_init() |
| #define | PTP_SERVO_DEINIT() pd_ctrl_deinit() |
| #define | PTP_SERVO_RESET() pd_ctrl_reset() |
| #define | PTP_SERVO_RUN(d, pscd) pd_ctrl_run(d,pscd) |
| #define | CLI_REG_CMD(cmd_hintline, n_cmd, n_min_arg, cb) CLI_REG_CMD(cmd_hintline, n_cmd, n_min_arg, cb) |
| #define | CLILOG(en, ...) { if (en) MSG(__VA_ARGS__); } |
| #define | ONOFF(str) ((!strcmp(str, "on")) ? 1 : ((!strcmp(str, "off")) ? 0 : -1)) |
| #define CLI_REG_CMD | ( | cmd_hintline, | |
| n_cmd, | |||
| n_min_arg, | |||
| cb | |||
| ) | CLI_REG_CMD(cmd_hintline, n_cmd, n_min_arg, cb) |
Definition at line 64 of file flexptp_options_stm32h743_etherlib.h.
| #define CLILOG | ( | en, | |
| ... | |||
| ) | { if (en) MSG(__VA_ARGS__); } |
Definition at line 68 of file flexptp_options_stm32h743_etherlib.h.
| #define ETHLIB |
Definition at line 4 of file flexptp_options_stm32h743_etherlib.h.
| #define ONOFF | ( | str | ) | ((!strcmp(str, "on")) ? 1 : ((!strcmp(str, "off")) ? 0 : -1)) |
Definition at line 70 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_ADDEND_INTERFACE |
Definition at line 5 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_HW_GET_TIME | ( | pt | ) | ptphw_gettime(pt) |
Definition at line 38 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_HW_INIT | ( | increment, | |
| addend | |||
| ) | ptphw_init(increment, addend) |
Definition at line 35 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_INCREMENT_NSEC (5) |
Definition at line 31 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_MAIN_OSCILLATOR_FREQ_HZ (200000000) |
Definition at line 30 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SERVO_DEINIT | ( | ) | pd_ctrl_deinit() |
Definition at line 50 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SERVO_INIT | ( | ) | pd_ctrl_init() |
Definition at line 49 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SERVO_RESET | ( | ) | pd_ctrl_reset() |
Definition at line 51 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SERVO_RUN | ( | d, | |
| pscd | |||
| ) | pd_ctrl_run(d,pscd) |
Definition at line 52 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SET_ADDEND | ( | addend | ) | ETHHW_SetPTPAddend(ETH, addend) |
Definition at line 37 of file flexptp_options_stm32h743_etherlib.h.
| #define PTP_SET_CLOCK | ( | s, | |
| ns | |||
| ) | ETHHW_InitPTPTime(ETH, labs(s), abs(ns)) |
Definition at line 36 of file flexptp_options_stm32h743_etherlib.h.