nidas  v1.2-1520
Macros | Functions
serial_loopback_test.c File Reference
#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)
 

Macro Definition Documentation

#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().

Function Documentation

int main ( int  argc,
char **  argv 
)
void print_app_usage ( void  )
int set_interface_attribs ( int  fd,
int  speed,
int  parity 
)

References printf().

Referenced by main().