Skip to content

Commit

Permalink
sample: add "--ptp" args (#526)
Browse files Browse the repository at this point in the history
To enable the built-in ptp for sample app.

Signed-off-by: Frank Du <[email protected]>
  • Loading branch information
frankdjx authored Oct 7, 2023
1 parent f9e004b commit 7c3f051
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/sample/sample_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum sample_args_cmd {
SAMPLE_ARG_RX_DUMP,
SAMPLE_ARG_USE_CPU_COPY,
SAMPLE_ARG_USER_META,
SAMPLE_ARG_LIB_PTP,

SAMPLE_ARG_UDP_MODE = 0x300,
SAMPLE_ARG_UDP_LEN,
Expand Down Expand Up @@ -108,6 +109,7 @@ static struct option sample_args_options[] = {
{"ext_frame", no_argument, 0, SAMPLE_ARG_EXT_FRAME},
{"st22_codec", required_argument, 0, SAMPLE_ARG_ST22_CODEC},
{"pipeline_fmt", required_argument, 0, SAMPLE_ARG_PIPELINE_FRAME_FMT},
{"ptp", no_argument, 0, SAMPLE_ARG_LIB_PTP},

{"udp_mode", required_argument, 0, SAMPLE_ARG_UDP_MODE},
{"udp_len", required_argument, 0, SAMPLE_ARG_UDP_LEN},
Expand Down Expand Up @@ -244,6 +246,9 @@ static int _sample_parse_args(struct st_sample_context* ctx, int argc, char** ar
case SAMPLE_ARG_PTP_TSC:
p->flags |= MTL_FLAG_PTP_SOURCE_TSC;
break;
case SAMPLE_ARG_LIB_PTP:
p->flags |= MTL_FLAG_PTP_ENABLE;
break;
case SAMPLE_ARG_UDP_LCORE:
p->flags |= MTL_FLAG_UDP_LCORE;
break;
Expand Down

0 comments on commit 7c3f051

Please sign in to comment.