On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
> - I could not fit pwm servo within existing servo implementations. Let
>   me know if you have any idea to do it.

Why not just use the exising PI servo?

> +static void usage(char *progname)
> +{
> +     fprintf(stderr,
> +             "\n"
> +             "usage: %s [options]\n\n"
> +             "\n"
> +             " -p [dev]      Clock device to use\n"
> +             " -e [id]       PTP index for event/trigger\n"

Alphabetical ordering, please.

> +             " -w [id]       PWM chip device id\n"
> +             " -c [id]       PWM channel id from PWM chip\n"
> +             " -l [num]      set the logging level to 'num'\n"

Add -m -q -v flags, just like in the other programs.

> +             " -h            prints this message and exits\n"
> +             "\n",
> +             progname);
> +}

> +     while (EOF != (c = getopt(argc, argv, "p:e:w:c:l:h"))) {

Alphabetical ordering, please.

> +             switch (c) {
> +             case 'p':
> +                     ptp_dev = optarg;
> +                     break;
> +             case 'e':
> +                     event_index = atoi(optarg);
> +                     break;

Alphabetical ordering, please.

> +
> +     while(is_running()) {

space ------ ^

> +             if (phc_read_extts(clkid, &ts))
> +                     continue;
> +
> +             fprintf(stdout, "Timestamp = %lld.%09lld\n", ts / NS_PER_SEC,
> +                     ts % NS_PER_SEC);

pr_debug?

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to