1 // SPDX-License-Identifier: GPL-2.0+
4 * Murray Jensen <Murray.Jensen@csiro.au>
15 char *serialdev = "/dev/term/b";
16 speed_t speed = B230400;
20 main(int ac, char **av)
24 if ((pname = strrchr(av[0], '/')) == NULL)
29 while ((c = getopt(ac, av, "b:p:v")) != EOF)
33 if ((speed = cvtspeed(optarg)) == B0)
34 Error("can't decode baud rate specified in -b option");
47 fprintf(stderr, "Usage: %s [-b bps] [-p dev] [-v]\n", pname);
54 fprintf(stderr, "Opening serial port and sending continue...\n");
56 if ((sfd = serialopen(serialdev, speed)) < 0)
57 Perror("open of serial device '%s' failed", serialdev);
63 if (serialclose(sfd) < 0)
64 Perror("close of serial device '%s' failed", serialdev);
67 fprintf(stderr, "Done.\n");