| * Murray Jensen <Murray.Jensen@csiro.au> |
| * SPDX-License-Identifier: GPL-2.0+ |
| char *serialdev = "/dev/term/b"; |
| if ((pname = strrchr(av[0], '/')) == NULL) |
| while ((c = getopt(ac, av, "b:p:v")) != EOF) |
| if ((speed = cvtspeed(optarg)) == B0) |
| Error("can't decode baud rate specified in -b option"); |
| fprintf(stderr, "Usage: %s [-b bps] [-p dev] [-v]\n", pname); |
| fprintf(stderr, "Opening serial port and sending continue...\n"); |
| if ((sfd = serialopen(serialdev, speed)) < 0) |
| Perror("open of serial device '%s' failed", serialdev); |
| if (serialclose(sfd) < 0) |
| Perror("close of serial device '%s' failed", serialdev); |
| fprintf(stderr, "Done.\n"); |