nidas
v1.2-1520
|
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <sys/time.h>
Macros | |
#define | SERIAL_DEV_DEFAULT "/dev/ttyS0" |
#define | SEND_INTERVAL_MS_DEFAULT 100 |
#define | DURATION_S_DEFAULT 1 |
#define | BAUDRATE_DEFAULT 115200 |
#define | TX_WORD_MAX_LEN 42 |
#define | TX_WORD_DEF_LEN 26 |
#define | RX_BUFF_MAX_LEN 50 |
#define | SAMPLE_CNTR_LEN 100 |
#define | RX_STATUS_LINECOMPLETE 1 |
#define | RX_STATUS_RECEIVING 0 |
#define | RX_STATUS_ERROR_BADWORD -1 |
#define | RX_STATUS_ERROR_NONEWLINE -2 |
#define | RX_STATUS_ERROR_READ -3 |
Functions | |
int | set_interface_attribs (int fd, int speed, int parity) |
void | print_app_usage (void) |
int | main (int argc, char **argv) |
#define BAUDRATE_DEFAULT 115200 |
Referenced by main(), and print_app_usage().
#define DURATION_S_DEFAULT 1 |
Referenced by main(), and print_app_usage().
#define RX_BUFF_MAX_LEN 50 |
Referenced by main().
#define RX_STATUS_ERROR_BADWORD -1 |
Referenced by main().
#define RX_STATUS_ERROR_NONEWLINE -2 |
Referenced by main().
#define RX_STATUS_ERROR_READ -3 |
Referenced by main().
#define RX_STATUS_LINECOMPLETE 1 |
Referenced by main().
#define RX_STATUS_RECEIVING 0 |
Referenced by main().
#define SAMPLE_CNTR_LEN 100 |
Referenced by main().
#define SEND_INTERVAL_MS_DEFAULT 100 |
Referenced by main(), and print_app_usage().
#define SERIAL_DEV_DEFAULT "/dev/ttyS0" |
Referenced by main(), and print_app_usage().
#define TX_WORD_DEF_LEN 26 |
Referenced by main().
#define TX_WORD_MAX_LEN 42 |
Referenced by main(), and print_app_usage().
int main | ( | int | argc, |
char ** | argv | ||
) |
References BAUDRATE_DEFAULT, DURATION_S_DEFAULT, print_app_usage(), printf(), RX_BUFF_MAX_LEN, RX_STATUS_ERROR_BADWORD, RX_STATUS_ERROR_NONEWLINE, RX_STATUS_ERROR_READ, RX_STATUS_LINECOMPLETE, RX_STATUS_RECEIVING, SAMPLE_CNTR_LEN, SEND_INTERVAL_MS_DEFAULT, SERIAL_DEV_DEFAULT, set_interface_attribs(), TX_WORD_DEF_LEN, and TX_WORD_MAX_LEN.
void print_app_usage | ( | void | ) |
References BAUDRATE_DEFAULT, DURATION_S_DEFAULT, printf(), SEND_INTERVAL_MS_DEFAULT, SERIAL_DEV_DEFAULT, and TX_WORD_MAX_LEN.