FreeCalypso > hg > fc-pcm-if
view sw/mcsi-rxtx/main.c @ 16:f422d19c0118 default tip
fc-mcsi-rxtx: fix bug in PCM sample Rx
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 29 Oct 2024 01:41:33 +0000 |
parents | 8a386263dd51 |
children |
line wrap: on
line source
/* * Main module for fc-mcsi-rxtx program: interactive, modeled after fc-shell. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> int ttyhacks, dflag; main(argc, argv) char **argv; { extern int optind; int c; while ((c = getopt(argc, argv, "d")) != EOF) { switch (c) { case 'd': dflag++; continue; default: usage: fprintf(stderr, "usage: %s [-d] ttyport\n", argv[0]); exit(1); } } if (argc != optind + 1) goto usage; open_serial_port(argv[optind]); set_serial_baudrate(187500); init_serial_flush(); ttyhacks = isatty(0) && !dflag; tty_init(); main_loop(); /* does not return */ }